Break out of Wifi setup/connection loop

Hello,

I have a wemos D1 mini nodemcu which is installed in a ‘pretty’ crucial setup. It sits between my thermostat and boiler and sniffes OpenTherm messages and changes/creates additional messages to the boiler and thermostat ( for my custom diy multi-zone heating system ). However sometimes when the wifi signal gets bad/disconnects the following occurs :

  • After some time the wemos reboots
  • Wemos tries to reconnect to bad wifi, and stays in ‘wifi’ connection loop ( setup loop?)

What I need is that the system breaks out the ‘setup’/wifi loop after x tries, and starts with the main loop. This is crucial because otherwise the communication between thermostat and boiler is lost, and everything gets into an error state.

Are their any suggestions on how to break out of the setup/wifi loop? Or even turn off wifi completely at boot/startup

Thanks,

Have you seen reboot_timeout ? You can disable it by setting it to 0s.

Have you looked at other ways that might improve connectivity like setting a static/fixed ip on both the esp and your router, and using fast connect? May help…

Hi Mahko,

Thanks for your reply and suggestions!!
I’ve looked into the reboot_timeout indeed, but this does not solve the problem for me. Improving the connection is desirable, but now the system is dependending on it. The system must also function reliable when the connection is bad/weak, and at the moment this is not the case unfortunately.

I came along this thread, that would be perfect :

Unfortunately is has not been merged(yet?)
Or are there other ways to implement this in the current release?

Do you know if ap mode might help?

Hi Mahko,

Thanks for your help. I just tried it, but unfortunately it’s not helping. After a couple of times it sets up the fallback hotspot, but it keeps hanging in the initial wifi connect loop ( auth expired loop ).

I don’t think i’m able to solve to issue whatsoever, unless there will be a possibility to skip this boot/wifi initialization loop after a couple of tries…

1 Like

If you don’t get any more ideas here you could try asking on Discord.