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.19k stars 4.81k forks source link

Battery value 0% wrongly being ignored #17950

Closed AleXSR700 closed 1 year ago

AleXSR700 commented 1 year ago

PROBLEM DESCRIPTION

A clear and concise description of what the problem is. I described the issue here: https://github.com/pvvx/ATC_MiThermometer/issues/294

It seems that Tasmota is ignoring (and hence not processing or forwarding via mqtt) battery data if the value is a rounded 0%.


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:

15:53:52.563 CMD: status 0 15:53:52.573 MQT: stat/tasmota_D2EE70/STATUS = {"Status":{"Module":0,"DeviceName":"ESP32-WROOM-32D_DevKitC_v4_1","FriendlyName":["ESP32-WROOM-32D_DevKitC_v4_1"],"Topic":"tasmota_D2EE70","ButtonTopic":"0","Power":0,"PowerOnState":3,"LedState":1,"LedMask":"FFFF","SaveData":1,"SaveState":1,"SwitchTopic":"0","SwitchMode":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"ButtonRetain":0,"SwitchRetain":0,"SensorRetain":0,"PowerRetain":0,"InfoRetain":0,"StateRetain":0,"StatusRetain":0}} 15:53:52.591 MQT: stat/tasmota_D2EE70/STATUS1 = {"StatusPRM":{"Baudrate":115200,"SerialConfig":"8N1","GroupTopic":"tasmotas","OtaUrl":"http://ota.tasmota.com/tasmota32/release/tasmota32.bin","RestartReason":"Software reset CPU","Uptime":"5T23:28:45","StartupUTC":"2023-02-09T15:25:07","Sleep":50,"CfgHolder":4617,"BootCount":56,"BCResetTime":"2022-12-15T14:52:37","SaveCount":98}} 15:53:52.606 MQT: stat/tasmota_D2EE70/STATUS2 = {"StatusFWR":{"Version":"12.2.0.6(bluetooth)","BuildDateTime":"2022-12-09T11:56:01","Core":"2_0_5_3","SDK":"v4.4.3","CpuFrequency":160,"Hardware":"ESP32-D0WDQ6-V3 rev.3","CR":"481/699"}} 15:53:52.617 MQT: stat/tasmota_D2EE70/STATUS3 = {"StatusLOG":{"SerialLog":0,"WebLog":2,"MqttLog":0,"SysLog":0,"LogHost":"","LogPort":514,"SSId":["BaumlerlangenHA24",""],"TelePeriod":3600,"Resolution":"558980C0","SetOption":["00008009","2805C80001000600003C5A0A192800000000","00000080","00006000","00004002","00000000"]}} 15:53:52.638 MQT: stat/tasmota_D2EE70/STATUS4 = {"StatusMEM":{"ProgramSize":1603,"Free":1792,"Heap":26,"StackLowMark":3,"PsrMax":0,"PsrFree":0,"ProgramFlashSize":4096,"FlashSize":4096,"FlashChipId":"1640D8","FlashFrequency":40,"FlashMode":"DIO","Features":["00000809","8F9AC7C7","00148001","000000CF","010013C0","C0000981","00004080","00200000","5400082C","00000080"],"Drivers":"1,2,3,4,5,7,8,9,10,12,16,20,21,24,26,27,29,35,38,50,52,59,62,79,85","Sensors":"1,2,3,5,6,52,62,127"}} 15:53:52.659 MQT: stat/tasmota_D2EE70/STATUS5 = {"StatusNET":{"Hostname":"tasmota-D2EE70-3696","IPAddress":"192.168.0.214","Gateway":"192.168.0.1","Subnetmask":"255.255.255.0","DNSServer1":"192.168.0.1","DNSServer2":"0.0.0.0","Mac":"94:B9:7E:D2:EE:70","IP6Global":"2a02:810d:a200:688:96b9:7eff:fed2:ee70","IP6Local":"fe80::96b9:7eff:fed2:ee70","Webserver":2,"HTTP_API":1,"WifiConfig":4,"WifiPower":17.0}} 15:53:52.675 MQT: stat/tasmotaD2EE70/STATUS6 = {"StatusMQT":{"MqttHost":"192.168.0.2","MqttPort":1883,"MqttClientMask":"DVES%06X","MqttClient":"DVES_D2EE70","MqttUser":"mqtt","MqttCount":1,"MAX_PACKET_SIZE":1200,"KEEPALIVE":30,"SOCKET_TIMEOUT":4}} 15:53:52.692 MQT: stat/tasmota_D2EE70/STATUS7 = {"StatusTIM":{"UTC":"2023-02-15T14:53:52","Local":"2023-02-15T15:53:52","StartDST":"2023-03-26T02:00:00","EndDST":"2023-10-29T03:00:00","Timezone":99,"Sunrise":"07:58","Sunset":"18:09"}} 15:53:52.705 MQT: stat/tasmota_D2EE70/STATUS10 = {"StatusSNS":{"Time":"2023-02-15T15:53:52"}} 15:53:52.719 MQT: stat/tasmota_D2EE70/STATUS11 = {"StatusSTS":{"Time":"2023-02-15T15:53:52","Uptime":"5T23:28:45","UptimeSec":516525,"Heap":29,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":1,"Berry":{"HeapUsed":26,"Objects":357},"Wifi":{"AP":1,"SSId":"BaumlerlangenHA24","BSSId":"06:31:92:E7:DC:7E","Channel":1,"Mode":"11n","RSSI":92,"Signal":-54,"LinkCount":1,"Downtime":"0T00:00:06"}}} 15:53:52.742 MQT: stat/tasmota_D2EE70/STATUS12 = {"StatusSTK":{"Exception":28,"Reason":"LoadProhibited","EPC":"4001a917","EXCVADDR":"000ca55e","CallChain":["4001a914","40055fe1","4001ab0f","4004450f","4019f9b5","40042386","40088dd8","40019d11","40055b4d","40197ba7","40198218"]}} 15:53:54.406 MQT: stat/tasmota_D2EE70/SENSOR = {"Time":"2023-02-15T15:53:54","ATC0d5c0c":{"alias":"xiaomi_office","mac":"a4c1380d5c0c","Temperature":14.8,"Humidity":66.7,"DewPoint":8.6,"Btn":1,"Battery":78,"RSSI":-61},"TempUnit":"C"} 15:53:57.044 MQT: stat/tasmota_D2EE70/SENSOR = {"Time":"2023-02-15T15:53:57","ATC8f1b4f":{"alias":"xiaomi_kitchen","mac":"a4c1388f1b4f","Temperature":15.3,"Humidity":67.9,"DewPoint":9.4,"Btn":1,"Battery":85,"RSSI":-55},"TempUnit":"C"} 15:53:59.239 MQT: stat/tasmota_D2EE70/SENSOR = {"Time":"2023-02-15T15:53:59","ATC801437":{"alias":"xiaomi_dining_room","mac":"a4c138801437","Temperature":15.9,"Humidity":64.2,"DewPoint":9.2,"Btn":1,"Battery":80,"RSSI":-80},"TempUnit":"C"} 15:54:00.442 MQT: stat/tasmota_D2EE70/SENSOR = {"Time":"2023-02-15T15:54:00","ATC80f246":{"alias":"xiaomi_walk_in","mac":"a4c13880f246","Temperature":14.7,"Humidity":71.4,"DewPoint":9.6,"Btn":1,"Battery":64,"RSSI":-81},"TempUnit":"C"} 15:54:00.740 MQT: stat/tasmota_D2EE70/SENSOR = {"Time":"2023-02-15T15:54:00","ATCf28078":{"alias":"xiaomi_living_room","mac":"a4c138f28078","Temperature":15.1,"Humidity":69.7,"DewPoint":9.5,"Btn":1,"Battery":87,"RSSI":-77},"TempUnit":"C"} 15:54:01.444 MQT: stat/tasmota_D2EE70/SENSOR = {"Time":"2023-02-15T15:54:01","ATC76598c":{"alias":"xiaomi_master_bedroom","mac":"a4c13876598c","Temperature":14.0,"Humidity":77.8,"DewPoint":10.2,"Btn":1,"Battery":81,"RSSI":-80},"TempUnit":"C"}

- [ ] Set `weblog` to 4 and then, when you experience your issue, provide the output of the Console log:
```lua
  Console output here:

TO REPRODUCE

Steps to reproduce the behavior:

EXPECTED BEHAVIOUR

A clear and concise description of what you expected to happen. Process and Send all data as received by device

SCREENSHOTS

If applicable, add screenshots to help explain your problem.

ADDITIONAL CONTEXT

Add any other context about the problem here.

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

Jason2866 commented 1 year ago

Needed Infos not provided.

AleXSR700 commented 1 year ago

First post updated :)

Jason2866 commented 1 year ago

Transferring to discussions. Not a bug.