- Posts: 18
- Thank you received: 0
swisscore wrote: Yes you can, with all esp8266 module you have normally more than 1 GPIO, just the ESP-01 who is the moste difficult to use because of special function of GPIO (prog,boot) you need to have nothing in input and fixed level as output.
swisscore wrote: You need to add code in your esp8266 to manage a new topic, per example topic1 = relay1, topic 2 = relay2
And in easyiot you declare 2 différents button one with topic1 and the other with topic2
Send topic1 = "ON" per example from easyiot and in your code when you see "topic1", read the "ON" and like this you know you need to turn ON the relay1 who is linked to topic1 (in your esp8266) and the same for the topic2
swisscore wrote: you have only one input to read datas from MQTT sender and after in your code you can read it and put something like "
if receivedTopic = topic1 then Relay1 = ON/OFF
else if receivedTopic = topic2 then Relay2 = ON/OFF
I use with C++ and arduino IDE code, I don't know in lua