The Open Source Vending Group Project/Osvend: Difference between revisions

From Nottinghack Wiki
Jump to navigation Jump to search
Created page with "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 t..."
 
mNo edit summary
Line 1: Line 1:
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.
The Vending Machine Controller (VMC) communicates with the Web Gateway (WG) using the osvend protocol over a websocket.  The VMC initiates the websocket when it boots, the WG sends the first message, requesting the MachineID (MAC address) of the VMC.


Commands are '''case-sensitive'''.  This is version 1 of the protocol
Commands are '''case-sensitive'''.  This is version 1 of the protocol

Revision as of 22:18, 26 August 2012

The Vending Machine Controller (VMC) communicates with the Web Gateway (WG) using the osvend protocol over a websocket. The VMC initiates the websocket when it boots, the WG 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>