Platform information:
- Hardware: Raspi 4B
- OS: Linux/5.4.79-v7l+ (arm)
- Java Runtime Environment: 11.0.9 (Zulu11.43+88-CA)
- openHAB version: 3.1.0 “Build #2123”
I run several Tasmota devices via MQTT Autodiscovery, everything is running as it should except the Sonoff 4CH Pro.
All Things and Items are UI configured!
I am switching 2 channels of the device with a rule.
@rule("Vorhaus")
@when("Item VorhausTouch_state changed")
def Vorhaus(event):
events.sendCommand("Vorhaus_DC074E_5FRL_5F1_Switch", "ON" if event.itemState == ON else "OFF")
events.sendCommand("Vorhaus_DC074E_5FRL_5F2_Switch", "ON" if event.itemState == ON else "OFF")
The Log look like this
2021-01-10 17:56:51.811 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'VorhausTouch_state' received command ON
2021-01-10 17:56:51.813 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'VorhausTouch_state' predicted to become ON
2021-01-10 17:56:51.819 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'VorhausTouch_state' changed from OFF to ON
2021-01-10 17:56:51.829 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'Vorhaus_DC074E_5FRL_5F1_Switch' received command ON
2021-01-10 17:56:51.835 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'Vorhaus_DC074E_5FRL_5F2_Switch' received command ON
2021-01-10 17:56:51.839 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Vorhaus_DC074E_5FRL_5F1_Switch' predicted to become ON
2021-01-10 17:56:51.845 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Vorhaus_DC074E_5FRL_5F2_Switch' predicted to become ON
2021-01-10 17:56:51.852 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Vorhaus_DC074E_5FRL_5F1_Switch' changed from OFF to ON
2021-01-10 17:56:51.855 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Vorhaus_DC074E_5FRL_5F2_Switch' changed from OFF to ON
2021-01-10 17:56:51.948 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Vorhaus_DC074E_5FRL_5F2_Switch' changed from ON to OFF
2021-01-10 17:56:51.970 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Vorhaus_DC074E_5FRL_5F2_Switch' changed from OFF to ON
and the Tasmota console
17:56:51 MQT: stat/tasmota_vorhaus/RESULT = {"POWER1":"ON"}
17:56:52 MQT: stat/tasmota_vorhaus/POWER1 = ON
17:56:52 MQT: stat/tasmota_vorhaus/RESULT = {"POWER2":"ON"}
17:56:52 MQT: stat/tasmota_vorhaus/POWER2 = ON
As you can see in the log, the Switch ‘Vorhaus_DC074E_5FRL_5F2_Switch’ does the command twice but in the Tasmota console just once.
If i change the Items in the Rule and trigger the Switch ‘Vorhaus_DC074E_5FRL_5F2_Switch’ first, the other Switch does the Command twice.
This happen only with the Sonoff 4CH, two Sonoff Basic with the same Rule are working.
If i set up the MQTT Chanels manualy with the same Rule (different Items) the behavior is as it should be.
@rule("Vorhaus")
@when("Item VorhausTouch_state changed")
def Vorhaus(event):
events.sendCommand("IPAdressen_SchalterTest1", "ON" if event.itemState == ON else "OFF")
events.sendCommand("IPAdressen_SchalterTest2", "ON" if event.itemState == ON else "OFF")
The log shows this
17:43:01 MQT: stat/tasmota_vorhaus/RESULT = {"POWER1":"ON"}
17:43:01 MQT: stat/tasmota_vorhaus/POWER1 = ON
17:43:01 MQT: stat/tasmota_vorhaus/RESULT = {"POWER2":"ON"}
17:43:01 MQT: stat/tasmota_vorhaus/POWER2 = ON
Could this be a Bug?