Difference between revisions of "Open Control Architecture"

From Open Source Controls Wiki
Jump to navigation Jump to search
Line 10: Line 10:
*Within Node-RED, data and attributes are stored within the '''''global.readings''''' object.
*Within Node-RED, data and attributes are stored within the '''''global.readings''''' object.
*Data within the readings object is nested according to the topic (excluding the node as more than one node may publish data on a device).
*Data within the readings object is nested according to the topic (excluding the node as more than one node may publish data on a device).
<pre>
  e.g. a message with a topic '''''myNetwork'''/'''node123'''/'''myDevice'''/'''dat'''/'''outputTemperature'''''  would be stored in '''''readings'''.'''myNetwork'''.'''myDevice'''.'''dat'''.'''outputTemperature'''.'''value'''''
  e.g. a message with a topic '''''myNetwork'''/'''node123'''/'''myDevice'''/'''dat'''/'''outputTemperature'''''  would be stored in '''''readings'''.'''myNetwork'''.'''myDevice'''.'''dat'''.'''outputTemperature'''.'''value'''''
*<br />
 
  e.g. The same '''''readings'''.'''myNetwork'''.'''myDevice'''.'''dat'''.'''outputTemperature''''' object would contain the following values:
  e.g. The same '''''readings'''.'''myNetwork'''.'''myDevice'''.'''dat'''.'''outputTemperature''''' object would contain the following values:
</pre>

Revision as of 16:11, 29 May 2022

The Open Controls described on this site works as follows:

  • Communications between systems is performed using MQTT using a standardised 5 level topic structure. network / node / device / group / key.
  • A device managing communications is called a node.
  • Data from within a node or from connected devices is assigned a local network identifier of "local" so that the node can separate internal traffic and readings from general traffic. This is stored under global.localNetworkId
  • The external network identifier is stored under global.networkId
  • The node identifier is stored under global.node
  • Attributes for data may be loaded from a central index (GitHub hosted), providing additional information such as units and descriptions. This is to avoid the need to locally describe data, and to assist in compatibility.
  • Controls software is written in Node-RED.
  • Within Node-RED, data and attributes are stored within the global.readings object.
  • Data within the readings object is nested according to the topic (excluding the node as more than one node may publish data on a device).
 e.g. a message with a topic '''''myNetwork'''/'''node123'''/'''myDevice'''/'''dat'''/'''outputTemperature'''''  would be stored in '''''readings'''.'''myNetwork'''.'''myDevice'''.'''dat'''.'''outputTemperature'''.'''value'''''

 e.g. The same '''''readings'''.'''myNetwork'''.'''myDevice'''.'''dat'''.'''outputTemperature''''' object would contain the following values: