Sonoff Touch / Tasmota / MQTT


as a reader of the forum I want to place a request here because I can’t find anything appropriate to my question:

I have the following setting:

  • Openhab3
  • 2x Sonoff Touch with 1 channel each
  • 1x Light Bulb

On Sonoff Touch #1 I connected the light bulb

The desired solution should be:
I can control the light bulb from both Sonoff Touch switches. If one switches it ON then the other Sonoff Touch should also go in “ON” state. Then any of the two switches can switch the bulb off again.

I did the following:

  • Create 2 things for both Sonoff devices
  • Create a channel on each Sonoff device
  • create 1 Item Light Bulb
  • Link both channels to the Light Bulb and assigned profile “Follow” (to follow the state change).

Having this setup leads to an endless flickering of the relais / bulb.

Did I miss something here? Is there anything wrong in my thinking?

Any help is appreciated!

The root of the problem. You’ve got three separate devices, which can be in any combination of start states. Try setting up an Item to represent each device to begin with, and when that is working we can look at condensing to less.

Well, actually I have two devices. The Sonoff Touch has an internal connection between the switch and the relais as far as I understand. I’m not sure if I should create either:

  • Three items (sonoff switch 1, sonoff switch 2, light bulb) having in mind, that the switch 1 and the bulb is practically the same.
  • Two items (sonoff switch 1 and sonoff switch 2) where sonoff switch 1 is equivalent to the light bulb.

Tasmota can do that.

have a look at this.

Thank you. I knew that Tasmota can do this. But I want to do it in OpenHab.

Just for the records - if anybody has the same issue - I came up now with the following solution.

  • Adding Two Items (Sonoff switch 1 and Sonoff switch 2)
  • Creating a Group “Group Light Bulb”
  • Adding two rules:
  • Rule1: When a member of “Group Light Bulb” changes from On to Off send command Off to “Group Light Bulb”
  • Rule2: When a member of “Group Light Bulb” changes from Off to On send command On to “Group Light Bulb”

It is not very beautiful but it does the job…