From OpenMotics
Jump to navigation Jump to search

Command Line Interface (CLI)


CLI Reference Guide
The Gateway Module is the brains of the OpenMotics platform. It manages the other Modules on the bus and connects to the OpenMotics Cloud for online management and control over your installation
Internally, the Gateway module houses 2 different computer systems:
  1. The Gateway controller: This Linux computer is a standard Beagle Bone Black that is fitted on the Master PCB
  2. The Master controller: This controller, that is fitted on the Master PCB, is based on a Microchip 18F67J11 that is programmed in PicBasic Pro. This Master PCB also has a real time clock with Battery, an Eeprom and the necessary communication channels (RS485, RS232).
The Gateway module has multiple connections to the outside world: 2x RS485, 3xRS232 and Ethernet. The Ethernet, 1 RS485 and 2 serial connections are connected to the Gateway controller. 1 RS485 and 1 shared serial connection is connected to the Master controller. By setting jumpers, the shared serial connection will connect the Gateway controller with the Master controller over RS232. If needed and where appropriate, the shared serial connection can be used to access the Master controller directly over the built-in CLI interface (please see the CLI command reference interface for the different commands that exist). The CLI interface of the Master controller is also accessible through the Cloud interface (Maintenance mode tab).
The Master controller is connected to the gateway over RS232. An API and CLI on the Master controller is available and can be found back in this Wiki.
The CLI Reference Guide describes the available CLI commands that can be executed on the Master controller. This CLI can be accessed directly on the Gateway (see hardware section to set the correct jumpers on the gateway) or via the OpenMotics Cloud where a maintenance session can be opened that gives your direct access to the CLI interface of the Master controller.

The Master controller works fully independent of the Linux controller and every single aspect of the home automation can be programmed via the cloud interface or via the CLI interface.



Error Codes
All possible error codes returned by the Gateway Module CLI.
Action Types
A detailed overview of the action type bytes in a Basic Action.
Config Types
The config byte is used in Simple Actions and specifies the action to be performed.
Decision Types
The decision config byte are used in Basic Decisions and define the “IF” statement condition.
Output Debug Codes
The debug codes used when Debug is active.

Setup Guides

Thermostat Setup
A guide on setting up multiple thermostats

Application programming interface (API)

OpenMotics Python SDK
Webservice API
The API available on the Gateway Module
Gateway plugins
Gateway architecture