Tasmota not responding from HA

Hello,
I have setup an esp8266 with GPIO4 as switch2 and GPIO5 as a relay1.

image

The ESP has latest tasmota firmware version 9.2.

I am able to see the status of the switch2 (if it’s off or on) but when I press the switch1 from HA the relay does not react. I am using the Tasmota Integration.

If I press the toggle button from tasmota menu it reacts correctly.

I suspend its something with the last version and the setoption114.

I must also mention that I have setup the relay1 with a pulsetime 10 (1sec) just like inching.
Your opinions please?

They work in pairs

Relay1 - switch1 or switch_n1

Relay2 - switch2 or switch_n2

So on and so on

1 Like

If in any specific rare situation you want to use switch2 with relay1, you will have to use rules.

thank you both for your comments.
I know and I understand how tasmota works.

What I am saying is that although tasmota toogle switch is working as desired (from tasmota’s interface) the same switch doesn’t work from HA lovelace. I am using Tasmota’s integration with option19 = 0

Is the state of the switch in HA changing respectively when you turn on and off the switch from tasmota UI?

Hello,
Hope you are well.

Yes it does change respectively. However the opposite is not happening.
When I turn on and off the switch from HA nothing happens.

i am good. Thanks fo asking.
Check the tasmota log when you turn on and off the switch from HA.

no logs.
it seems nothing passes to tasmota

Which means that it is an issue with how the command topic might be set. Please share what is the tasmota console log when you switch the relay on and off in tasmota UI.

here it is

12:58:20 HTP: Main Menu
12:58:27 SRC: WebGui from 192.168.2.245
12:58:27 MQT: SIGMA-Alarm-Panel/tele/STATE = {"Time":"2021-02-19T12:58:27","Uptime":"0T22:15:54","UptimeSec":80154,"Heap":20,"SleepMode":"Dynamic","Sleep":0,"LoadAvg":999,"MqttCount":1,"POWER":"ON","Wifi":{"AP":1,"SSId":"makis home","BSSId":"E4:8D:8C:4D:0C:05","Channel":1,"RSSI":64,"Signal":-68,"LinkCount":1,"Downtime":"0T00:00:03"}}
12:58:27 MQT: SIGMA-Alarm-Panel/tele/RESULT = {"POWER":"ON"}
12:58:27 MQT: SIGMA-Alarm-Panel/tele/POWER = ON (retained)
12:58:28 SRC: PulseTimer
12:58:28 MQT: SIGMA-Alarm-Panel/tele/STATE = {"Time":"2021-02-19T12:58:28","Uptime":"0T22:15:55","UptimeSec":80155,"Heap":20,"SleepMode":"Dynamic","Sleep":0,"LoadAvg":999,"MqttCount":1,"POWER":"OFF","Wifi":{"AP":1,"SSId":"makis home","BSSId":"E4:8D:8C:4D:0C:05","Channel":1,"RSSI":64,"Signal":-68,"LinkCount":1,"Downtime":"0T00:00:03"}}
12:58:28 MQT: SIGMA-Alarm-Panel/tele/RESULT = {"POWER":"OFF"}
12:58:28 MQT: SIGMA-Alarm-Panel/tele/POWER = OFF (retained)
12:58:29 MQT: SIGMA-Alarm-Panel/tele/RESULT = {"Switch2":{"Action":"ON"}}

I notice that your device only has tele messages. I dont know if that is ok. With my device I get stat messages like this.

17:32:24.056 MQT: sonoff17abz/tele/STATE = {"Time":"2021-02-19T17:32:24","Uptime":"0T00:32:31","UptimeSec":1951,"Heap":27,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":1,"POWER1":"OFF","POWER2":"ON","Wifi":{"AP":1,"SSId":"ASALAM RESIDENCE MOTOROLA","BSSId":"78:11:DC:34:C5:0C","Channel":2,"RSSI":78,"Signal":-61,"LinkCount":1,"Downtime":"0T00:00:03"}}
17:32:24.060 MQT: sonoff17abz/stat/RESULT = {"POWER1":"OFF"}
17:32:24.062 MQT: sonoff17abz/stat/POWER1 = OFF
17:32:25.819 MQT: sonoff17abz/tele/STATE = {"Time":"2021-02-19T17:32:25","Uptime":"0T00:32:32","UptimeSec":1952,"Heap":27,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":1,"POWER1":"ON","POWER2":"ON","Wifi":{"AP":1,"SSId":"ASALAM RESIDENCE MOTOROLA","BSSId":"78:11:DC:34:C5:0C","Channel":2,"RSSI":78,"Signal":-61,"LinkCount":1,"Downtime":"0T00:00:03"}}
17:32:25.825 MQT: sonoff17abz/stat/RESULT = {"POWER1":"ON"}
17:32:25.830 MQT: sonoff17abz/stat/POWER1 = ON

Do you have any other tasmota devices integrated with this addon? if yes check thee logs.

I am using MQTT Explorer and I noticed that HA is trying to send command to different Topic
I also noticed that Home Assistant is sending command to /POWER1 as your example.

within Tasmota the command is sent to a different topic.

Is HA sending the command like SIGMA-Alarm-Panel/cmnd/POWER1 ?

Exactly!! It sends the command like SIGMA-Alarm-Panel/cmnd/POWER1
I didn’t know how to correct it so I gave up the switch card.

Instead I am using the service mqtt.publish and I able to turn on / off the switch as expected
here is the action I am using

  action:
  - service: mqtt.publish
    data:
      topic: SIGMA-Alarm-Panel/tele/cmnd/POWER
      payload: 'ON'

This is right. You just need to turn on SetOption26 in tasmota. Go to tasmota UI and type SetOption26 1 press enter. Restart the tasmota and try HA.

Also another thing, is the mqtt topic of the switch SIGMA-Alarm-Panel/tele?

I turned on SetOption26 but nothing happens.

What do you mean?

here is my mqtt settings

Please make this as your full topic.

%topic%/%prefix%/

Thank you so much!
Problem is solved!

I also corrected my action’s topic command to the following:

  action:
  - service: mqtt.publish
    data:
      topic: SIGMA-Alarm-Panel/cmnd/Power1
      payload: 'ON'
1 Like