The Open Source Vending Group Project/Osvend

From Nottinghack Wiki
< The Open Source Vending Group Project
Revision as of 14:51, 26 August 2012 by James (talk | contribs) (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...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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>