Hi Guys,
I have flashed the R120 ESP Easy to my Sonoff switch. I want to use it with MQTT and the HTTP commands. The device connects to me network and MQTT as well.
But I cannot get the relay working. Can somebody send me screenshots of how to configure the device? I have seen somebody doing it as Input Switch, other as Output, and I am confused. I know it is GPIO12.
Can you also tell me what is the exact topic and message I should send over MQTT to activate it?
I also tried the following:
http://192.168.1.116/control?cmd=giop,12,1 but I am getting "Unknown or restricted command!" message back.
Regards,
Csongor
Sonoff relay config
Moderators: grovkillen, Stuntteam, TD-er
Re: Sonoff relay config
Sorry, I just realized I miss typed GPIO in the URL. That is working correctly, I can turn the relay on and off using HTTP.
Re: Sonoff relay config
A bit more info: the MQTT setup is definitely working. I created 2 System Info devices and they are sending the uptime and wifi strength info to MQTT without any issues.
So my only remaining info is how to turn the relay on and off over MQTT.
So my only remaining info is how to turn the relay on and off over MQTT.
Re: Sonoff relay config
Hi All,
It seems just be talking to myself the issue resolved itself. I found another reference saying that the MQTT topic is:
/<device name>/gpio/12 and the payload is 1 or 0 to turn it on and off. So I presume this is a general way to write the gpio pins regardless of the device configuration on the ESP.
Cheers,
It seems just be talking to myself the issue resolved itself. I found another reference saying that the MQTT topic is:
/<device name>/gpio/12 and the payload is 1 or 0 to turn it on and off. So I presume this is a general way to write the gpio pins regardless of the device configuration on the ESP.
Cheers,
Who is online
Users browsing this forum: Bing [Bot] and 23 guests