1. Introduction

Connect to vendOS websocket

This documentation is organised by resource. These resources each have an introduction which explains the purpose of the resource and some basic concepts. All examples are in vanilla JS with possible error codes listed at the bottom in a table.

The documentation assumes that you're comfortable with JavaScript/ES6.

What is FieldCommand?

FieldCommand is the vendOS operating system running on each smart vending machine. Among other things it:

  • Runs vendOS apps on the interactive screen for customers
  • Gives engineers an on-screen UI to run basic maintenance tasks on the hardware
  • Communicates with other vendOS cloud services like Mothership

vendOS apps can communicate with FieldCommand. They usually do this in order to issue vends, persist data or respond to events coming from the machine. The primary method of communication is via WebSockets, but our handy promise-based vendOS JS library helps make communication much easier.

A simple vendOS App

FieldCommand runs vendOS apps in a modern Chromium browser view, so they can be built by anyone with knowledge of modern web development technologies. An app could be anything from a simple hyperlinked site, to a React application or even WebGL. Anything that works within a browser should be fine and dandy on our machines.

An app can be as small as an index.html file, which acts as a bootstrap when FieldCommand starts up. The machine screen size is 1080px x 1920px (portrait), and anything outside of this will be clipped.

vendOS apps are downloaded, saved to disk on the machine, and then served from a simple local http server allowing the app to keep running regardless of internet connection.

All you need is an index.html file

If you're itching to play with a simple starter app, we recommend moving straight to our Quick Start guide.

Where can I get help?

We know that learning a new technology can sometimes be overwhelming, and it's totally normal to get stuck. If that happens, we recommend emailing [email protected] for help.