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.16k stars 4.8k forks source link

PzemAc 1 error 9 - reading pzem values intermittently #19556

Closed IVCrossway closed 1 year ago

IVCrossway commented 1 year ago

PROBLEM DESCRIPTION

Tasmota with a PZEM016 Sensor is not reporting data correctly since yesterday. Rebooting the tasmota+pzem didn't change anything.

REQUESTED INFORMATION

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

- [X] If using rules, provide the output of this command: `Backlog Rule1; Rule2; Rule3`:
```lua
20:02:49.547 CMD: Grp 0, Cmd 'BACKLOG', Idx 1, Len 19, Pld -99, Data 'Rule1; Rule2; Rule3'
20:02:49.570 SRC: Backlog
20:02:49.574 CMD: Grp 0, Cmd 'RULE', Idx 1, Len 0, Pld -99, Data ''
20:02:49.580 MQT: stat/tasmota_8C5B15/RESULT = {"Rule1":{"State":"OFF","Once":"OFF","StopOnError":"OFF","Length":0,"Free":511,"Rules":""}}
20:02:49.790 SRC: Backlog
20:02:49.793 CMD: Grp 0, Cmd 'RULE', Idx 2, Len 0, Pld -99, Data ''
20:02:49.800 MQT: stat/tasmota_8C5B15/RESULT = {"Rule2":{"State":"OFF","Once":"OFF","StopOnError":"OFF","Length":0,"Free":511,"Rules":""}}
20:02:50.041 SRC: Backlog
20:02:50.044 CMD: Grp 0, Cmd 'RULE', Idx 3, Len 0, Pld -99, Data ''
20:02:50.053 MQT: stat/tasmota_8C5B15/RESULT = {"Rule3":{"State":"OFF","Once":"OFF","StopOnError":"OFF","Length":0,"Free":511,"Rules":""}}
- [X] Set `weblog` to 4 and then, when you experience your issue, provide the output of the Console log:
```lua
  Console output here:
19:57:59.403 PAC: PzemAc 1 error 9
19:57:59.476 WIF: Sending Gratuitous ARP
19:58:00.401 DMP: 01 04 14 08 32 08 E5 00 00 12 EC 00 00 52 08 00 01 00 F4 00 5A 00 00 92 D3
19:58:00.403 PAC: PzemAc 1 error 9
19:58:01.401 DMP: 01 04 14 08 32 08 E5 00 00 12 EC 00 00 52 09 00 01 01 F4 00 5A 00 00 92 D3
19:58:01.403 PAC: PzemAc 1 error 9
19:58:01.768 WIF: Checking connection...
19:58:02.401 DMP: 01 04 14 09 32 08 E9 00 00 12 DE 00 00 52 0A 00 01 00 F4 00 5A 00 00 04 92
19:58:02.403 PAC: PzemAc 1 error 9
19:58:03.401 DMP: 01 04 14 09 30 08 D4 00 00 12 C6 00 00 52 0A 00 00 01 F4 00 5A 00 00 8C FE
19:58:03.403 PAC: PzemAc 1 error 9
19:58:04.401 DMP: 01 04 14 09 30 08 BD 00 00 12 85 00 00 52 0A 00 01 00 F4 00 5A 00 00 D8 21
19:58:04.403 PAC: PzemAc 1 error 9
19:58:05.401 DMP: 01 04 14 08 30 08 BD 00 00 12 85 00 00 52 0A 00 01 00 F4 00 5A 00 00 D8 21
19:58:05.403 PAC: PzemAc 1 error 9
19:58:06.401 DMP: 01 04 14 09 3A 08 D5 00 00 12 BA 00 00 52 0A 00 01 00 F4 00 5A 00 00 BB 5A
19:58:06.403 PAC: PzemAc 1 error 9
19:58:07.401 DMP: 01 04 14 09 3A 08 C4 00 00 12 9C 00 00 52 0A 00 01 01 F4 00 5A 00 00 91 A9
19:58:07.403 PAC: PzemAc 1 error 9

TO REPRODUCE

Not really a way to reproduce. It just happend randomly.

EXPECTED BEHAVIOUR

Tasmota should read pzem values as always. Insted it randomly switches between reading values and reading 0 reporting "pzemac 1 error 9".

SCREENSHOTS

Here you can see the sensor reporting correct values until today. Today it started to measure uncorrectly. pzem voltage immagine immagine

ADDITIONAL CONTEXT

Add any other context about the problem here.

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

barbudor commented 1 year ago

If you haven't changed anything in Tasmota (firmware, version, setting) it could be a hardware problem Check anything about wiring, connections... Something may have become loose or damaged over time

IVCrossway commented 1 year ago

Well basically the problem solved itself today. Tasmota is reading correctly everytime. No more error 9 in the logs. Just something strange happened with Home Assistant that now is reporting two entity for each value (like pzem.energy0 / pzem.energy1).

And now the two entity disappered, so now i just have pzem.energy_*... I can't really understand what's happening...

And now.... the zeros reading are back.