Skip to content

API between UI layer and OS layer

ARIbemoss edited this page May 11, 2017 · 1 revision

Back to Developer Resources


All communications between the UI layer and the OS layer happens through the Information Exchange Bus, where the messages are communicated to each other using defined topics.

General Topic Syntax for communicating between UI and OS layer:

/sender/receiver/<device_type>/<operation>/<building_name>/<zone_id>/<agent_id>

The following are the two available operations:

  1. update
  2. device_status

Example:

If the UI wants to request the status of a particular device, say, a thermostat, to the agent, the following message topic would be used:

 /ui/agent/thermostat/device_status/bemoss/999/1THMASF2323ASD

If the agent is sending a response to the UI layer for this device status, the following message topic would be used for communication:

 /agent/ui/thermostat/device_status_response/bemoss/999/1THMASF2323ASD

With these these, messages are transferred using the JSON format.

Example: Status message of a thermostat, or an update message to thermostat may contain similar message content:

{'temperature': 70, 'heat_setpoint': 75, 'cool_setpoint': 65, 'thermostat_mode': 'HEAT', 'fan_mode': 'AUTO'}

Back to Developer Resources

Clone this wiki locally