Giter VIP home page Giter VIP logo

Comments (16)

psy0rz avatar psy0rz commented on July 22, 2024

that is indeed very bad. this is with 2.0.0-dev7?

from espeasy.

rolfz avatar rolfz commented on July 22, 2024

I do not think there was any change between the last release and 2.0.0-dev7 regarding the "connect" routine. But I will give it a try to be sure with one of my sensors.

from espeasy.

rolfz avatar rolfz commented on July 22, 2024

I confirm, no change with the latest version.

from espeasy.

psy0rz avatar psy0rz commented on July 22, 2024

Yep all i needed to know that it was 2.0.0-dev7 or newer. I'll look into it and fix it. (going to use deep sleep on battery's myself as well)

from espeasy.

rolfz avatar rolfz commented on July 22, 2024

Any news on the battery drain in sleep mode when router is not reachable ?

from espeasy.

psy0rz avatar psy0rz commented on July 22, 2024

still didnt get to it:(

from espeasy.

psy0rz avatar psy0rz commented on July 22, 2024

working on the wifi stuff right now (making it more efficient and fixing issues)

from espeasy.

psy0rz avatar psy0rz commented on July 22, 2024

there where various issues with it. it also was trying to connect to SSID2, even though it wasnt defined. this resulted in 6 connection attempts, which takes ages.

now it will only do one connection attempts on the main SSID, and another one on SSID2 if its defined.

also serial logging is much more clear now.

try it and let me know if you have any issues. :)

from espeasy.

rolfz avatar rolfz commented on July 22, 2024

Thank you ! Could you please give some details on how the ESPEasy should behave now. I my case, It tried to connect until battery was gone if there was no Router in view. If we use sleep mode, I would understand it would try again after the sleep time, means if if my router is switched off during the night, the ESPEasy would still have tried during the night, bot not non-stop. Maybe I can follow your changes, I guess you modified Espeasy.ino and wifi.ino!

from espeasy.

psy0rz avatar psy0rz commented on July 22, 2024

As far as i could see it would try to connect 6 times, almost taking a minute in total.

New behaivior: Try to connect 1 time (and 1 time to ssid2 if its defined), do stuff (even if connection fails), sleep again.

I didnt test with any controllers and timeouts for that, so i will test that as well now.

from espeasy.

rolfz avatar rolfz commented on July 22, 2024

from espeasy.

psy0rz avatar psy0rz commented on July 22, 2024

I tested with one sysinfo device to http domoticz, while using a non-existing SSID:

INIT : Booting version: 
FS   : Mounting...
FS   : Mount successful, used 72288 bytes of 957314
INIT : Free RAM:25592
INIT : I2C
INIT : SPI not enabled
WIFI : AP Mode disabled
IP   : Static IP :192.168.13.92
WIFI : Connecting blah attempt #1
WIFI : Could not connect to AP!
WIFI : AP Mode enabled, reachable on 192.168.4.1
INIT : Rebooted from deepsleep #37
WD   : Uptime 0 ConnectFailures 0 FreeMem 20320
SYS  : 0.00
HTTP : connection failed
SLEEP: Entering deep sleep...
EVENT: System#Sleep

This took almost 20 seconds. So if your sleep delay is 60 seconds, it will have a dutycycle of 25%.

Now here's what we could do: If it cant connect, just go back to deepsleep immeadeatly without doing anything. I'll think i add an option for this. We should also make controllers smart so that they dont try to connect when there's no connection.

from espeasy.

rolfz avatar rolfz commented on July 22, 2024

ok, I usually use sleep time of 10 minutes (600secs). An option "goto deep sleep if connection fails" would be a good solution!

from espeasy.

psy0rz avatar psy0rz commented on July 22, 2024

Ok added a new option for this. will document it on wiki.

from espeasy.

rolfz avatar rolfz commented on July 22, 2024

from espeasy.

psy0rz avatar psy0rz commented on July 22, 2024

i'm using Ubuntu 16.04.2 LTS, with platformio.

from espeasy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.