The Open Source Vending Group Project/Osvend
Jump to navigation
Jump to search
The Vending Machine Controller (VMC) communicates with the Web Gateway using the osvend protocol over a websocket. The VMC initiates the websocket when it boots, the VMC sends the first message, requesting the MachineID (MAC address) of the VMC.
Commands are case-sensitive. This is version 1 of the protocol
A typical conversation would go like this, more details below:
Direction | Message |
---|---|
WG > VMC | MACHINEID:<server version> |
VMC > WG | MACHINEID:<MAC address>:<controller version |
WG > VMC | STATUS |
VMC > WG | STATUS:<hopper details>:<overall state>:<reason> |
WG > VMC | STOCK:<hopper> |
VMC > WG | STOCK:<hopper>:<status> |
WG > VMC | VEND:<hopper> |
VMC > WG | VEND:<hopper>:ACK |
VMC > WG | VEND:<hopper>:<status>:<reason> |