Invalid MQTT comand on startup of Tasmota Devide

Hi,

Using node-red version v1.3.5 on a raspberry PI, I have a problem with a Tasmota device (Shelly) which I connected to node-red:

On startup of the device, and sometimes during the day the devices turns off both power switches due to an invalid command:

10:10:22.704 SRC: MQTT
10:10:22.707 CMD: Grp 0, Cmd 'BACKLOG POWER1 ON; PWÔWER2 ON', Idx 1, Len 1, Pld 1, Data '1'
10:10:23.001 MQT: stat/BoilerAnbau/RESULT = {"Command":"Unknown"}
10:10:23.042 SRC: MQTT
10:10:23.044 CMD: Grp 0, Cmd 'BACKLOG', Idx 1, Len 22, Pld -99, Data 'POWER1 OFF; POWER2 OFF'
10:10:23.092 SRC: Backlog
10:10:23.094 CMD: Grp 0, Cmd 'POWER', Idx 1, Len 3, Pld 0, Data 'OFF'
10:10:23.098 MQT: stat/BoilerAnbau/RESULT = {"POWER1":"OFF"}
10:10:23.101 MQT: stat/BoilerAnbau/POWER1 = OFF
10:10:23.103 SRC: MQTT
10:10:23.105 CMD: Grp 0, Cmd '', Idx 1, Len 9, Pld -99, Data 'POWER1 ON'
10:10:23.110 MQT: stat/BoilerAnbau/RESULT = {"Command":"Unknown"}
10:10:23.142 SRC: MQTT
10:10:23.144 CMD: Grp 0, Cmd 'POWER', Idx 1, Len 3, Pld 0, Data 'OFF'
10:10:23.149 MQT: stat/BoilerAnbau/RESULT = {"POWER1":"OFF"}
10:10:23.152 MQT: stat/BoilerAnbau/POWER1 = OFF
10:10:23.193 SRC: MQTT
10:10:23.195 CMD: Grp 0, Cmd 'POWER', Idx 2, Len 1, Pld 0, Data '0'
10:10:23.201 MQT: stat/BoilerAnbau/RESULT = {"POWER2":"OFF"}
10:10:23.203 MQT: stat/BoilerAnbau/POWER2 = OFF
10:10:23.426 SRC: Backlog
10:10:23.428 CMD: Grp 0, Cmd 'POWER', Idx 2, Len 3, Pld 0, Data 'OFF'
10:10:23.433 MQT: stat/BoilerAnbau/RESULT = {"POWER2":"OFF"}
10:10:23.437 MQT: stat/BoilerAnbau/POWER2 = OFF
10:10:25.232 QPC: Reset

Problem is the expression "PWÔWER2" in the 2nd line above. I suspect that this wrong command is somewhere cached in node-red. I experimented with this command once and apparently made typo, but then later removed it everywhere.

Here is what I already tried:

  • re-create all "BoilerAnbau" nodes -> no success
  • re-create the mqtt server -> no success
  • searched ALL flows for the wrong command above -> not found
  • factory reset of the tasmota device -> no success
  • stopped node-red (using node-red-stop) and restarted tasmota device -> error still shows in the console
  • disabled mqtt in tasmota device -> error does not show
  • intentionally configured a wrong MQTT IP address in Tasmota device -> error does not show

It seems strange to me, that the error shows up, when I stopped node-red, but not when a wrong IP adress was configured!

Is there anybody who can help with that problem?

Thanks
Heinz

Most likely the "old" message with the typo is stored on your mqtt server with the flag retained.
Install a tool like Mqttexplorer ,browse to the topic (cmnd/BoilerAnbua.... and stat/BoilerAnbua...) and delete the message.

Thank you so much! That was it!

So, when i do node-red-stop, the mqtt server still runs? On my raspberry I cannot find an mqtt processes.

Nice that you solved the problem.
Mqtt server is separate from NR.
The most used Mqtt server is Mosquitto, take a look if you can find a process that named something like that.
Keep in mind that restarting the Mqtt (Mosquitto) server will not solve these kind of problems. All messages are stored in the Mosquitto database and after restart the retained message will be published right away from this database.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.