Example sketches for the new Arduino IDE for ESP8266

Moderator: igrr

User avatar
By SwiCago
#62231 Hi Kanyo, agree ESP related updates should be in this thread, not on Hadleys page. His great for discussion. Anyhow, sure do a fork on my git and make some changes you think may work. I can then review them and we can then merge. And yes the MQTT example would be great. And yes I agree .loop() makes sens, but make it a copy of .sync(), in that loop just calls sync. That way either sync or loop work and works with what ever conventions people are used to.
I do want to add a auto detect of communication loss, so that it will auto re-connect. This would be good for power cycle, power outage or unknown loss of comms event. But I'll wait to add that until we can merge. Don't want to be too far out of sync again with someone else.
User avatar
By Albertooo
#62289 Hi Kayno,Al,

I've been testing the circuit with Kayno's code. Sometimes it happens that when the state of makina is "on" and the heat state and command the same mode by mqtt for example {"mode" = "HEAT"} the machine shuts off and on the contrary (sometimes it happens randomly). Also sometimes (I think s because the esp8266 is sometimes restarted) the machine turns on with values ​​like 28 for heat and 24 for air conditioning. For the rest it seems perfect.

Regards!!!!