-->
Page 1 of 1

Sonoff (with ESP8266) modified firmware

PostPosted: Thu Dec 01, 2016 5:59 am
by Guillaume Neraudeau
Hi everybody!

I bought sonoff modules (electrical relay modules with ESP8266)
With the original firmware i couldn’t do what i want (for example use domoticz) so i decided to flash the original firmware with another that i found here http://www.superhouse.tv/17-home-automation-control-with-sonoff-arduino-openhab-and-mqtt/
I used the “BasicOTARelay.ino” witch allow me to control Sonoff with MQTT messages.
But my problem is if I have a wifi issues, i can't control anything. So I would like to use th switch button (integrated on the module on GPIO0) to turn ON/OFF the relay and the LED. I tempted to modify the *.ino code with function "INPUT_PULLUP" in program's loop but Sonoff doesn't receive MQTT messages anymore...
I'm not very strong in programming, and i'm sure that the solution is near, and i need some help.
You will find in attached "BasicOTARelayTV (original).ino" with witch MQTT messages are OK but the integrated button isn’t active and "BasicOTARelayTV (original).ino" with witch i can activate LED and relay with integrated button, but MQTT messages doesn't work anymore. (maybe the loop blind sequence with MQTT…)
Thanks in advance for your help

Guillaume