Skip to content

API OS Connectivity

ARIbemoss edited this page May 11, 2017 · 1 revision

[Back to Developer Resources]

Link 7: API between OS and Connectivity Layer

The following tables describe data format needed between agents (OS layer) and hardware devices (connectivity layer) for three devices supported by BEMOSS Lite (CT30/CT50, Philips Hue and WeMo smart plug), and three agent functions: getDeviceStatus, setDeviceStatus and IdentifyDevice.


1) RadioThermostat with WiFi USNAP module

For RadioThermostat (CT30/CT50), when a thermostat agent performs "getDeviceStatus", the agent expects the following data from the thermostat: temperature (float), thermostat mode (string), fan mode (string), heat setpoint (float), cool setpoint (float), thermostat state (string) and fan state (string). All data sent from the connectivity layer to the OS layer must be in JSON format.

When a thermostat agent performs "setDeviceStatus", the agent sends the following command to the thermostat: thermostat mode (string), fan mode (string), heat setpoint (float), cool setpoint (float), thermostat state (string) and fan state (string). Commands sent from the OS layer to the connectivity layer must be in JSON format. The agent expects an acknowledgement message from the connectivity layer (0 = failure/1 = success).

Once the agent performs "identifyDevice", the connectivity layer is expected to send an acknowledgement back to the agent (0 = failure/1 = success).

RadioThermostat.PNG


2) Philips Hue

For Philips Hue devices, when a lighting agent performs "getDeviceStatus", the agent expects the following data from the device: status (string), color (int tuple), xy (double array), ct (int), brightness (int), hue (int), saturation (int), number_lights (int), colormode (string), effect (string). All data sent from the connectivity layer to the OS layer must be in JSON format.

When a lighting agent performs "setDeviceStatus", the agent sends the following command to the device: status (string), color (int tuple), brightness (int), effect (string). Commands sent from the OS layer to the connectivity layer must be in JSON format. The agent expects an acknowledgement message from the connectivity layer (0 = failure/1 = success).

Once the agent performs "identifyDevice", the connectivity layer is expected to send an acknowledgement back to the agent (0 = failure/1 = success).

Hue.PNG


3) WeMo Switch

For WeMo devices, when a plugload agent performs "getDeviceStatus", the agent expects the following data from the device: status (string). All data sent from the connectivity layer to the OS layer must be in JSON format.

When a plugload agent performs "setDeviceStatus", the agent sends the following command to the device: status (string). Commands sent from the OS layer to the connectivity layer must be in JSON format. The agent expects an acknowledgement message from the connectivity layer (0 = failure/1 = success).

Once the agent performs "identifyDevice", the connectivity layer is expected to send an acknowledgement back to the agent (0 = failure/1 = success).

WeMo.PNG


[Back to Developer Resources]

Clone this wiki locally