Just imagine that I want to share this demo to my 2 other raspberry pi. How can I do that? I mean, each of them (among my rasps) will only affect several specific items on my sole demo.
Can anyone help me? Please?
I’m very appreciated!
you want to use the same sitemap to work for all three OH instances
The short answer is you can’t. Each instance of OH will have its own version of the sitemap. However, you can create one OH instance as the “master” and use the MQTT Event Bus to synchronize all three instances and host the sitemap only from the “master”.
yes that was my intention, I mean I want to use three separate rasps, each of them will only affect several items of OH instance ( as the ‘master’ like you said)
Example Configurations
Example configuration for a event bus binding, which sends all commands to an MQTT broker and receives status updates from that broker. This scenario could be used for example to link 2 openHAB instances together where the master instance sends all commands to the slave instance and the slave instance sends all status updates back to the master. The example below shows an example configuration for the master node.
mqtt-eventbus:broker=m2m-eclipse
mqtt-eventbus:commandPublishTopic=/openHAB/out/${item}/command
mqtt-eventbus:stateSubscribeTopic=/openHAB/in/${item}/state
So according to the master example, is ‘m2m-eclipse’ is the slave-broker’s name?
I searched the openhab.cfg and I couldn’t find available any section for Event Bus Binding. Is this binding supported by OH 1.8.3? Or I just simply copy and paste the above code into MQTT Binding section? I suppose so because the Event Bus is mentioned in MQTT Binding
Thanks for your instruction! However I still can not find any section for event bus
Here is the ‘“MQTT Transport”’ section
```javascript
################################# MQTT Transport ######################################
#
# Define your MQTT broker connections here for use in the MQTT Binding or MQTT
# Persistence bundles. Replace <broker> with a id you choose.
#
# URL to the MQTT broker, e.g. tcp://localhost:1883 or ssl://localhost:8883
mqtt:mymosquitto.url=tcp://localhost:1883
# Optional. Client id (max 23 chars) to use when connecting to the broker.
# If not provided a default one is generated.
mqtt:mymosquitto.clientId=openhab
# Optional. User id to authenticate with the broker.
# mqtt:<broker>.user=<user>
# Optional. Password to authenticate with the broker.
#mqtt:<broker>.pwd=<password>
# Optional. Set the quality of service level for sending messages to this broker.
# Possible values are 0 (Deliver at most once),1 (Deliver at least once) or 2
# (Deliver exactly once). Defaults to 0.
mqtt:mymosquitt.qos=0
# Optional. True or false. Defines if the broker should retain the messages sent to
# it. Defaults to false.
mqtt:mymosquitto.retain=true
# Optional. True or false. Defines if messages are published asynchronously or
# synchronously. Defaults to true.
mqtt:mymosquitto.async=true
# Optional. Defines the last will and testament that is sent when this client goes offline
# Format: topic:message:qos:retained <br/>
#mqtt:<broker>.lwt=<last will definition>
Ok! Since I didn’t find any line started with #mqtt-eventbus… inside openhab.cfg so I merely copied and pasted those code inside the MQTT transport section. I hope it would work in the futute, thanks a lot for your quick reply koshak