Tasmota Switch node

Hello everyone,
I need your help and I have a device with two switchable relays. I would like to switch the channels via 2 switches like in the, example "Tasmota Switch node" "node-red-contrib-tasmota (node) - Node-RED"

Does anyone have an example project? I would appreciate any help. Thanks.

My Version

Does anyone have an example project? I would appreciate any help. Thanks.

image (1)

I do not use the tasmota node, but simple mqtt in and out nodes with several tasmota based plugs and other devices. So maybe I do not understand, what your problem is.

Hi @Kellerkind and welcome to the forum.

I use Node-red, I use Tasmota switches.

Tasmota is built around MQTT.
To toggle switch 1 just publish a message to topic cmnd/<device>/POWER1 with payload TOGGLE (or similar), where <device> is whatever you set as the topic in the Tasmota web console.
You can control all aspects of the device from Node-red using MQTT, you can request status messages.
There are hundreds of commands available, documented at https://tasmota.github.io/docs/Commands/

Node-red has built-in MQTT publish and subscribe nodes, it even has it's own broker, Aedes (though mosquitto is better) so I have never understood what node-red-contrib-tasmota can contribute.

If the maintainer of the node is reading this, perhaps you can explain?

Here is a simple flow that turns a light on and off. The Tasmota MQTT config is like this
image

[{"id":"3c49b4a6872e6aab","type":"mqtt out","z":"071230c942fdb8e9","name":"","topic":"","qos":"","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"91cc30a194bcd3b5","x":590,"y":200,"wires":[]},{"id":"e9c2d5f117d9860d","type":"group","z":"071230c942fdb8e9","name":"First switch ON/OFF","style":{"label":true},"nodes":["e216363fd9a1e162","ef2ecb45a1f01815"],"x":34,"y":59,"w":332,"h":122},{"id":"e216363fd9a1e162","type":"inject","z":"071230c942fdb8e9","g":"e9c2d5f117d9860d","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"cmnd/gosund/1/POWER1","payload":"ON","payloadType":"str","x":200,"y":100,"wires":[["3c49b4a6872e6aab"]]},{"id":"ef2ecb45a1f01815","type":"inject","z":"071230c942fdb8e9","g":"e9c2d5f117d9860d","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"cmnd/gosund/1/POWER1","payload":"OFF","payloadType":"str","x":210,"y":140,"wires":[["3c49b4a6872e6aab"]]},{"id":"c5a76183bf96209c","type":"group","z":"071230c942fdb8e9","name":"Second switch  TOGGLE","style":{"label":true},"nodes":["0e91ee3523850cf6"],"x":34,"y":199,"w":352,"h":82},{"id":"0e91ee3523850cf6","type":"inject","z":"071230c942fdb8e9","g":"c5a76183bf96209c","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"cmnd/gosund/1/POWER2","payload":"TOGGLE","payloadType":"str","x":220,"y":240,"wires":[["3c49b4a6872e6aab"]]},{"id":"343a9db87c5392dc","type":"group","z":"071230c942fdb8e9","name":"Get results back","style":{"label":true},"nodes":["e59fdc3de33a9f94","2276d2094c871e23"],"x":34,"y":299,"w":472,"h":82},{"id":"e59fdc3de33a9f94","type":"mqtt in","z":"071230c942fdb8e9","g":"343a9db87c5392dc","name":"","topic":"stat/gosund/1/RESULT","qos":"2","datatype":"auto-detect","broker":"91cc30a194bcd3b5","nl":false,"rap":true,"rh":0,"inputs":0,"x":160,"y":340,"wires":[["2276d2094c871e23"]]},{"id":"2276d2094c871e23","type":"debug","z":"071230c942fdb8e9","g":"343a9db87c5392dc","name":"debug 12","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":400,"y":340,"wires":[]},{"id":"91cc30a194bcd3b5","type":"mqtt-broker","name":"Glasspi","broker":"192.168.1.11","port":"1883","clientid":"","autoConnect":true,"usetls":false,"protocolVersion":"4","keepalive":"60","cleansession":true,"autoUnsubscribe":true,"birthTopic":"","birthQos":"0","birthRetain":"false","birthPayload":"","birthMsg":{},"closeTopic":"","closeQos":"0","closeRetain":"false","closePayload":"","closeMsg":{},"willTopic":"","willQos":"0","willRetain":"false","willPayload":"","willMsg":{},"userProps":"","sessionExpiry":""}]
3 Likes

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