I was able to flash TASMOTA on my NodeMCU and got it to switch on / off, 1 relay using both the TASMOTA UI and HA. Now, my Nodemcu is connected to a 4 channel relay. I assigned separate pins and could get those worked using the TASMOTA UI.
You need to figure out what the MQTT message that Tasmota requires to control each relay. I assume since (I assume…) your first relay is being successfully controlled by HA that the topics in your code are correct.
I believe there should be 3 other topics to publish to and subscribe to in order to control the 3 other relays and then retrieve their states.
So basically you will create 3 more switches just as you have above with those different command and state topics.
Hello, a question: when I sept in tasmota: Generic module to create node mcu with 4 relays they work according to each other. When I turn on one of them, the other goes off. For example: if I turn on the relay 1 while the number 3 is on, the latter goes out as soon as the relay 1 goes ON.
Is there any command to give in the console? Thank you
Hi, I installed tasmota generic module with 4 relays and 7 buttons. I set the switchtopic and the various switchmodes. When the mqtt server is turned on it works fine. When mqtt server is turned off, tasmota generic module behaves in another way it changes all my switches.
Thanks for posting your solution.
I copied and paste’ed your configuration above and the altered to suit my setup.
I was having a similar problem and found this and with a little tweeking I have mine working perfect!
Thanks