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

Sleep is Stretching the Time for Several Features #3581

Closed
3 tasks done
ascillato opened this issue Aug 25, 2018 · 5 comments
Closed
3 tasks done

Sleep is Stretching the Time for Several Features #3581

ascillato opened this issue Aug 25, 2018 · 5 comments
Labels
enhancement Type - Enhancement that will be worked on fixed Result - The work on the issue has ended

Comments

@ascillato
Copy link
Contributor

ascillato commented Aug 25, 2018

Describe the bug
A clear and concise description of what the bug is.

When activated, SLEEP feature is stretching the time in Tasmota used for several other features:

  • PULSETIME and BLINKTIME
  • TELEPERIOD
  • PULSETIME
  • LWT for MQTT (Leading to MQTT disconnections and reconnections)
  • UPTIME
  • RULETIMER

Also, make sure these boxes are checked [x] before submitting your issue - Thank you!

To Reproduce
Steps to reproduce the behavior:

Use Sleep command

Expected behavior
A clear and concise description of what you expected to happen.

Features to work close as they do when Sleep is 0.

Screenshots
If applicable, add screenshots to help explain your problem.

N/A

Additional context
Add any other context about the problem here.

The SLEEP feature is very useful so as to save Energy. As many of the smart automation devices are being powered all the time, any reduction in the device's energy consumption will led to a significant reduction of the power bill all year long as explained in the wiki at https://github.com/arendst/Sonoff-Tasmota/wiki/Energy-Saving#example-of-power-consumption
So, it is good to make some time corrections as to expand the use of SLEEP to as many as USE-CASES possible.

From the release notes, we can see that the use of SLEEP will not fit all the use-cases as there are several limitations as: Expect overall button/key/switch misses and wrong values on Sonoff Pow. Also, PWM Values could vary resulting in a flickering of the light's dimming and color. KNX needs sleep to be 0 in order to avoid losing any telegram. Nevertheless, a time correction will be very useful for allowing the use of SLEEP in other cases. Also, SLEEP can be turn on and off using rules, depending on the actual desired behaviour of the device.

A limitation of the SLEEP Feature of the ESP8266 is that only works using the ESP8266 Board Library v2.3.0. If Using 2.4.0, 2.4.1 or 2.4.2 the device freeze. According to Arduino issues, sleep feature still have problems because sleep is inside the espressif sdk.
So, regarding the ESP8266 Board Libraries:

  • v2.4.2(with lwIP 1.4): works great and fast but without sleep function.
  • v2.3.0(with lwIP 1.4): works great and have the sleep function working properly.

(Please, remember to close the issue when the problem has been addressed)

This was referenced Aug 25, 2018
@ascillato2 ascillato2 added the enhancement Type - Enhancement that will be worked on label Aug 25, 2018
@reloxx13
Copy link
Contributor

reloxx13 commented Aug 25, 2018

Ref. Arduino ESP Lib Sleep Issue:
esp8266/Arduino#4658

@arendst
Copy link
Owner

arendst commented Aug 25, 2018

Guys, try to keep this issue as clean as possible;

It's about the time stretch problem that Tasmota will need to solve.

It's NOT about the sleep command that fails on core 2.4.1 and 2.4.2. There are other issues about this "feature".

@arendst
Copy link
Owner

arendst commented Aug 25, 2018

Status update:

  • RULETIMER not observed during testing. Should not be an issue as it uses a different timing approach.
  • All other timings under investigation

arendst added a commit that referenced this issue Aug 26, 2018
6.1.1.11 20180826
 * Change scheduler phase 1 - Fixed when sleep is enabled: Uptime, Delay, PulseTime and TelePeriod (#3581)
arendst added a commit that referenced this issue Aug 26, 2018
 * Change scheduler phase 2/3 - Fixed when sleep is enabled: Blinktime (#3581)
 * Change scheduler phase 3/3 - Some sensor update timings: AdcEvery 200 -> 250, Senseair 300 -> 250, SDM120 300 -> 250, SDM630 300 -> 250
@arendst
Copy link
Owner

arendst commented Aug 26, 2018

As far as I can tell all sleep related timing issues should now be resolved in v6.1.1.11.

Pls test.

@ascillato
Copy link
Contributor Author

ascillato commented Aug 26, 2018

Tested.

Fix works great. Features works great using esplib v2.3.0

Thanks a lot 👍

@ascillato2 ascillato2 added the fixed Result - The work on the issue has ended label Aug 26, 2018
curzon01 pushed a commit to curzon01/Tasmota that referenced this issue Sep 7, 2018
6.1.1.11 20180826
 * Change scheduler phase 1 - Fixed when sleep is enabled: Uptime, Delay, PulseTime and TelePeriod (arendst#3581)
curzon01 pushed a commit to curzon01/Tasmota that referenced this issue Sep 7, 2018
 * Change scheduler phase 2/3 - Fixed when sleep is enabled: Blinktime (arendst#3581)
 * Change scheduler phase 3/3 - Some sensor update timings: AdcEvery 200 -> 250, Senseair 300 -> 250, SDM120 300 -> 250, SDM630 300 -> 250
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Type - Enhancement that will be worked on fixed Result - The work on the issue has ended
Projects
None yet
Development

No branches or pull requests

4 participants