Hi folks,
I am using a NodeMCU Amica and running ESP Easy on it. I have connected a switch and a relay to its GPIO pins and am using a rule to toggle the relay. I am also using MQTT to control the relay.
It all works flawlessly until the ESP loses wifi connection. After that, using the physically connected button to toggle the relay works randomly for a few ~5-10 secs and then stops again.
Maybe because too busy trying to connect to WiFi and the MQTT server?
I would like it to work when it does not have any wifi connection.
Thanks!
Shashwat
Rules stop executing when there is no wifi
Moderators: grovkillen, Stuntteam, TD-er
-
- New user
- Posts: 1
- Joined: 09 Dec 2017, 12:54
-
- Normal user
- Posts: 587
- Joined: 18 Jun 2017, 11:02
- Location: Békéscsaba, Hungary
Re: Rules stop executing when there is no wifi
In Controller.ino there are an MQTTCheck() function, you can try to raise delay(1000) for ex: delay(20000) and recompile, than you can see if it helps.shashwat767 wrote: ↑09 Dec 2017, 13:04 It all works flawlessly until the ESP loses wifi connection. After that, using the physically connected button to toggle the relay works randomly for a few ~5-10 secs and then stops again.
Maybe because too busy trying to connect to WiFi and the MQTT server?
I would like it to work when it does not have any wifi connection.
WifiCheck() occcurs every 30seconds at ESPEasy.ino, you can try to hack it also in the runEach30Seconds() but i think that the MQTT connection will be the slowest point.
-
- Core team member
- Posts: 9905
- Joined: 01 Sep 2017, 22:13
- Location: the Netherlands
Re: Rules stop executing when there is no wifi
Maybe the MQTTConnect function should suggest a delay to the MQTTCheck based on the availability of WiFi.
Who is online
Users browsing this forum: Anthropic Claude Bot [bot], opensiteexplorer.org/dotbot [bot] and 15 guests