I am trying to link two OH systems using MQTT and the new v2 MQTT binding.
Specifically I have items in the source system that have event trigger channels, for example when the paddle on a light switch is tapped it triggers a channel event “ON”.
I know how to link items to MQTT but how do I link a channel trigger to MQTT? Since there is no item definition, there is nowhere to link a channel trigger to a channel on an MQTT thing.
I know I could do this with rules but that would require creating a dummy item, linking the dummy to the MQTT channel then writing a rule to capture the channel trigger event, and command the dummy item. Messy and time consuming to set up.
Also, on the other end, the OH instance that will consume the MQTT events, I see how I can add an event trigger channel to a broker but this makes no sense to me since the event is clearly a ‘property’ of a specific thing.
For example, in addition to raising events when a paddle is pressed on a light switch, the light switch also reports it’s state linked to a standard item. On the consumer instance I set up a topic representing the light switch and add a channel to consume the status updates, but as far as I can see I cannot add an event trigger ‘type’ channel to this topic thing. Instead I would have to add all of these triggers to the base broker which will be very messy and fragments the channels that are all actually part of the same base thing.
How do I add an event trigger channel to an MQTT topic to avoid this mess?
So really two questions in one. Thanks in advance.