Tasmota GroupTopic and how to use this in OH2?

I am on OH2.5 with my PI3b

Trying to set two Sonoff Touch 3 Buttons to work somehow synchronized and activate a alarm rule in OH. Currently I use a dummy switch in the sitemap but I would like to add two Sonoff Touch switches activating the alarm rule.

  1. This means when I press button 1 on one of the Sonoff switch it should activate or mirror the same on the other Sonoff switch
  2. and how can I now use this in my OH rule? Is this now a group or a switch what I can identify for state change?

So first I need to assign with “GroupTopic yourgroupname” the two switches to the same group
but how to proceed, or is this nonsense?

Try using a Profile (follow) for the items and see if that fits your needs.

Follow Profile Info:
If one device should “follow” the actions of another device, this can be used. The term “follow” in this case means that any state that is sent to an Item will be forwarded from this Item to any linked Channel with the follow Profile. It takes state updates on an Item and sends them as a command onto the Channel. In the direction from the ThingHandler towards the Item, this Profile ignores state updates.

Example:

Switch Light { channel="Your_Item_Channel", channel="Your_Other_Item_Channel" [profile="follow"] }

1 Like

OK,
this means the item definition is already a little function it already takes care to synchronize the other item/channel , right?
And what with the other item do i just define the other item in the opposite direction, in order to synchronize e.g. two items in both directions?

OK I tested successfully! Thanks for this.

For the non-specialists :slight_smile:
My findings are you just add an item for two channels, what looks like this:

Switch E_Touch10_2 {channel="mqtt:topic:4e525484:E_Touch10_2", channel="mqtt:topic:28fd4b46:S_Touch90_2" [profile="follow"]}

and you don´t need to define the second item/channel separately

Result:
You only can use E_Touch10_2 in sitemap the other isn´t really existent, it just acts like the first one.
Same in the log when you switch S_Touch90_2 log shows switch E_Touch10_2 is switched.

So far so good, for my purpose OK
It is quick and easy to use!

Just to mention:
One thing I noticed that when playing arround Openhab gots some problems, suddenly additional
channels appeared in PaperUI>Control.
Couls only correct this by restarting my PI.

Check and see if you have simple mode turned on in PaperUI. If so you may want to turn that off so items are not automatically created.