I have a Tasmota 8.2 client with 2 Relays here - connected to a local MQTT Server.
I can easily access the client via HTTP and it pushes all commands via MQTT to the MQTT Server.
I get all of these messages in Node-Red and can read and use it for different actions inside NR.
BUT ... I am not able to send the same command I can trigger by pressing the Web-Button on the HTTP-Device (turn ON / turn OFF) via Node-Red.
The MQTT message arrives at Node-Red in this format: topic: stat/PV_01_Front/POWER1 msg: ON
Unfortunately I cannot create the same message using the MQTT node, because all I can set is the TOPIC-parameter, but no message or text or anything.
Has someone already found a way to make this work ?
BR
G
As described in the Info panel for the MQTT Out node, the value to publish is picked up from msg.payload. So all you need to do is to set msg.topic to the MQTT topic you want to send to and set msg.payload the value you want to send ("ON" for example) and pass it to the MQTT Out node.
That isn't the right topic to control when using tasmotta, that is the status topic it responds on, you have to use the related command topic to set it.
I had to switch the topic from stat/PV_01_Front/POWER1 to cmnd/PC_01_Front/POWER1 and it was necessary to inject msg.payload = ON or OFF into the MQTT Node