Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WBEC box not constantly available after upgrade to 0.41 #12

Closed
oldgitdaddy opened this issue Oct 22, 2021 · 14 comments
Closed

WBEC box not constantly available after upgrade to 0.41 #12

oldgitdaddy opened this issue Oct 22, 2021 · 14 comments

Comments

@oldgitdaddy
Copy link

After upgrade and reset, the availbility of wbec is really limited. It got even worse. Ping to wbec is also loosing packages. Any advice is appreciated. Do other users have a similar impression regarding the stability after the upgrade?

Cheers!

@zivillian
Copy link

I'm pretty sure, your ESP is dying with out-of-memory - you can confirm this, by connecting to the serial console. Do you use the web interface? As far as I've observed it, the async webserver alone may use more memory than available.

@oldgitdaddy
Copy link
Author

I do not really use the web interface. So if there is a way to switch this off to save memory, I am happy to do so. Good point, I will connect the serial port and check the memory usage. Potentially, I need to go back to version 0.40, as this was working almost without glitches.

@oldgitdaddy
Copy link
Author

Just a quick update. I have turned the version back to 0.4.0 and it works again. So I guess it would be good to have the option to turn off parts of wbec, so that everyone can use it in a tailored and optimized way. @steff393: What do you think?

@steff393
Copy link
Owner

Hi,

up to now I didn't face such behavior in my setup with 0.4.1.
The differences between 0.4.0 and 0.4.1 are only

Turning features on/off by config is already considered, where possible, e.g.

  • MQTT only when IP and loadpoint are configured
  • RFID only when IDs are provided in rfid.txt
  • Powerfox only when credentials are configured
  • ...

I also don't think that "out-of-memory" (RAM?) is the reason. The biggest RAM consumption is the powerfox component (for HTTPS). This needs ca. 9k of RAM. I assume you don't use powerfox, so this whole, huge area is still available and can be used.

When RAM is out, it will not lead to bad WiFi connection. Instead the ESP will do a reboot (within some seconds), so it would be available again afterwards.
Indicators for "SW still running and not stuck":

  • the blue LED near to D0 will flicker every 10s (cfgMbCycleTime)
  • the Wallbox is not starting the "Timeout blink pattern" (6x white, 3x blue)

Looking to the serial interface could clarify if there are resets/reboots or not. The WiFi connection is handled by the ESP-SW itself. Unfortunately I don't know how I could influence here the behavior at loss of connection or similar...

@oldgitdaddy
Copy link
Author

oldgitdaddy commented Oct 24, 2021

Ok. So in case this is just a wifi problem, would there be a chance to add LAN connectivity to wbec? That would eliminate a lot of potential problems also in the future.

@oldgitdaddy
Copy link
Author

oldgitdaddy commented Oct 24, 2021

Regarding Wifi connectivity, did you consider to put avoid wifi sleep mode like this:
WiFi.setSleepMode(WIFI_NONE_SLEEP);

Currently 19% of the network packages (via ping) are lost.

@steff393
Copy link
Owner

LAN would be great ;-) But it's unfortunately not possible with ESP8266. Maybe it would have been a better idea to directly start with the ESP32, which seems to have support for LAN.
Up to now, I didn't use this setSleepMode command, but I can introduce it.

@oldgitdaddy
Copy link
Author

oldgitdaddy commented Oct 26, 2021

So over the past days, wbec worked just fine with 0.40.0. I also turned back to the default configuration (mqtt off). I had almost no package losses. It is really strange, as my setup did not change at all. I am really hesitant to update it. We probably may consider to wait for further feedback from other users regarding the latest version.

@steff393
Copy link
Owner

Strange... Do you now have the official 0.4.0 or the test SW for #9, which I provided you via mail (0.4.0+)?
Up to now there are

  • 15 downloads of the 0.4.1
  • 48 downloads of the 0.4.0

@oldgitdaddy
Copy link
Author

I am now back to 0.4.0.

@steff393
Copy link
Owner

I had a look to the setSleepMode documentation. It seems to be relevant, when there is no WiFi communication for 10s.

10s is also the default interval for wbec to poll the box and then send the values over MQTT. Maybe changing the cfgMbCycleTime from 10s to 3s in cfg.json could help to stabilize the connection.

@oldgitdaddy
Copy link
Author

Ok. I will apply observe and report. Thanks!

@steff393
Copy link
Owner

steff393 commented Nov 1, 2021

wbec 0.4.2 will have an optional parameter cfgWifiSleepMode:
"cfgWifiSleepMode":0 => WIFI_NONE_SLEEP
"cfgWifiSleepMode":1 => WIFI_LIGHT_SLEEP
"cfgWifiSleepMode":2 => WIFI_MODEM_SLEEP
If it has a different value or is not set at all, then there's no change (i.e. WiFi.setSleepMode() is then not called).

@oldgitdaddy
Copy link
Author

I have installed now version 0.4.2. Will report on the long-term behavior of wbec, but until now it is looking well.

You may consider to update the wiki regarding the additional configuration.

Let´s close the discussion here then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants