arendst / Tasmota

Alternative firmware for ESP8266 and ESP32 based devices with easy configuration using webUI, OTA updates, automation using timers or rules, expandability and entirely local control over MQTT, HTTP, Serial or KNX. Full documentation at
https://tasmota.github.io/docs
GNU General Public License v3.0
22.08k stars 4.78k forks source link

LoadAvg increases to 100% on Dimmer devices #13280

Closed rbswift closed 3 years ago

rbswift commented 3 years ago

PROBLEM DESCRIPTION

A clear and concise description of what the problem is. On various Tasmota flashed devices using the Dimmer functionality, the LoadAvg either gradually or abruptly increases to 99% or 100%.

REQUESTED INFORMATION

Make sure your have performed every step and checked the applicable boxes before submitting your issue. Thank you!

- [ ] If using rules, provide the output of this command: `Backlog Rule1; Rule2; Rule3`:
```lua
  Rules output here:
04:41:42.406 MQT: stat/loungestep/RESULT = {"Rule1":{"State":"OFF","Once":"OFF","StopOnError":"OFF","Length":0,"Free":511,"Rules":""}}
04:41:42.608 MQT: stat/loungestep/RESULT = {"Rule2":{"State":"OFF","Once":"OFF","StopOnError":"OFF","Length":0,"Free":511,"Rules":""}}
04:41:42.819 MQT: stat/loungestep/RESULT = {"Rule3":{"State":"OFF","Once":"OFF","StopOnError":"OFF","Length":0,"Free":511,"Rules":""}}
- [ ] Set `weblog` to 4 and then, when you experience your issue, provide the output of the Console log:
```lua
  Console output here:
04:42:45.536 SRC: WebConsole from 192.168.188.35
04:42:45.539 CMD: Grp 0, Cmnd 'DIMMER', Idx 1, Len 3, Data '100'
04:42:45.544 MQT: stat/loungestep/RESULT = {"POWER":"ON","Dimmer":100}
04:43:00.837 WIF: Checking connection...
04:43:20.830 WIF: Checking connection...
04:43:40.833 WIF: Checking connection...
04:44:00.833 WIF: Checking connection...
04:44:20.832 WIF: Checking connection...
04:44:40.836 WIF: Checking connection...
04:44:54.085 MQT: tele/loungestep/STATE = {"Time":"2021-10-06T04:44:54","Uptime":"52T13:49:36","UptimeSec":4542576,"Heap":28,"SleepMode":"Dynamic","Sleep":10,"LoadAvg":99,"MqttCount":19,"POWER":"ON","Dimmer":100,"Fade":"ON","Speed":10,"LedTable":"OFF","Wifi":{"AP":1,"SSId":"Teh Interwebz","BSSId":"08:96:D7:8A:94:84","Channel":1,"Mode":"11n","RSSI":100,"Signal":-44,"LinkCount":12,"Downtime":"0T00:19:23"}}

TO REPRODUCE

Steps to reproduce the behavior: Various ESP2866 devices flashed with prebuilt Tasmota. I chart the LoadAvg using Grafana. Only the dimmable devices exhibit this problem. LoadAvg on on/off (non dimmable) devices is fine. The problem happens when the output status is on. normal LoadAvg is restored when the output is switched off. See chart below for example.

EXPECTED BEHAVIOUR

A clear and concise description of what you expected to happen. Documentation indicates "it is recommended to keep your device running at a LoadAvg value of 75 or lower"

SCREENSHOTS

If applicable, add screenshots to help explain your problem.

Screen Shot 2021-10-06 at 2 49 27 pm

ADDITIONAL CONTEXT

Add any other context about the problem here. I have tried various Sleep settings but haven't found anything that resolves the problem.

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

s-hadinger commented 3 years ago

This behavior is expected and normal because pwm is done in software on esp8266. We should amend the documentation.

rbswift commented 3 years ago

@s-hadinger ah OK, Thanks for clarifying. I haven't really studied how the PWM works but is it also normal to expect this when the dimmer is at 100% i.e. full brightness? And safe to allow the ESP to run at 100% LoadAvg for an extended period? i.e. no risk of overheating or something?

sfromis commented 3 years ago

LoadAvg is not CPU utilization percent, but a "more complex" number, and does not overload the processor. And yes, it is normal also at 100% PWM.