Wifi Reconnect: Will Update to 2.0 help?

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
henfri
Normal user
Posts: 13
Joined: 26 May 2018, 15:53

Wifi Reconnect: Will Update to 2.0 help?

#1 Post by henfri » 28 Nov 2021, 10:38

Hello,

I have an ESP8266 running ESP_Easy_mega-20180524_normal_ESP8266_1024.bin.
The only thing it does is to set the PWM of one Pin according to a value that I send by MQTT. But it took me quite a while to figure that out....

Now, I have the problem, that the wifi connection is instable. RSSI is -82db.
As I use mqtt short interruptions are no issue and also the reaction of the device is not time critical. But sometimes, the Device just does not re-connect after having lost the connection.
What I did so far:
- Set up a Fallback Wifi (same credentials)
- Added a rule that I found in this forum

Code: Select all

on System#Boot do
    Let,1,0                              // set user variable to initial state of 0         
EndOn
 
on Wifi#Disconnected do              	 // if no wifi, wait 3 minutes
  if [VAR#1]=0
    timerSet,1,180
    Let,1,1                              // set user variable 1 to 1 to prevent re-set of var1 on each event.
  endif
endon
 
on Wifi#Connected do     	 	 // if wifi returns, cancel reboot
  timerSet,1,0                    	 // cancel timer
  Let,1,0                                // set user variable 1 to 0
endon
 
On Rules#Timer=1 do                    	 // if still no Wifi, reboot
  reboot
endon
Still, I have this issue.

Now, I was wondering, if in ESPEasy 2.0 this could be improved, but due to space constraints, I cannot update OTA (even not with ESPEasy_2step_UploaderMega_1024.bin).
So, I would need a wired connection, which is not easy in this case.

Can someone tell me, if an update would improve the above mentioned issue?
Appart from the wired connection: I think I would loose all settings. Is there a way to backup them in 1.x and restore them in 2.x?

Best regards,
Hendrik



One remark on the Wiki::
2.0+ firmware on 1MB modules - Warning
If you are running the stock Mega edition firmware on 1MB modules, you will find that you can no longer load newer images because there's insufficient free space to upload the image (344kB as of 2.0.0.-Dev 9 edition). You can compile smaller images to solve this issue or use a small image that has been build just to upload newer images. So you would always have to use a two-step process to renew using OTA on 1MB modules. Using the uploader image as an in-between step, you can use images up to 604kB.
Only devices with 1Mb or more flash are supported.
To use OTA you need more then 1Mb of flash. (otherwise your device will get unreachable via wireless and you need to fix it via serial)
You lose all your config settings if you upgrade from an Rxxx version. (from before ESPEasy v2.0)
So, I tried with the ESPEasy_2step_UploaderMega_1024.bin. But even for that, the Flash is too small. I found then in github, that ESPEasy_2step_UploaderMega_1024.bin only works with smaller releases than the "_normal_" that I have installed.

I think that a note on this in the wiki would make sense.

henfri
Normal user
Posts: 13
Joined: 26 May 2018, 15:53

Re: Wifi Reconnect: Will Update to 2.0 help?

#2 Post by henfri » 28 Nov 2021, 12:14

Here the github Issue I was referring to
https://github.com/letscontrolit/ESPEasy/issues/2757

User avatar
Ath
Normal user
Posts: 3417
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Wifi Reconnect: Will Update to 2.0 help?

#3 Post by Ath » 28 Nov 2021, 13:31

There are good reasons to get an upgrade to the latest ESPEasy:
- Arduino core versions have had a lot of fixes/improvements in the WiFi area
- TD-er has improved WiFi stability (and auto-reconnect) in ESPEasy a lot
- Having an RSSI of -82 is indeed quite poor, for me that works out well only for an ESP-01S that is located at the outer-bounds of my WiFi range, Wemos D1 mini's and similar usually won't handle an RSSI below -80 very well

You are running a normal build, that indeed isn't easy to update on 1MB modules (not sure what hardware you are using though), you could create a Custom build that only has the plugins and controllers you need, and so might give a better chance for a 2-step OTA update, it would probably best to try with a spare unit first, to see if it actually fits. Upgrading to a 4MB ESP8266 (or ESP32) could also be a feasible option, these supports OTA even for the largest .bin sizes (the TEST builds, and ESP32_MAX builds for 16MB flash size).
If you need to go with standard builds, then a minimal..._FHEM_HA (or Domoticz if using that) build could be a good and small .bin file choice, there the MQTT support is included, but still optimized for small size, that should support 2-Step OTA as well. (I have not used 2-Step OTA myself a lot, but use OTA all the time after the initial load.)

It is quite likely that the settings will be preserved automatically when upgrading (either wired or OTA), as that has been tested quite well too, but always backup your settings and rules before starting the upgrade, to be able to easily revert if it might fail. If it doesn't auto-upgrade, that can be caused by a mismatch of the file-system size. Uploading the original config.dat file and rules in the new firmware should then result in a successful upgrade.

The reboot feature you have implemented in rules has become a standard feature of ESPEasy, except for not having a configurable time-out setting (AFAICS).
/Ton (PayPal.me)

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Wifi Reconnect: Will Update to 2.0 help?

#4 Post by TD-er » 28 Nov 2021, 13:51

Switching to 802.11 b/g only mode (tools -> Advanced page, but might not yet be present in 2018 builds) may give you some extra headroom in RSSI levels.
The RSSI will not improve, but the WiFi connection may be more stable at low RSSI values.

N.B. some access points also allow you to switch to b/g only mode, but this will limit the WiFi speed for all connected clients to 54 Mbps.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 30 guests