The O3 MQTT broker allows access to read and write to any BACnet objects - including EnOcean-related BACnet objects - within the O3. These allow custom integration beyond the standard topics included in the O3.
Registering Objects
Before you can read and write BACnet objects on MQTT, you must first register them. This tells the O3 that you want to receive MQTT messages when these objects change, and configures it to send them.
Registering an Object
To register CSV901999, publish ["CSV901999"]
to commands/object/register
. This will create a new MQTT topic events/object/CSV901999
which will update as this CSV object's Present Value changes.
Registering Other Properties
To register a property other than Present Value, include the property in the register command. For example, ["CSV901999.Description"]
will link to the Description property of the CSV object.
Registering Multiple Objects
To register multiple objects publish an array of all the references, such as ["CSV901999","CSV301996","BV301998"]
.
Each time commands/object/register
is called, it will register the objects you send. This will not remove previously registered objects.
When the O3 resets, it will clear the list of registered objects. Ensure your application is able to register objects when it initially connects to the O3, or add logic to send the register command when an object topic is not available.
Reading Objects
Once objects have been registered, new MQTT topics under events/object/ObjectInstance
will start reporting the object values, where ObjectInstance is the object (and optionally property) which was registered.
Writing to Objects
To write to objects which have been registered, send the object value as the data attribute, e.g. {"data": "77.7"}
, to the topic commands/object/ObjectInstance
.
Only Present Value can be written - other object properties will not allow the write to apply.
The object value must be sent as a string - i.e. "77.7"
not 77.7
Writes will occur at priority 13 in BACnet
Relinquishing Writes
To clear the value which was sent to the object (relinquish it) write a value of NULL to the object, e.g. send {"data": NULL}
, to the topic commands/object/ObjectInstance
.
This will clear the priority array entry at priority 13, leaving the other priority entries as they are.
Comments
0 comments
Please sign in to leave a comment.