Note, in the first half of 2023, this rule template will be rewritten to only support JS Scripting.
This is one of three rules used to create an MQTT Even Bus. The other rules are MQTT Online Status and MQTT Event Bus Subscribe.This rule is responsible for parsing the messages received on an event bus and commanding or updating Items as necessary. See MQTT 2.5+ Event Bus for details on how to set up and configure an MQTT Even Bus.
Warning, to avoid infinite loops, do not publish and subscribe the same event on the same Items.
|Linked to device||updates||commands|
The rule has the following parameters:
|MQTT Broker Thing||Select the MQTT Broker Thing to publish to.|
|openHAB instance name||The name of this openHAB instance, will be used as the root of the topic events are published to.|
|Command Group||The Group whose member’s commands are published to the event bus.|
|Update Group||The Group who memember’s updates are published to the event bus.|
- MQTT Binding installed
- MQTT Broker Thing created and configured
- A Group containing those Items who should have their commands published.
- A Group containing those Items who should have their updates published.
- In OH 4 the Nashorn add-on needs to be separately installed or change the script type to
- adjusted for breaking change, will no longer work for versions of OH prior to December 15th
- Made compatible with Nashorn and JSScripting
Note: will remove support for Nashorn sometime after OH 3.2 release.
- initial release