0% found this document useful (0 votes)
24 views46 pages

Macas Open VMC Interface - EN

The MACAS Open VMC Interface Manual provides detailed information on the communication protocols and data layers used for machine management and beverage production. It includes definitions of key terms, communication data layers (TCP/IP, WebSocket, and Serial Port), and various commands for machine operations. The document also outlines the structure of JSON files for machine configuration and recipes, along with server-side resource management.

Uploaded by

travelbug112233
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views46 pages

Macas Open VMC Interface - EN

The MACAS Open VMC Interface Manual provides detailed information on the communication protocols and data layers used for machine management and beverage production. It includes definitions of key terms, communication data layers (TCP/IP, WebSocket, and Serial Port), and various commands for machine operations. The document also outlines the structure of JSON files for machine configuration and recipes, along with server-side resource management.

Uploaded by

travelbug112233
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 46

MACAS OPEN VMC INTERFACE

MANUAL

CONTENTS

1 CONCEPT..................................................................................................................................................................3

1.1 OVERVIEW............................................................................................................................................................3
1.2 TERMS AND ABBREVIATIONS................................................................................................................................3
1.2.1 Machine product, ingredient and recipe..........................................................................................................3
1.2.2 GVMC Client:..................................................................................................................................................4
1.2.3 venduid monitor:.............................................................................................................................................4
1.2.4 Mqtt broker server,..........................................................................................................................................4
1.3 VENDUID...............................................................................................................................................................4
1.4 VENDUID_MONITOR..............................................................................................................................................5
1.5 APPLICATION PROTOCOL.......................................................................................................................................5
1.6 DEFINITION...........................................................................................................................................................5

2 COMMUNICATION DATA LAYER.......................................................................................................................5

2.1 TCP/IP SOCKET DATA LAYER SOCKET..................................................................................................................5


2.2 WEB SOCKET LAYER.............................................................................................................................................5
2.3 SERIAL PORT DATA LAYER:..................................................................................................................................5
2.4 SERIAL PORT INTERFACE CONFIGURATION...........................................................................................................6
2.5 COOKING COMMAND EXAMPLE:...........................................................................................................................7

3 PROTOCOL...............................................................................................................................................................7

3.1 HEART BEAT PACKET.............................................................................................................................................7


3.2 LOGIN...................................................................................................................................................................8
3.3 MACHINE STATE FEEDBACK.................................................................................................................................9
3.4 VMC CLIENT ERROR AND WARNING MESSAGE:.................................................................................................10
3.5 GET A LIST OF MACHINE PRODUCT CREATIONS:.................................................................................................11
3.5.1 Get machine product info...............................................................................................................................11
3.5.2 Set machine product info...............................................................................................................................12
3.6 VMC MACHINE INGREDIENT:............................................................................................................................12
3.7 COFFEE PRODUCTION.........................................................................................................................................13
3.8 PRODUCTION OF COFFEE RESPONSE PACK........................................................................................................14
3.8.1 The client responds to the server command that has been received..............................................................14
3.8.2 Client responds to server production results.................................................................................................15
3.9 POP-UP OPENING DIALOG...................................................................................................................................15
3.10 REQUEST MACHINE SALES INFORMATION:........................................................................................................16
3.11 CLEAR UP RECENT SALES INFORMATION OF MACHINES.....................................................................................16
3.12 REQUEST THE CURRENT STATE OF THE MACHINE:..............................................................................................16

Version 1.1.42
[Type here]

3.13 REQUEST THE MACHINE”S CURRENT ALARM LIST:............................................................................................16


3.14 THE MACHINE STATE FUNCTION.........................................................................................................................16
3.15 MACHINE RESTART COMMAND..........................................................................................................................17
3.16 MACHINE ENTER REVERSE SSH COMMAND.(PS:ANDROID VERSION IS NO LONGER SUPPORTED)................17
3.17 MACHINE STOPS REVERSE SSH.(PS:ANDROID VERSION IS NO LONGER SUPPORTED)....................................17
3.18 SALES INFORMATION FOR MACHINE-SPECIFIED PRODUCTS................................................................................17
3.19 MACHINE-SIDE STANDARD SQL LANGUAGE SUPPORT.......................................................................................18
3.20 MACHINE MANAGEMENT PASSWORD ACQUISITION..........................................................................................18
3.21 UPLOAD MACHINE FILE TO SSHD SERVER COMMAND.......................................................................................19
3.22 THE SSHD SERVER FILE IS DOWNLOADED TO THE MACHINE SIDE FILE............................................................19
3.23 GET THE MACHINE PRODUCT LIST PRODUCTS_INFO COMMAND........................................................................20
3.23.1 Get machine product list...........................................................................................................................20
3.23.2 Machine available product information....................................................................................................20
3.24 SET PRICE...........................................................................................................................................................20
3.25 CHECK THE PRODUCT PRICE ORDER:..................................................................................................................21
3.26 SFTP COMMAND............................................................................................................................................21
3.27 MACHINE FIRMWARE UPDATE COMMAND..........................................................................................................22
3.28 READ THE MACHINE SENSOR INFORMATION.......................................................................................................22
3.29 MACHINE CONTROL BOARD STATUS FEEDBACK:................................................................................................22
3.30 RUN ANDROID ADB COMMAND.........................................................................................................................23
3.31 OPEN MACHINE DOOR........................................................................................................................................23
3.32 MACHINE CREDIT DEVICE CONTROL(TODO)......................................................................................................23
3.33 GET ALL OF MACHINE SOFTWARE COMPONENTS VERSION.................................................................................23
3.34 MACHINE TESTING AND PARAMETER SETTING...................................................................................................24
3.34.1 Test the machine components:..................................................................................................................24
3.34.2 The machine and product parameter setting.............................................................................................24
3.34.3 Machine matiness’ command:...................................................................................................................25
3.34.4 Machine control board TEST KEY command...........................................................................................26
3.34.5 Send binary data to machine control board:............................................................................................26
3.35 DOWNLOAD THE MACHINE CONFIGURATION DATA TO MACHINE CONTROL BOARD:.........................................27
3.36 MACHINE TEST INFORMATION REPORT...............................................................................................................27
3.37 PRODUCT RECIPE AND TESTING COMMAND........................................................................................................27

4 ABOUT ANDROID SDK DIRECTORY DESCRIPTION:................................................................................28

4.1 THE VENDUID DATA DIRECTORY OF ANDROID SYSTEM: /DATA/VMC:...............................................................28


4.2 MACHINE LOCAL DATA BASE..............................................................................................................................28
4.3 EVA DATA DIRECTORY.......................................................................................................................................28
4.4 SYS CONFIG DIRECTORY.....................................................................................................................................28
4.5 CREDIT CONFIGURATION DIRECTORY.................................................................................................................28
4.6 ELECTRONIC PAYMENT INFORMATION DIRECTORY.............................................................................................28
4.7 MACHINE CONFIGURATION FILES:......................................................................................................................28
4.7.1 Configuration files dir....................................................................................................................................28
4.7.2 mconfig.xml:..................................................................................................................................................29
4.7.3 Machine IPD and MPD files dir....................................................................................................................29
4.7.4 EVOCA machine recipe definition files.........................................................................................................29

2
[Type here]

5 MACHINE CONFIGURATION JSON FILES LIST..........................................................................................30

5.1 MACHINE DESCRIPTION MDMACHINE.JSON FILE................................................................................................30


5.1.1 Machine components information "components info"..................................................................................30
5.1.2 Machine connection information "connections"...........................................................................................30
5.2 CUSTOMER PRODUCT.JSON FILE.........................................................................................................................30
5.2.1 Overview description: "description".............................................................................................................30
5.2.2 Ingredient entry list "ingr entry list".............................................................................................................30
5.2.3 Ingredient list "ing lists"................................................................................................................................30
5.2.4 Product group information "product group info"..........................................................................................31
5.2.5 Products information "products info":..........................................................................................................31
5.3 THE EXAMPLE ABOUT THE RECIPE JSON FILE:..................................................................................................31
5.4 CUSTOMER PRODUCT FILE:PRODUCT_CUSTOMER.JSON....................................................................................33
5.4.1 Modify the canister ingredient information...................................................................................................33
5.5 MQTT FILE TRANSPORT LAYER.........................................................................................................................35
5.5.1 MQTT file transfer topic................................................................................................................................35

6 SERVER SIDE RESOURCE..................................................................................................................................35

6.1 DIR SYS:.............................................................................................................................................................36


6.2 DIR MACHINE.....................................................................................................................................................36
6.3 DIR CREDIT........................................................................................................................................................36
6.4 DIR BACK_OFFICE..............................................................................................................................................36

7 DOCUMENT RELEASE NOTE............................................................................................................................36

7.1 V1.4.1................................................................................................................................................................36
7.2 V1.4.2:...............................................................................................................................................................36
7.3 V1.4.3:...............................................................................................................................................................36
7.4 V1.4.4................................................................................................................................................................36

Version 1.4.4
[Type here]

1 Concept

1.1 Overview

1.2 Terms and abbreviations

1.2.1 Machine product, ingredient and recipe

 Product id
It means the product identify that support by the machine, every product has unique id.
Normally, it is three digital number, like 801,802, etc.
 Product name
It means the product name with multi-language support.
 Ingredient name
Normally it is the ingredient name, for example, like Coffee bean, milk powder, cacao
powder etc.
 Ingredient id
It means the ingredient identify in the machine, normally it is 4 digital number,
like 1001,1002 etc.
 Recipe
It means the product recipe information about the all of ingredient information of the
product.
 Component
The VMC SDK use abstract component to build a whole machine, and also use this
concept to configure the machine. For example about the table top machine components
list, include grinder, brewer, canister, mixer etc.
 Component Gate
The machine uses some components and synchronized to make product, the component
gate is an abstract concept to communicate with another component.
 Parameter
 Component parameter
The component parameter is used for different products, normally all of the products
share same setting of the parameter.
 Product parameter
normally different product uses different setting of the parameter.
 Connection
All of component use connection to communicate with each other. SDK use this concept

4
[Type here]

to send and receive message between components.

1.2.2 GVMC Client:

It is mean venduid app, it is a TCP/IP socket client.

1.2.3 venduid monitor:

It is an TCP/IP socket server and also is Mqtt client that connected with MQTT broker.

1.2.4 Mqtt broker server,

It is means the message center on the cloud platform. It provides a keep alive connection for
the machine, so any mqtt client can communicate in any time.

1.3 venduid

This application response for the user interface and machine beverage making engine
management.

1.4 venduid_monitor

This application is used for communicated with venduid app with TCP/IP socket, and also
communicate with cloud platform that use MQTT protocol.

1.5 application protocol

The TCP/IP socket and mqtt protocol use same application protocol that base on the JSON
command format. There is difference about the packet head.

Version 1.4.4
[Type here]

1.6 Definition

2 Communication data layer

2.1 TCP/IP socket data layer socket

Data format as bellowed:

head
length seqno body

Head:
 length:4 bytes,The data frame length that include the data head with asci code decimal
format.
 seqno:8 bytes,sequence number with asci decimal code, and increment automatically.
 Body:application layer data with json format with code UTF-8.
PS: Only in the TCP/IP socket data layer, the login command and heart beat command is
needed.

2.2 Web socket layer

The GVMC application play rules of the web socket server rule, so any another third client
can connect this web socket server to communicate with the GVMC application. There is
any another frame head of the message, only with message body.

2.3 Serial Port data layer:

The serial uart port basic data protocol


baud rate: 115200, 8 bit, none parity,1 stop bit.
Data format as bellowed:

addr head
address length seqno body check_sum

 address: 1 byte

6
[Type here]

The machine RS485 slave address, now the machine slave address is 7.
PS: The RS485 Modbus is supported, if the machine only response the data when
get the command from the master.
And the master need send command to the machine period, otherwise can't get the
machine data.
Suggest poll command is 3.11 command to get the machine state.
 length : 4 bytes , The data frame length that include the data head with asci code
decimal format.
(PS: this length not includes the check_sum length).
 seqno : 8 bytes , sequence number with asci decimal code, and increment
automatically.
 Body:
application layer data with json format with code UTF-8.
 check_sum: 2 bytes
check_sum is sum value for all of the data in the frame.
it is presented by asci hex value. for example, if the value is 0xA9, that will present as
asci code with first byte is “A” and second asci code is “9” with hex format. and for the
hex value presentation, the value “a”-”f” is not allowed to used, only use “A”-”F”.
This interface is worked in half duplex mode, and the machine is master, if the RS485
interface is used.
The slave device can’t send the data unless the master had sent data to the slave,
once the slave gets the master data, it will have maximum 500ms time to occupy the
bus to send data.

2.4 Serial port interface configuration

Please refer the contents of the file mconfig.xml in path /data/VMC/machine.

<?xml version=“1.0” encoding=“UTF-8” ?>


<Macas>
<CoffeeMachine version=“1.0”>
<GVMC>
<MachineManager>
<Machine name=“SL1000” type=“SL1000” folder=“SL1000”>
<Ipd file=“ES4CEU_MILKFOAM_COLD_MIX.ipd” />
<Mpd file=“ES4CEU_MILKFOAM_COLD_MIX.mpd” />
<Board id=“2” />
<DoorBoard id=“2”/>
<ServerIP address = “192.168.1.22” />
<ServerPort port=“8888” />
<ServerUart port=“COM12”/>
</Machine>
</MachineManager>
</GVMC>

Version 1.4.4
[Type here]

</CoffeeMachine>
</Macas>

The “serverUart port” data field that define which port is used for serial communication.

2.5 Cooking command example:

 TCP/IP packet:
013100000110{“cmd”:”products”,”vmc_no”:700000,”recipe_adjust”:”true”,”make_product_
session_id”:1001,”product_id”:[807],”count”:[1]}
 Frame header length:0131:
 Frame header seqno: 00000110
 Body:
 Serial port packet:
7013100000110{“cmd”:”products”,”vmc_no”:700000,”recipe_adjust”:”true”,”make_product
_session_id”:1001,”product_id”:[807],”count”:[1]} EF
 Serial data address:7
 Frame header length:0131:
 Frame header seqno: 00000110
 Body:
 The frame header sum information: EF
 Websocket packet:
{“cmd”:”products”,”vmc_no”:700000,”recipe_adjust”:”true”,”make_product_session_id”:100
1,”product_id”:[807],”count”:[1]}
Only message body is transferred.

3 Protocol

3.1 heart beat packet

direction:GVMC Client(Client) - - -> venduid monitor(Server)


Determine whether a connection is available:
If you pause for 3s to send a heartbeat message, the connection will not be available if the
response message is not received in 20s. The client needs to reconnect the server.
{
“cmd”:”hb”,
“vmc_no”:33232
}

8
[Type here]

“vmc_no”: your machine number(33232).


PS:
Machine numbers are manually configured by the client when deployed according to the
server configuration.

Server responds to heartbeat packages:


direction: GVMC Client(Client) <- - - venduid monitor(Server)
{
“cmd”:”hb”,
“mqtt_connected”: true,
“server”:”115.47.123.97:1883”
}
mqtt_connected: Check whether the remote MQTT server is connected.
Server: Remote Server IP or Domain name information and port number.
PS: This command only used for TCP/IP socket used, for mqtt connection that use mqtt
standard.

3.2 login

direction:GVMC Client(Client) - - -> venduid monitor(Server)


The login authentication must be sent within 10 seconds after the client connects to the server,
otherwise the server will actively disconnect for 10 seconds without authentication.
{
“cmd”:”login”,
“vmc_no”:33232,
“timestamp”:20150624,
“sign”:”594f803b380a41396ed63dca3950354”
}
“vmc_no”: your machine number(33232).
“timestamp”: Timestamp, yyyyMMdd
“sign”: (Timestamp + captcha) MD5 value with lower case.

Login result package:


direction: GVMC Client(Client) <- - - venduid monitor(Server)

“cmd”:”login_r”,
“ret”:0
}
“vmc_no”: your machine number.
“ret”: zero is successful, others is fail[check the error code].
PS: Seqno in the header, the server will return the seqno sent by the client as it is.
PS: This command only used for TCP/IP socket used.

Version 1.4.4
[Type here]

3.3 Machine State feedback

The client sends a machine status report packet to the server after successful login or after the
status changes.

direction:GVMC Client(Client) - - -> venduid monitor(Server)


{
“cmd”: state”,
“vmc_no”:100997,
“vmc_state”:” VendIdle”,
“state”:” VendIdle”,
“level”:”255”,
“ui”:”qt”,
"doorOpen":"true",
"deliveryDoorOpen":"false",
"isCupExist":"true"
}

 “vmc_no”: your machine number. (100997)


 “vmc_state”: State feedback.
 “Running”: The machine is working.
 “FunctionalOff”: The machine is dormancy.
 “VendIdle”: The machine is running normally, can now execute instructions.
 “HourFlush”: The machine is in automatic cleaning.
 “WakingUp”: The machine is awakened.
 “Administration”: The machine is in administrator status.
 “Maintenance”: The machine is in maintenance state.
 “OutOfOrder”: The machine working error.
 “WaitForCredit”: The machine is waiting for credit
 “OperService”: The machine is in operator management state.
 “VendProductSelected"
 “VendProductStatusPending"
 “VendWaitForProductAvaiable"
 “VendProductAvailable"
 “VendDeductStarted"
 “VendProductionStarted"
 “VendProductPreparing"
 “VendProductionPaused"
 “VendRefundStarted"
 “SystemHalt"
 “Init"
 “Running"
 “FunctionalOff"
 “StandBy”

10
[Type here]

 “HourFlush"
 “WakingUp"
 “state”: Same value of the “vmc_state”
 “ui”: Current UI sate, should QT or H5.
State feedback result package:
direction: GVMC Client(Client) <- - - venduid monitor(Server)
{
“cmd”:” status_r”,
“vmc_no”:100997,
“ret”:0
}
“vmc_no”: your machine number. (100997)
“ret”: zero is server received.
 "doorOpen": if the machine door is open or not.
 "deliveryDoorOpen": if the machine delivery door is open or not.
 "isCupExist": if there is cup in the machine delivery area.

3.4 VMC Client error and warning message:

direction:GVMC Client(Client) - - -> venduid monitor(Server)


{“cmd”:”error”,”action”:”get”}
action list:
 “get”:
 “clear”:
machine error and alarm response.
direction:GVMC Client(Client) <- - - venduid monitor(Server)

{
“error_list”:
[{
“is_fatal_error”:true,
“is_pessistance_error”:true,
“error_description”: “Water air break is empty”
}
]}

 “is_set”:
Setting or clearing error codes, return true is setting error; return false is cleaning error。
 “ is_fatal_error”:[true]
Determine whether it is a serious error, a serious error will enter the fault state and stop
working;
 [false]Record error.

Version 1.4.4
[Type here]

 “is_pessistance_error”:[true]
Determine whether the error is saved after power failure. If yes, the error will still be saved
after power-off, unless there is manual clearing, or the machine sends the corresponding
error code to clear the command automatically.
 “error_code”:
“ECH_04” error code.
 “error_description”:
“Water air break is empty” error describe.

PS: If it is cleared for error, there is no “error_info” field.

3.5 Get a list of machine product creations:

3.5.1 Get machine product info

{
“cmd”:”product_info”,
“action”:”get”
}

This command will feedback the command if the machine is online as bellowed.
After the boot and machine status changes, or when the instructions listed in are received, the
vending machine will update the list of products supported by the machine to the server.

“products_info”: [
{
“product_id”: “810”,
“parents_product”: “960”,
“status”: “ok”,
“product_ipd_name”: “Hot milk”,
“product_name”: “Dutch pure milk”,
“is_hide”:”false”,
“product_recipe”: [
{
“ing_name”: “Cup”,
“value”: “1”,
“ingrident_id”: “10011”
},
{
“ing_name”: “Milk”,
“value”: “200”,

12
[Type here]

“ingrident_id”: “10005”
},
{
“ing_name”: “ES water”,
“value”: “220”,
“ingrident_id”: “10007”
}
]
},
 “product_name”:
product name.
 “product_id”:
product ID.
 “status”:
product status.
 “ok”:
Product support production.
 “is_hide”:
Is the product hidden in the client.
 “error”:
The product cannot be made due to machine reasons or insufficient raw materials.
 “no_support”:
The product configuration on the machine is unsupported.
 “product_recipe”:
Product recipe information.
 “ing_name”:
Ingredient name.
 “ingrident_id”:
Ingredient ID.
 “value”:
Raw material Recipe parameters.

3.5.2 Set machine product info

{
“cmd”:”product_info”,
“action”:”set”
}

3.5.3 Remove product of the machine

{"cmd":"product_info","action":"remove","id":"323","group id":"0"}

Version 1.4.4
[Type here]

3.6 VMC Machine ingredient:

{“machine_ingrident”:[{“coffee bean”:”10001”,”es water”:”10003”}]}


PS:(machine ingredient list).
coffee bean: Raw material name.
10001: Raw material ID.
es water”: Raw material name.
“10003”: Raw material ID.

3.5: In-machine beverage formula.


VMC Product Recipe:
{
“product_id”:917,
“product_receipe”:
{
“coffee_bean”: 70,
“milk”: 100,
“total_water”: 100,
[
“water_percent”: 30,
“water_percent”: 70
]
}
}
product ingredients.(PS:Custom recipes are not supported at this time and will be supported in the
future)
After the vending machine is turned on, the ID of all products built into the machine and the recipe
information built into the machine are updated to the server.
“product_id”: 917, Product ID.
“coffee_bean”: 70, The coffee beans are 7.0g.
“milk”: 100, Milk powder 10.0g.
“total_water”: 100, Amount of drink(Unit ml),For example, some products are discharged several
times, and the values in the array represent the percentage of each water in
turn.
[
“water_percent”: 30,The first effluent was 30% and 21 ml.
“water_percent”: 70,The second effluent was 70% and 49ml.
]

14
[Type here]

3.7 Coffee production

After receiving the successful payment message, the server will send the instructions for coffee
production to the client, and the client will generate the corresponding coffee according to the
instructions.
direction: GVMC Client(Client) <- - - venduid monitor(Server)
{
“cmd”:”products”,
“vmc_no”:33232,
“recipe_adjust”:”true”,
“make_product_session_id”:1001,
“fake_making”:”false”,
“wait_for_payment”:”true”,
“product_id”:[917],
“count”:[1],
“product_recipe”: [
{
“ing_name”: “Cup”,
“value”: “1”,
“ingrident_id”: “10011”
},
{
“ing_name”: “Milk”,
“value”: “200”,
“ingrident_id”: “10005”
},
{
“ing_name”: “ES water”,
“value”: “220”,
“ingrident_id”: “10007”
}
]
}
 “vmc_no”: your machine number.(33232)
 “make_product_session_id”:The product creates a session ID, which is a random
number that uniquely identifies the product production command. Also known as the
order number. If receive two product creation commands with the same id, make only
one.(1001)
 “product_id”: Makeing coffee ID (Configured by the client deployment)
 “count”: Number,(Unit: a Cup of)
 “product_receipe”: Product formulation,Please check 3.3.2
 “recipe_adjust”: Shows if it is a recipe adjustment interface.
 “fake_making”: It is just for product making check, no real product making.
 “wait_for_payment”: Wait for payment with venduid.

Version 1.4.4
[Type here]

 “recipe_adjust”: If show the recipe adjust page.

3.8 Production of Coffee Response Pack

The client responds to the server to generate the coffee command, Return two responses

3.8.1 The client responds to the server command that has

been received

direction:GVMC Client(Client) - - -> venduid monitor(Server)



“cmd”:”products_r”,
“vmc_no”:100997,
“make_product_session_id”:1001,
“ret”:0
}
“vmc_no”: your machine number. (100997)
“make_product_session_id”: Product production session ID.(1001)
“ret”: The client has received the request return value
0: The client supports the products made and will launch the product.
1:The product ID is not supported on the client side.
2:The machine is not ready for sale.
3 : The machine is waiting for payment. (After the product production
command is sent, it will be automatically produced with the product selected by the
customer)
PS:The server needs to query the machine status as VendIdle before it can send
the command to make coffee. Multi-product commands are not supported. For
product ID, it can be synchronized by commands at boot-up or provided with
Ipddesigner by referring to the manufacturer.

3.8.2 Client responds to server production results

direction: GVMC Client(Client) - - - > venduid monitor(Server)



“cmd”:”products_ret”,
“vmc_no”:100997,
“make_product_session_id”:1001,
“make_result”:0,

16
[Type here]

“fail_info”:
{
“fail_product_id”:[917,910],
“msg”:[“缺水”,”缺糖”]
}
}
“vmc_no”: your machine number.(100997)
“make_product_session_id”: Product production session ID.(1001)
“make_result”: Production results
0: All successful
1: Partial fail
-1: Fail
“fail_info”: Failure message
“fail_product_id”: List of failed products
“msg”: Detailed Failure Reasons for the List of Failed Products

3.9 Pop-up opening dialog

{“cmd”:”json_key”,”type”:”1”,”nr”:”1000001”,”followNr”:”1000”}
The highest level open dialog pops up request command,Password:5651.

3.10 Request machine sales information:

Send the following information to the specified machine number.


{
“cmd”:”eva”,
“action”:”get”,
“eva_data”:”VA1*0*0*0*0*0*0*0*0*0*0*0*0\r\nCA2*0*0*0*0”
};

3.11 Clear up recent sales information of machines.

{
“cmd”:”eva”,
“action”:”reset”,
};

Version 1.4.4
[Type here]

3.12 Request the current state of the machine:

{
“cmd”:”state”,
“action”:”get”
};

Get the state of the machine.

3.13 Request the machine”s current alarm list:

{
“cmd”:”error”,
“action”:”get”,
};

3.14 The machine state function

{
“cmd”:”state”,
“action”:”set”,
“new_state”:”Administration”
};

If the client want to set the machine state, use this command to set the machine state.
The supported states are as bellowed:
 “Administration”:
 “ReturnHome”:If machine in non-vendilde state, send this command to return the
vending home state.(return the main menu vend idle state).
 “Ok”: If send this state, it will simulate the OK button in the vendui customer UI.
 “OperService”: Force machine to enter the operator top level state.
 “H5”: Force the machine use H5 version customer user interface.
 “QT”: Force the machine use QT version customer user interface.

3.15 Machine Restart Command.

{"cmd":"shell","shell_script":"reboot"}

18
[Type here]

This command will cause the whole system to restart, not only the Android board.

3.16 Machine Enter Reverse SSH Command.(PS:ANDROID

version is no longer supported)

{
“cmd”:”shell”,
“shell_script”:”./ssh_server.sh &”
};

3.17 Machine stops reverse SSH.(PS:ANDROID version is

no longer supported)

{
“cmd”:”shell”,
“shell_script”:”./ssh_server_stop.sh &”
};

3.18 Sales information for machine-specified products.

{
“cmd”:”eva”,
“action”:”get”,
“eva_data”:”“PA7*971*0*0*0*0*0*0*0”
};
971 is Product ID.

3.19 Machine-side standard SQL language support.

{
“cmd”:”json_sql”,
“function_name”:”get_day_sale_ammount”,
“sql_file”:”./back_office/eva/chargelist.db”,
“statement”:”select sum(sale_price)as sumvalue from ChargesList where SaleTime like

Version 1.4.4
[Type here]

20161021%”
};
“function_name”: SQL query function name.
“sql_file”: Machine-side SQL name
“statement”: Database SQL statement.
3.20: Machine password management settings.
var cmd =
{
“cmd”:”json_password”,
“action”:”set”,
“AuthOper1Code”:”1001”,
“AuthOper2Code”:”1002”,
“AuthOper3Code”:”1003”,
“AuthServ1Code”:”1004”,
“AuthServ2Code”:”1005”,
“AuthDevCode”:”1006”,
“DoorPassword”:”189288”
}

“AuthOper1Code”:”1001”: Machine level 1 operator password.


“AuthOper2Code”:”1002”: Machine level 2 operator password.
“AuthOper3Code”:”1003”: Machine Level 1 operator password.
“AuthServ1Code”:”1004”: Machine level 1 maintenance password.
“AuthServ2Code”:”1005”: Machine level 2 maintenance password.
“AuthDevCode”:”1006”: Machine operator password.
“DoorPassword”:”189288”: The machine opens the password.

3.20 Machine Management Password Acquisition

{
“cmd”:”json_password”,
“action”:”get”
}

3.21 Upload machine file to SSHD server command.

{
var cmd =

20
[Type here]

{
“cmd”:”sftp_batch_file”,
“ftp_batch_file”:”“
“sftp_server”:”115.47.123.97”,
“sftp_username”:”Coffee”,
“sftp_password”:”macascoffeetea”
}
var batch_file_cmd = “put /vmc_new/VMC/machine/SL1000/* “ + machine_id+”\n”;
batch_file_cmd = batch_file_cmd + “put /vmc_new/VMC/machine/productmenu/*.pmf “ +
machine_id + “\n”;
batch_file_cmd = batch_file_cmd + “put /vmc_new/VMC/machine/mconfig.xml “ + machine_id + “\
n”;
cmd[“ftp_batch_file”] = batch_file_cmd;
this.send_cmd(machine_id,cmd);

“sftp_server”: Server IP address, port fixed to 22.


“sftp_username”: sftp username.
“sftp_password”: sftp password.
}

3.22 The SSHD server file is downloaded to the machine

side file.

{
“cmd”:”sftp_batch_file”,
“ftp_batch_file”:”get ./” + machine_id + “/*.ipd /vmc_new/VMC/machine/SL1000 \n”;
“sftp_server”:”115.47.123.97”,
“sftp_username”:”Coffee”,
“sftp_password”:”macascoffeetea”
}

“sftp_server”: Server IP address, port fixed to 22.


“sftp_username”: sftp username.
“sftp_password”: sftp password.

Version 1.4.4
[Type here]

3.23 Get the machine product list products_info command

3.23.1 Get machine product list

{
“cmd”:”products_info”,
“action”:”get”
}

3.23.2 Machine available product information.

{"products_info":[{"product_id":"405","parents_product":"0","status":"ok","product_ipd_name":"America
Coffee Ice","product_name":"America Coffee Ice","is_hide":"false","product_recipe":
[{"ing_name":"Cup","value":"1","ingrident_id":"10011"},
{"ing_name":"Coffee","value":"140","ingrident_id":"10009"},
{"ing_name":"ICE","value":"1","ingrident_id":"10012"},
{"ing_name":"Water","value":"300","ingrident_id":"10019"}]}]}

Products_info: show avaible current machine product info.


Product_id: product id of the machine.
parents_product: the paraent of product.
status:it the product status is OK or not.
product_ipd_name: ipd name of the product.
hide: if it is hiding,
product_recipe:the product recipe.
ing_name ingrident name.
Ingrident_id: ingrident id.
Value:ingredient vale.

3.23.3 Machine products info set command

{
"cmd":"product_info",
"action":"set",
"products info":
[
{
"id": "319",

22
[Type here]

"name":"Double ES CW",
"lang1 name":"Hot water",
"lang2 name":"双份意式",
"lang3 name":"Hot water",
"product_name":"Matcha",
"icon_id":"218",
"icon_name":"product.png",
"permit_jug":"0",
"hide_flag":"0",
"style_index":"0",
"dosage_id":"217",
"dosage_name":"involve.png",
"product_ratio":"100",
"evoca machine recipe
file":"/data/VMC/machine/EVOCA/Customer/json/EVOCAProduct319Double_ES_CW.jso
n",
"is new":"true",
"shortID": "0",
"groupID": "0",
"parents info": "",
"recipe info": [
{
"product": "319",
"ingredient": "10001",
"options": "1",
"min": "10",
"std": "130",
"max": "160"
},
{
"product": "319",
"ingredient": "10002",
"options": "0",
"min": "0",
"std": "190",
"max": "220"
}
],
"preorder info": [
{
"product": "319",
"ingredient": "10002",
"order": "0",
"options": "0"
},
{

Version 1.4.4
[Type here]

"product": "319",
"ingredient": "10001",
"order": "0",
"options": "0"
}
]
}
]
}

 “action”: set the product action.


 “products_info”: products information

3.24 Set price

There are 4 prices for each product:


0(A):Normal sale price
1(B): Coupon purchase price
2(C): VIP purchase price
3(D): Unused
For the VendUI program after version 1.12.5, you must set the ABC three prices at the same time
to be used normally.
{
“cmd”:”eva”,
“action”:”get”,
“is_list64”: true,
“eva_data”: “PC7*$product_id*CA*$price_id*$price”
}
PS: $product_id,$price_id(0-3),$price(unit penny)

The code example is as follows:


set_machine_product_price($machine_id,0,$element->product_id,$element->price_a*100);
set_machine_product_price($machine_id,1,$element->product_id,$element->price_b*100);
set_machine_product_price($machine_id,2,$element->product_id,$element->price_c*100);
set_machine_product_price($machine_id,3,$element->product_id,$element->price_d*100);

public function set_machine_product_price($machine_id,$price_id,$product_id,$price)


{
$cmd[“cmd”]=“eva”;
$cmd[“action”]=“get”;
$cmd[“is_list64”]=true;
$price_info=“PC7*$product_id*CA*$price_id*$price”;
$cmd[“eva_data”]=$price_info;
$this->send_mqtt_message($machine_id,$cmd);

24
[Type here]

3.25 Check the product price order:

{“cmd”:”price”,”action”:”get”,”product_id”:”283”}
product_id: Product ID.

The price will respond with the following command:


{“cmd”: “price_report”, “cur_price”:”A”, “product_id”: “283”, “PriceListA”: “100”, “PriceListB”: “200”,
“PriceListC”: “300”, “PriceListD”: “400” })

PriceListA: Price A
PriceListB: Price B
PriceListC: Price C
PriceListD: Price D

3.26 SFTP COMMAND

{
“cmd”:”sftp_batch_file_r”,
“status”:0,
“msg”:”uploadInfo=>JsonSftp MySftpThread startIO outputStream.write
finished:\/data\/sftp\/app_monitor.sh”
}

“status”: // 0 is successful , 1 is fail


“msg”: “uploadInfo=>JsonSftp MySftpThread startIO outputStream.write
finished:\/data\/sftp\/app_monitor.sh”
File Transfer State Response

3.27 Machine firmware update command

Remotely check if there is an updateable firmware package on the machine side, and if so,
perform an automatic update.
{
“cmd”:”shell”,
“shell_script”:”./check_update”
};

Version 1.4.4
[Type here]

For the automatic update firmware package, it must be the macas_cm.dat file name.

3.28 Read the machine sensor information.

{
"cmd":"sensors",
"componentId":501,
}
Get the sensor value of the machine.
Machine response:
{
“machine_sensors”:
[
"boiler temp":93.5,
"boiler pressure":10.0
]
}
For example, about boiler temperature sensor:
"boiler temp":93.5,
"boiler pressure":10,

3.29 Machine control board status feedback:

{"boards status":{"board id":"2","status":"CMS_IDLE"}}


This command will be reported to the cloud platform when the machine control board status
change.
 board_id: Control board ID, Machine main control board ID is 2.
 status: The machine control board status. the status is listed as bellowed.
 CMS_IDLE: Machine control board is in idle state.
 CMS_AFTERBOOT : Machine control board is in after boot state, and wait to be
configured.
 CMS_TESTING:Machine control is in testing component state.
 CMS_PRODUCT:Machine control board is in product making state.
 CMS_FUNCTION_OFF : Machine control board is in function off state for power
saving.
 CMS_STANDBY:Machine IO Board is in standby state.
 CMS_SERVICE_ON: The machine is in service on state, normally it is means the
machine door is opened from closing state.
 CMS_SERVICE_OFF : The machine is in service off state, normally it is means the
machine door is closed from opening state
 CMS_WAKEUP:The machine is in wake up state.。

26
[Type here]

 CMS_SENSORS:The machine is in sensor reading state.。

3.30 Run Android ADB command

{
"cmd":"adb_cmd",
"adb_cmd_script":"ps"
}

"adb_cmd_script": ADB command, for example:ps.

3.31 Open machine door

The machine opens the door command, does not need to pop up the dialog box to enter the
password.
{"cmd":"json_key","type":"0","nr":"831","followNr":"1"}

3.32 Machine Credit device control(Todo)

3.32.1 Get the machine payment device information.

Send command:
{"cmd":"payment","action":"get"}

Response example for card credit device:

{"cmd":"payment","info":"devices","devices":[{"isOnline":"true","deviceProperities":
{"Manufacturer":"UVM","Model":"BINGO007 ","Serial":"163964
","Version":"202","FeatureLevel":"2","ScaleFactor":"10","DecimalPlace":"0","Country":"82"
}}]}

3.32.2 Payment device money status update

Any payment bill value information updating:

{"cmd":"payment","info":"status","cardStatus":"Card Accept","changerStatus":"Bill Not


Accept","isCoinInserted":"Coin Not Accept","CreditValue":"---","ChangerValue":""}

Version 1.4.4
[Type here]

3.33 Get all of machine software components version.

Cmd request version info:


{"cmd":"version","req":[{"board":"0","soft_type":"0"},
{"board":"2","soft_type":"0"}]}

The version information response will be like this:

{
"software_version": [
{
"board": "0",
"softwareType": "UD_APP",
"version": "1.11.88.H"
},
{
"board": "2",
"softwareType": "ISP_0",
"version": "2.0.51"
}
],
"hardware_version": [
{
"board": "2",
"version": "751688V31"
}
]
}

3.34 Machine testing and parameter setting

3.34.1 Test the machine components:

{
"cmd":"component",
"sub_cmd":"component test",
"boardId":2,
"componentId":501,
"testIndex": 0

28
[Type here]

}
 "componentId": Component id
 "testIndex": Component test index。
针对机器某个部件执行测试命令,具体部件 id 和测试索引见附件或者 IPDDesigner. 对如当前麦凯斯台式机参见 mdmachine.json 文件。

If the machine can start the machine testing, the machine state will be CM_TESTING state from
CMS_IDLE, and if the testing is finished, the return the CMS_IDLE again. Only send this
command will machine is in CMS_IDLE state.

3.34.2 The machine and product parameter setting

{
"cmd":"component",
"sub_cmd":"parameter set",
"component_id":501,
"product_id":-1,
"adjust_id": 0,
"fluid_id":0,
"value":100
}
"componentId":部件 ID。
"testIndex": 测试索引号。
"adjsut_id":可调参数 ID
"fluid_id": 在某些产品具有多次泵水的情况下,代表每次出水的 ID.
"value":可调参数值

Machine response:
{
"cmd":"component",
"sub_cmd":"parameter set",
"component_id":501,
"product_id":-1,
"adjust_id": 0,
"fluid_id":0,
"value":100,
“set result”:”ok”
}

1. " set result":


 “ok”: set parameter ok.
 “fail”: set parameter fail
}
3.19.3:获取机器部件或者制造产品的工艺参数:
{

Version 1.4.4
[Type here]

"cmd":"component",
"sub_cmd":"parameter get",
"component_id":501,
"adjsut_id": 0,
"fluid_id":0
}
设定参数完成之后,或者在收制定机器部件或者制造产品的工艺参数,机器将会回应以下数据包:
{
"set result":"ok",
"component_id":501,
"adjsut_id": 0,
"fluid_id":0,
"value":100
}
"set result":参数设定结果。

PS:机器额外定义的用户部件参数与工艺参数不能超过 100 个。

3.34.1 The machine and product parameter removing

{
"cmd":"component",
"sub_cmd":"parameter remove",
"component_id":501,
"product_id":-1,
}
If component_id is -1, it means erase all of product parameter, if the product_id is -1, will erase
all of component parameter.

3.34.2 Machine matiness’ command:

"sub_cmd": 机器维护命令:
{
"cmd":"component",
"sub_cmd":"rinsing set",
}
sub_cmd: 一些相关机器清洗及维护命令:
"rinsing":机器清洗。
"freshmilk rinsing":牛退役管道清洗
"purification":机器全自动除垢。
"empty air break":排空水箱。
"service on": 进入维护员模式。

30
[Type here]

"service off":退出维护员模式。

3.34.3 Machine control board TEST KEY command

"sub_cmd": 机器维护命令:
{
"cmd":"component",
"boardId":2,
"sub_cmd":"test key",
"key":"start"
}

"key": 具体按键
"start": 启动按键,一般不需要发送此命令到后台
"stop": 停止按键
"next": 下一步按键
"cancle": 取消按键
3.19.5:
{"cmd":"IoTestReport","line":1,"Info":"start test"}
在测试过程中,如收到相关信息,需要将 Info 的内容刷新到信息显示框,
line: 显示信息第几行。

3.34.4 Send binary data to machine control board:

{
"cmd":"io_cmd",
"board_id":"2",
"sub_cmd":"MSG_MAKE_PRODUCT",
"cmd_data":“”,
"req_reply":true
}
注意:
sub_cmd 为命令字符串
cmd_data 都为 UUCODE 编码的二进制数据,具体命令格式与命令包见有关 SVMC 的命令文档,
req_reply: 此命令是否需要 IO 板返回数据。
有一些命令需要带参数,有一些命令不需带任何参数。
{
"board_id":"2",
"cmd":"io_cmd",

Version 1.4.4
[Type here]

"sub_cmd":"1",
"respones_data":"acde"
}
"response_data":从 IO 板返回的以 UUCODE 编码的二进制数据。

进入维护模块,无需参数
{"board_id":"2","cmd":"io_cmd","sub_cmd":"MSG_SERVICE_ON","cmd_data":"","req_reply":false}

退出维护模式,无需带参数。
{"board_id":"2","cmd":"io_cmd","sub_cmd":"MSG_SERVICE_OFF","cmd_data":"","req_reply":false}

3.35 Download the machine configuration data to machine

control board:

{"board_id":"2","cmd":"config","sub_cmd":"download config file"}


{"board_id":"2","cmd":"config","sub_cmd":"erase config data"}

3.36 Machine test information report

When machine control is in testing state, maybe some test information will reported by this
command packet.

3.37 Product recipe and testing command.

{
"cmd::"product_test",
"sub cmd":"recipe update"
"product_id":"900",
};

32
[Type here]

"sub cmd":
"recipe update": 产品配方更新,对机器产品配方进行更新,SDK 将会读取 product_customer.json 文件,并在系统内验证当
前产品在当前机器配置上能否支持
"product check": 检查该产品是否支持制作。

制作。机器回应如下:
{
"cmd":"recipe_result",
"result":"ok",
"err msg":""
}
result:
"ok":机器支持产品制作。
"fail":机器产品不支持制作。
"err msg": 产品制作错误信息。

Version 1.4.4
[Type here]

4 About ANDROID SDK directory

description:

4.1 The venduid data directory of android system:

/data/VMC:

4.2 Machine local data base

4.3 EVA data directory

4.4 Sys config directory

4.5 Credit configuration directory

/data/VMC/Credit

4.6 Electronic payment information directory

/data/VMC/Credit

34
[Type here]

4.7 Machine configuration files:

4.7.1 Configuration files dir.

Dir /data/VMC/Machine, it store all of machine configuration files.

4.7.2 mconfig.xml:

<?xml version="1.0" encoding="UTF-8" ?>


<Spengler>
<CoffeeMachine version="1.0">
<GVMC>
<MachineManager>
<Machine name="SL1000" type="SL1000" folder="SL1000">
<Ipd file="HRC-ES4C-EU.ipd" />
<Mpd file="HRC-ES4C-EU.mpd" />
<Board id="2" />
<DoorBoard id="2"/>
<ServerIP address = "192.168.1.7" />
<ServerPort port="8888" />
</Machine>
</MachineManager>
</GVMC>
</CoffeeMachine>
</Spengler>

<ServerIP address = "192.168.1.7" />:TCP/IP Socket IP address, if MQTT client and SDK is in
same board, the address will be 127.0.0.1
<ServerPort port="8888" />:The Socket port number

4.7.3 Machine IPD and MPD files dir.

The mconfig.xml Ipd file and Mpd file data fields define the Mpd and Ipd files, and the directory
position depends the machine type and machine name data field.

4.7.4 EVOCA machine recipe definition files.

Customer recipe file dir: /data/VMC/machine/EVOCA/Customer/json.

Version 1.4.4
[Type here]

2.1.3: Recipe generated by the SW dir: /data/VMC/machine/EVOCA/Generated/json (json file format)


/data/VMC/machine/EVOCA/Generated/bin (bin file format)
2.1.4: /data/VMC/machine/EVMCConfig238.json: Store all of important configuration of the machine.
2.1.5: /data/VMC/machine/MachineError238.json: Store all of error configuration of the machine.
2.1.6: /data/VMC/machine/EVOCA/EVOACASES7CTEA-300-90-00-NC.mpd
/data/VMC/machine/EVOCA/EVOACASES7CTEA-300-90-00-NC.ipd: Machine description files.

/data/VMC/machine/coffeemachineconfig.xml:

<EnableEvocaTransportTrace>true</EnableEvocaTransportTrace> : if this value set to true, the


SW will store all of the ERS protocol data in /data/VMC/out.txt

5 Machine configuration JSON files list

5.1 Machine description mdmachine.json file

5.1.1 Machine components information "components

info"

Defines all of the component information for reference:


 "Id": Component ID。
 "class": Component class.
 "name": Component name
 "component gates": Component gate list
 "component parameters": Component parameter

5.1.2 Machine connection information "connections"

Define machine components connection information, just for the factory.

36
[Type here]

5.2 Customer product.json file

5.2.1 Overview description: "description"

IPD engine information and description. (don’t used by SDK user).

5.2.2Ingredient entry list "ingr entry list"

Ingredient and component id for ingredient storing.


 "ingredient": ingredient id.
 "ingr component": The ingredient component for component storing.
 "ingr gate": "0": The ingredient gate.
SDK User can modify "ingredient","ingr component" to change the ingredient of the canister.

5.2.3 Ingredient list "ing lists"

This item list all of information about machine ingredient:


 "ingredient": Ingredient ID.
 "name": Ingredient name.
 "unity": Ingredient unity.
 "defaultCalibration": Reserved.
 "properties": Reserved
 "unityType": Reserved
 "shortId": Reserved
 "optimizationFactor": Reserved

5.2.4 Product group information "product group info"

Machine product group information, it contains a list of product.


"groud id": Product group Id.
"groud name": Product group name。

5.2.5 Products information "products info":

Product recipe information:


"id": Product ID。

Version 1.4.4
[Type here]

"name": Product name.


"shortID": Reserved
"groupID": Reserved
"parents info": Parent id information.
"recipe info": Recipe information.
"preorder info": Ingredient order information.
"adjustment info":Product adjust information.

5.3 The example about the recipe json file:

6.1:定义先出定义出奶粉 25 克加上 130ml 的水,然后再加咖啡,咖啡豆 13 克,加 80ML 水,一个产品的 ID 定义。总水量 210ML


第一步所用的出水量为 130/210=77%, 第二步使用 80/210=22%的水。
{
"id": "811",
"name": "Cappuccino",
"shortID": "0",
"groupID": "1",
"is new":"true", //如果是原先菜单系统内无此 ID 的产品,则需要将此项设置为 true.
"parents info": "",
"recipe info": [
{
"product": "811",
"ingredient": "10002", //产品出水量
"options": "0",
"min": "0",
"std": "210", //原料可调范围,总出水量 210ML
"max": "210"
},
{
"product": "811",
"ingredient": "10003", //奶粉原料
"options": "2",
"min": "180",
"std": "250", //奶粉原料标准值,单位为 0.1G.
"max": "270"
},
{
"product": "811",
"ingredient": "10001", //咖啡豆
"options": "1",
"min": "90",
"std": "130", //标准出品,单位为 0.1G.
"max": "140"
}

38
[Type here]

],
"preorder info": [
{
"product": "811",
"ingredient": "10002", //水
"order": "1", //第二步
"options": "0"
},
{
"product": "811",
"ingredient": "10001", //第二步出咖啡,使用用咖啡豆和水。
"order": "1", //第二步
"options": "0"
},
{
"product": "811",
"ingredient": "10003", //第一步先出奶粉和水
"order": "0", //第一步
"options": "0"
},
{
"product": "811",
"ingredient": "10002", //水
"order": "0", //第一步
"options": "0"
}
],
"adjustment info": [ //产品工艺参数 Waterpart 定义。此参数代表在多次出水的产品中,每次出水在总出水量的百分比。
{
"product": "811",
"fluid": "0",
"scheme": "1",
"component": "701",
"adjustId": "1",
"stuffed": "0",
"defaultVal": "77" //第一次出水占 77%
},
{
"product": "811",
"fluid": "1",
"scheme": "1",
"component": "701",
"adjustId": "1",
"stuffed": "0",
"defaultVal": "22" //第一次出水占 22%
}

Version 1.4.4
[Type here]

]
}

5.4 Customer product file:product_customer.json

If customer want to overwrite the machine ingredient, can change the product.json file and
then rename the file name to product_customer.json, the file is located in application data
dir.
SDK will read this file to modify the machine ingredient configuration。

5.4.1 Modify the canister ingredient information

Modify the “ingr entry list” domain:

"ingr entry list": [


{
"ingredient": "10001", //咖啡豆
"ingr component": "2301", //研磨器部件
"ingr gate": "0"
},
{
"ingredient": "10002", //水
"ingr component": "701", //锅炉
"ingr gate": "0"
},
{
"ingredient": "10003", //奶粉
"ingr component": "152", //料盒 2
"ingr gate": "0"
},
{
"ingredient": "10006", //巧克力
"ingr component": "151", //料盒 1
"ingr gate": "0"
},
{
"ingredient": "10007", //奶茶粉
"ingr component": "153", //料盒 3
"ingr gate": "0"
}
],

40
[Type here]

如需要修改某个部件的原料信息,例如将料盒 3 和料盒 2 的原料进行交换,则可改成如下表:

"ingr entry list": [


{
"ingredient": "10001", //咖啡豆
"ingr component": "2301", //研磨器部件
"ingr gate": "0"
},
{
"ingredient": "10002", //水
"ingr component": "701", //锅炉
"ingr gate": "0"
},
{
"ingredient": "10007", //奶茶粉
"ingr component": "152", //料盒 2
"ingr gate": "0"
},
{
"ingredient": "10006", //巧克力
"ingr component": "151", //料盒 1
"ingr gate": "0"
},
{
"ingredient": "10003", //奶粉
"ingr component": "153", //料盒 3
"ingr gate": "0"
}
],

5.5 Machine product update

{
"cmd":"product_info",
"action":"set",
"description": {
"IPDId": "10000001",
"longName": "Macas demo"
},
"product group info": [
{
"group id": "4",

Version 1.4.4
[Type here]

"group name": "Espresso",


"products info": [
{
"id": "319",
"name":"Double ES CW",
"lang1 name":"Hot water",
"lang2 name":"双份意式",
"lang3 name":"Hot water",
"product_ratio":"100",
"evoca machine recipe
file":"/data/VMC/machine/EVOCA/Customer/json/EVOCAProduct319Double_ES_CW.jso
n",
"is new":"true",
"shortID": "0",
"groupID": "4",
"parents info": "",
"recipe info": [
{
"product": "319",
"ingredient": "1039",
"options": "1",
"min": "10",
"std": "130",
"max": "160"
},
{
"product": "319",
"ingredient": "10019",
"options": "0",
"min": "100",
"std": "170",
"max": "220"
}
],
"preorder info": [
{
"product": "319",
"ingredient": "1039",
"order": "0",
"options": "0"
},
{
"product": "319",
"ingredient": "10019",
"order": "0",
"options": "0"

42
[Type here]

}
]
}
]
}
]
}

 "cmd":"product_info",: command for product informatiom set.


 "action":"set":set product information

Version 1.4.4
[Type here]

6 MQTT file transport layer

6.1.1 MQTT file transfer topic

1. Require the file contents published by the MQTT protocol

If there is any MQTT client want to get the another MQTT client local file system information,
just publish message as bellowed.
/200000/data/VMC/machine/lang.xml

{
"cmd":"mqtt_file",
"file":"touchless.mp4",
"sub_cmd":"receive",
"store_dir":"E:/TEST/",
"req_id":"1001"
}

The MQTT client will publish the local file system contents with this topic
“/Post/req_id/length/offset/destinationfilepathname”

2. Store the file contents published by the MQTT client

Send command to the destination directory to the received client that want to download the file
from another mqtt machine client.

{"cmd":"mqtt_file","file":"E:/touchless.mp4","sub_cmd":"send","req_id":"1001"}

1. MQTT Client:
2. PHP Client
3. C++ Client
4. Java Client
5. JS Client

44
[Type here]

7 Server side resource

VMC config files package dir:


htpp://tendor.icoffee-tea.com/machineDatabase/701900/VMC/

701900: Means the machine number.

7.1 Dir sys:

https://tendor.icoffee-tea.com/machineDatabase/701900/VMC/sys/SysConfig.xml

7.2 Dir machine

7.3 Dir Credit

7.4 Dir back_office

8 Document Release Note

8.1 V1.4.1

Initial release for English version.

Version 1.4.4
[Type here]

8.2 V1.4.2:

Add some description about the serial port data format.

8.3 V1.4.3:

Add RS485 interface

8.4 V1.4.4

Add the mqtt file transfer API

46

You might also like