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
21.98k stars 4.77k forks source link

Pzem AC, sometimes all value show = 0 #6050

Closed ninhvanthang closed 5 years ago

ninhvanthang commented 5 years ago
### BUG DESCRIPTION i'm using pzem-004T V3 with sonoff basic to measure power, i've just upgrade from 6.5 to 6.6 and got bug of sensor, sometime all values show 0 on tasmota ### REQUESTED INFORMATION _Make sure these boxes are checked before submitting your issue. Thank you_ **FAILURE TO COMPLETE THE REQUESTED INFORMATION WILL RESULT IN YOUR ISSUE BEING CLOSED** - [x] Read the [Contributing Guide and Policy](https://github.com/arendst/Sonoff-Tasmota/blob/development/CONTRIBUTING.md) and [the Code of Conduct](https://github.com/arendst/Sonoff-Tasmota/blob/development/CODE_OF_CONDUCT.md) - [x] Searched the problem in issues (https://github.com/arendst/Sonoff-Tasmota/issues) - [x] Searched the problem in the wiki (https://github.com/arendst/Sonoff-Tasmota/wiki/Troubleshooting) - [x] Searched the problem in the forum (https://groups.google.com/d/forum/sonoffusers) - [x] Searched the problem in the chat (https://discord.gg/Ks2Kzd4) - [x] Device used (i.e. Sonoff Basic) : sonoff basic - [x] Tasmota binary firmware version number used : ____ / pre-compiled - [x] Development IDE - Compiler / Upload tools used : ____ / pyflasher - [x] Provide the output of command ``status 0`` : ``` STATUS 0 OUTPUT HERE: 23:22:53 CMD: status 0 23:22:53 SRC: WebConsole from 192.168.1.121 23:22:53 RSL: Received Topic /status, Data Size 1, Data 0 23:22:53 RSL: Group 0, Index 1, Command STATUS, Data 0 23:22:53 MQT: stat/powermeter/STATUS = {"Status":{"Module":1,"FriendlyName":["Sonoff"],"Topic":"powermeter","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],"ButtonRetain":0,"SwitchRetain":0,"SensorRetain":0,"PowerRetain":0}} 23:22:53 MQT: stat/powermeter/STATUS1 = {"StatusPRM":{"Baudrate":9600,"GroupTopic":"sonoffs","OtaUrl":"http://thehackbox.org/tasmota/release/sonoff.bin","RestartReason":"Software/System restart","Uptime":"0T01:26:40","StartupUTC":"2019-07-09T14:56:13","Sleep":50,"CfgHolder":4617,"BootCount":18,"SaveCount":59,"SaveAddress":"F8000"}} 23:22:53 MQT: stat/powermeter/STATUS2 = {"StatusFWR":{"Version":"6.6.0.1(sonoff)","BuildDateTime":"2019-07-09T21:54:47","Boot":31,"Core":"2_5_2","SDK":"2.2.2-dev(c0eb301)"}} 23:22:53 MQT: stat/powermeter/STATUS3 = {"StatusLOG":{"SerialLog":0,"WebLog":4,"SysLog":2,"LogHost":"","LogPort":514,"SSId":["THANGA",""],"TelePeriod":60,"Resolution":"558180C0","SetOption":["00008009","280500000100060000005A00000000000000","00000000"]}} 23:22:53 MQT: stat/powermeter/STATUS4 = {"StatusMEM":{"ProgramSize":420,"Free":580,"Heap":27,"ProgramFlashSize":1024,"FlashSize":1024,"FlashChipId":"1440E0","FlashMode":3,"Features":["00000809","00802182","04008000","0000001D","000002C0"]}} 23:22:53 MQT: stat/powermeter/STATUS5 = {"StatusNET":{"Hostname":"powermeter-7470","IPAddress":"192.168.1.129","Gateway":"192.168.1.1","Subnetmask":"255.255.255.0","DNSServer":"192.168.1.1","Mac":"5C:CF:7F:AF:5D:2E","Webserver":2,"WifiConfig":4}} 23:22:53 MQT: stat/powermeter/STATUS6 = {"StatusMQT":{"MqttHost":"192.168.1.138","MqttPort":1883,"MqttClientMask":"DVES_%06X","MqttClient":"DVES_AF5D2E","MqttUser":"hassio","MqttCount":1,"MAX_PACKET_SIZE":1000,"KEEPALIVE":30}} 23:22:53 MQT: stat/powermeter/STATUS7 = {"StatusTIM":{"UTC":"Tue Jul 09 16:22:53 2019","Local":"Tue Jul 09 23:22:53 2019","StartDST":"Sun Mar 31 02:00:00 2019","EndDST":"Sun Oct 27 03:00:00 2019","Timezone":"+07:00"}} 23:22:53 MQT: stat/powermeter/STATUS9 = {"StatusPTH":{"PowerDelta":0,"PowerLow":0,"PowerHigh":0,"VoltageLow":0,"VoltageHigh":0,"CurrentLow":0,"CurrentHigh":0}} 23:22:53 MQT: stat/powermeter/STATUS10 = {"StatusSNS":{"Time":"2019-07-09T23:22:53","ENERGY":{"TotalStartTime":"2019-07-08T23:56:49","Total":11.852,"Yesterday":0.000,"Today":11.852,"Power":0,"ApparentPower":0,"ReactivePower":0,"Factor":0.00,"Frequency":0,"Voltage":0,"Current":0.000}}} 23:22:53 MQT: stat/powermeter/STATUS11 = {"StatusSTS":{"Time":"2019-07-09T23:22:53","Uptime":"0T01:26:40","Heap":29,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"POWER":"OFF","Wifi":{"AP":1,"SSId":"THANGA","BSSId":"C4:71:54:D2:37:46","Channel":11,"RSSI":46,"LinkCount":1,"Downtime":"0T00:00:04"}}} ``` - [x] Provide the output of console when you experience your issue if apply : _(Please use_ ``weblog 4`` _for more debug information)_ ``` CONSOLE OUTPUT HERE: 23:14:00 WIF: Connected 23:14:05 DMP: 01 04 14 08 B7 08 9F 00 00 12 B8 00 00 FE D4 00 01 01 F4 00 61 00 00 F5 98 23:14:18 DMP: 01 04 14 08 B0 07 85 00 00 10 1D 00 00 FE D6 00 01 01 F4 00 60 00 00 9F 5A 23:14:19 DMP: 01 04 14 08 B0 07 85 00 00 10 1D 00 00 FE D6 00 01 01 F3 00 60 00 00 2A 9A 23:14:20 DMP: 01 04 14 08 B1 07 86 00 00 10 20 00 00 FE D6 00 01 01 F4 00 60 00 00 00 EB 23:14:20 WIF: Checking connection... 23:14:20 WIF: Connected 23:14:21 DMP: 01 04 14 08 B2 07 96 00 00 10 3C 00 00 FE D6 00 01 01 F4 00 60 00 00 66 36 23:14:22 DMP: 01 04 14 08 B3 07 A4 00 00 10 69 00 00 FE D6 00 01 01 F3 00 60 00 00 97 30 23:14:30 MQT: tele/powermeter/STATE = {"Time":"2019-07-09T23:14:30","Uptime":"0T01:18:17","Heap":31,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"POWER":"OFF","Wifi":{"AP":1,"SSId":"THANGA","BSSId":"C4:71:54:D2:37:46","Channel":11,"RSSI":40,"LinkCount":1,"Downtime":"0T00:00:04"}} 23:14:30 MQT: tele/powermeter/SENSOR = {"Time":"2019-07-09T23:14:30","ENERGY":{"TotalStartTime":"2019-07-08T23:56:49","Total":11.827,"Yesterday":0.000,"Today":11.827,"Period":0,"Power":0,"ApparentPower":0,"ReactivePower":0,"Factor":0.00,"Frequency":0,"Voltage":0,"Current":0.000}} 23:14:35 DMP: 01 04 14 08 AF 07 80 00 00 10 0D 00 00 FE D8 00 01 01 F3 00 60 00 00 D8 ED 23:14:40 WIF: Checking connection... 23:14:40 WIF: Connected 23:14:42 DMP: 01 04 14 08 B3 07 7E 00 00 10 12 00 00 FE D9 00 01 01 F3 00 60 00 00 08 20 23:14:43 DMP: 01 04 14 08 B4 07 7A 00 00 10 06 00 00 FE D9 00 01 01 F3 00 60 00 00 CF 81 23:14:44 DMP: 01 04 14 08 B4 07 7B 00 00 10 09 00 00 FE D9 00 01 01 F3 00 60 00 00 8A 1E 23:14:45 DMP: 01 04 14 08 B5 07 79 00 00 10 09 00 00 FE D9 00 01 01 F3 00 60 00 00 16 82 23:14:52 DMP: 01 04 14 08 B8 07 81 00 00 10 1B 00 00 FE DA 00 01 01 F4 00 60 00 00 63 3C 23:14:53 DMP: 01 04 14 08 B9 07 84 00 00 10 27 00 00 FE DA 00 01 01 F4 00 60 00 00 1D AD 23:14:54 DMP: 01 04 14 08 B9 07 8C 00 00 10 39 00 00 FE DA 00 01 01 F4 00 60 00 00 B2 71 23:14:55 DMP: 01 04 14 08 B9 07 87 00 00 10 34 00 00 FE DA 00 01 01 F4 00 60 00 00 D6 0E 23:14:56 DMP: 01 04 14 08 B9 07 87 00 00 10 34 00 00 FE DA 00 01 01 F4 00 60 00 00 D6 0E 23:15:00 WIF: Checking connection... 23:15:00 WIF: Connected 23:15:03 DMP: 01 04 14 08 BB 07 A4 00 00 10 74 00 00 FE DB 00 01 01 F4 00 60 00 00 B5 DC 23:15:04 DMP: 01 04 14 08 BC 07 90 00 00 10 47 00 00 FE DB 00 01 01 F4 00 60 00 00 12 55 23:15:05 DMP: 01 04 14 08 BC 07 90 00 00 10 47 00 00 FE DB 00 01 01 F4 00 60 00 00 12 55 23:15:06 DMP: 01 04 14 08 BB 07 D3 00 00 10 E9 00 00 FE DB 00 01 01 F4 00 61 00 00 A1 EA 23:15:07 DMP: 01 04 14 08 BB 07 8D 00 00 10 42 00 00 FE DC 00 01 01 F4 00 60 00 00 14 42 23:15:08 DMP: 01 04 14 08 BB 07 92 00 00 10 49 00 00 FE DC 00 01 01 F4 00 60 00 00 36 FF 23:15:09 DMP: 01 04 14 08 BB 07 92 00 00 10 49 00 00 FE DC 00 01 01 F4 00 60 00 00 36 FF 23:15:10 DMP: 01 04 14 08 BA 07 87 00 00 10 2B 00 00 FE DC 00 01 01 F4 00 60 00 00 93 75 23:15:11 DMP: 01 04 14 08 B9 07 94 00 00 10 49 00 00 FE DC 00 01 01 F4 00 60 00 00 AC E6 23:15:12 DMP: 01 04 14 08 B9 07 8C 00 00 10 3E 00 00 FE DC 00 01 01 F4 00 60 00 00 92 96 23:15:13 DMP: 01 04 14 08 B9 07 8D 00 00 10 3E 00 00 FE DC 00 01 01 F4 00 60 00 00 C3 06 23:15:30 DMP: 01 04 14 08 BB 07 91 00 00 10 48 00 00 FE DE 00 01 01 F5 00 60 00 00 E0 2E 23:15:40 WIF: Checking connection... 23:15:40 WIF: Connected 23:15:43 DMP: 01 04 14 08 BA 07 20 00 00 0F 31 00 00 FE E0 00 01 01 F4 00 5F 00 00 50 2E 23:15:44 DMP: 01 04 14 08 B9 07 15 00 00 0F 14 00 00 FE E0 00 01 01 F4 00 5F 00 00 60 51 23:15:45 DMP: 01 04 14 08 BA 07 1C 00 00 0F 26 00 00 FE E0 00 01 01 F5 00 5F 00 00 89 35 23:15:52 DMP: 01 04 14 08 BC 07 20 00 00 0F 27 00 00 FE E1 00 01 01 F4 00 5F 00 00 E2 60 23:15:59 DMP: 01 04 14 08 B6 07 16 00 00 0F 18 00 00 FE E1 00 01 01 F4 00 60 00 00 EB E4 23:16:00 DMP: 01 04 14 08 B3 07 19 00 00 0F 1A 00 00 FE E1 00 01 01 F4 00 60 00 00 15 99 23:16:00 WIF: Checking connection... 23:16:00 WIF: Connected 23:16:01 DMP: 01 04 14 08 B3 07 17 00 00 0F 15 00 00 FE E2 00 01 01 F4 00 60 00 00 71 05 23:16:02 DMP: 01 04 14 08 B2 07 1E 00 00 0F 2B 00 00 FE E2 00 01 01 F4 00 60 00 00 CD D5 23:16:03 DMP: 01 04 14 08 B3 07 11 00 00 0F 12 00 00 FE E2 00 01 01 F4 00 60 00 00 99 E3 23:16:04 DMP: 01 04 14 08 B3 07 11 00 00 0F 12 00 00 FE E2 00 01 01 F4 00 60 00 00 99 E3 23:16:05 DMP: 01 04 14 08 B3 07 1A 00 00 0F 1F 00 00 FE E2 00 01 01 F4 00 60 00 00 FD 9C 23:16:06 DMP: 01 04 14 08 B3 07 1D 00 00 0F 33 00 00 FE E2 00 01 01 F4 00 60 00 00 21 01 23:16:07 DMP: 01 04 14 08 B3 07 15 00 00 0F 17 00 00 FE E2 00 01 01 F4 00 60 00 00 D7 27 23:16:08 DMP: 01 04 14 08 B3 07 15 00 00 0F 17 00 00 FE E2 00 01 01 F4 00 60 00 00 D7 27 23:16:09 DMP: 01 04 14 08 B3 07 13 00 00 0F 13 00 00 FE E2 00 01 01 F4 00 60 00 00 3A 02 23:16:10 DMP: 01 04 14 08 B3 07 1B 00 00 0F 25 00 00 FE E3 00 01 01 F4 00 60 00 00 F8 66 23:16:17 DMP: 01 04 14 08 B1 07 1B 00 00 0F 1E 00 00 FE E3 00 01 01 F4 00 60 00 00 DA A5 23:16:18 DMP: 01 04 14 08 B1 07 1B 00 00 0F 1E 00 00 FE E3 00 01 01 F4 00 60 00 00 DA A5 23:16:19 DMP: 01 04 14 08 B2 07 15 00 00 0F 1C 00 00 FE E3 00 01 01 F4 00 60 00 00 FD C0 23:16:20 WIF: Checking connection... 23:16:20 WIF: Connected 23:16:26 DMP: 01 04 14 08 B1 07 18 00 00 0F 15 00 00 FE E4 00 01 01 F4 00 60 00 00 16 EE 23:16:27 DMP: 01 04 14 08 B1 07 18 00 00 0F 15 00 00 FE E4 00 01 01 F4 00 60 00 00 16 EE 23:16:28 DMP: 01 04 14 08 B0 07 12 00 00 0F 12 00 00 FE E4 00 01 01 F4 00 60 00 00 06 F7 23:16:30 MQT: tele/powermeter/STATE = {"Time":"2019-07-09T23:16:30","Uptime":"0T01:20:17","Heap":31,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"POWER":"OFF","Wifi":{"AP":1,"SSId":"THANGA","BSSId":"C4:71:54:D2:37:46","Channel":11,"RSSI":40,"LinkCount":1,"Downtime":"0T00:00:04"}} 23:16:30 MQT: tele/powermeter/SENSOR = {"Time":"2019-07-09T23:16:30","ENERGY":{"TotalStartTime":"2019-07-08T23:56:49","Total":11.830,"Yesterday":0.000,"Today":11.830,"Period":2,"Power":386,"ApparentPower":403,"ReactivePower":115,"Factor":0.96,"Frequency":50,"Voltage":222,"Current":1.810}} 23:16:35 DMP: 01 04 14 08 AC 07 12 00 00 0F 0E 00 00 FE E5 00 01 01 F4 00 60 00 00 F3 A9 23:16:40 WIF: Checking connection... ``` ### TO REPRODUCE _Steps to reproduce the behavior:_ open tasmota web interface ### EXPECTED BEHAVIOUR _A clear and concise description of what you expected to happen._ sometimes, all sensors value random show: 0 ### SCREENSHOTS _If applicable, add screenshots to help explain your problem._ ![all sensors value = 0](https://i.imgur.com/bULvI6s.jpg) ### ADDITIONAL CONTEXT _Add any other context about the problem here._ **(Please, remember to close the issue when the problem has been addressed)**
arendst commented 5 years ago

Your log shows you are missing some data during several seconds. The latest release expect the sensor disconnected after, I thought 8 seconds of no data received. It then returns only zeros..

You have several debug options.

ninhvanthang commented 5 years ago

I've just built from core 2.3.0 and this bug still exist Console Log:

00:00:00 CFG: Loaded from flash at FB, Count 70
00:00:00 Project sonoff Sonoff Version 6.6.0.1(sonoff)-2_3_0
00:00:00 SNS: Hardware Serial
00:00:00 WIF: Connecting to AP1 THANGA in mode 11N as powermeter-7470...
00:00:04 WIF: Connected
00:00:04 HTP: Web server active on powermeter-7470 with IP address 192.168.1.129
00:00:05 MQT: Attempting connection...
08:09:37 MQT: Connected
08:09:37 MQT: tele/powermeter/LWT = Online (retained)
08:09:37 MQT: cmnd/powermeter/POWER = 
08:09:37 MQT: tele/powermeter/INFO1 = {"Module":"Sonoff Basic","Version":"6.6.0.1(sonoff)","FallbackTopic":"cmnd/DVES_AF5D2E_fb/","GroupTopic":"sonoffs"}
08:09:37 MQT: tele/powermeter/INFO2 = {"WebServerMode":"Admin","Hostname":"powermeter-7470","IPAddress":"192.168.1.129"}
08:09:37 MQT: tele/powermeter/INFO3 = {"RestartReason":"Software/System restart"}
08:09:37 MQT: stat/powermeter/RESULT = {"POWER":"OFF"}
08:09:37 MQT: stat/powermeter/POWER = OFF
08:09:45 MQT: tele/powermeter/STATE = {"Time":"2019-07-10T08:09:45","Uptime":"0T00:00:15","Heap":23,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":27,"POWER":"OFF","Wifi":{"AP":1,"SSId":"THANGA","BSSId":"C4:71:54:D2:37:46","Channel":1,"RSSI":64,"LinkCount":1,"Downtime":"0T00:00:04"}}
08:09:45 MQT: tele/powermeter/SENSOR = {"Time":"2019-07-10T08:09:45","ENERGY":{"TotalStartTime":"2019-07-08T23:56:49","Total":24.228,"Yesterday":11.990,"Today":12.238,"Period":0,"Power":0,"ApparentPower":0,"ReactivePower":0,"Factor":0.00,"Voltage":0,"Current":0.000}}
08:10:46 MQT: tele/powermeter/STATE = {"Time":"2019-07-10T08:10:46","Uptime":"0T00:01:16","Heap":22,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":39,"POWER":"OFF","Wifi":{"AP":1,"SSId":"THANGA","BSSId":"C4:71:54:D2:37:46","Channel":1,"RSSI":54,"LinkCount":1,"Downtime":"0T00:00:04"}}
08:10:46 MQT: tele/powermeter/SENSOR = {"Time":"2019-07-10T08:10:46","ENERGY":{"TotalStartTime":"2019-07-08T23:56:49","Total":24.228,"Yesterday":11.990,"Today":12.238,"Period":0,"Power":303,"ApparentPower":313,"ReactivePower":79,"Factor":0.97,"Frequency":50,"Voltage":220,"Current":1.422}}
08:10:48 LOG: SerialLog 0, WebLog 4, SysLog 2, LogHost , LogPort 514, TelePeriod 60
08:10:48 HTP: Configuration
08:10:49 CFG: Saved to flash at F9, Count 73, Bytes 3584
08:10:53 DMP: 01 04 14 08 77 05 91 00 00 0B A6 00 00 0C 85 00 02 01 F5 00 61 00 00 54 D8
08:10:54 DMP: 01 04 14 08 83 05 9D 00 00 0B D8 00 00 0C 86 00 02 01 F5 00 61 00 00 AE B0
08:10:55 DMP: 01 04 14 08 83 05 9D 00 00 0B D8 00 00 0C 86 00 02 01 F5 00 61 00 00 AE B0
08:10:57 WIF: Checking connection...
08:10:57 WIF: Connected
08:11:02 DMP: 01 04 14 08 87 05 89 00 00 0B AA 00 00 0C 86 00 02 01 F5 00 61 00 00 A8 F6
08:11:03 DMP: 01 04 14 08 90 05 8D 00 00 0B BC 00 00 0C 86 00 02 01 F5 00 60 00 00 FD 16
08:11:04 DMP: 01 04 14 08 90 05 8D 00 00 0B BC 00 00 0C 86 00 02 01 F5 00 60 00 00 FD 16
08:11:11 DMP: 01 04 14 08 8F 05 95 00 00 0B D2 00 00 0C 87 00 02 01 F5 00 61 00 00 2F B9
08:11:12 DMP: 01 04 14 08 8F 05 95 00 00 0B D2 00 00 0C 87 00 02 01 F4 00 61 00 00 12 79
08:11:13 DMP: 01 04 14 08 90 05 8C 00 00 0B BD 00 00 0C 87 00 02 01 F5 00 61 00 00 F2 57
08:11:14 DMP: 01 04 14 08 8F 05 9E 00 00 0B E7 00 00 0C 87 00 02 01 F4 00 61 00 00 28 BE
08:11:15 DMP: 01 04 14 08 8E 05 8C 00 00 0B B9 00 00 0C 87 00 02 01 F4 00 61 00 00 6F 39
08:11:17 WIF: Checking connection...
08:11:17 WIF: Connected
08:11:22 DMP: 01 04 14 08 91 05 8A 00 00 0B B9 00 00 0C 88 00 02 01 F4 00 61 00 00 5E BE
08:11:28 HTP: Main Menu
08:11:32 HTP: Main Menu
08:11:35 DMP: 01 04 14 08 92 05 A9 00 00 0C 0A 00 00 0C 89 00 02 01 F4 00 61 00 00 43 65
08:11:36 DMP: 01 04 14 08 8A 05 8B 00 00 0B B0 00 00 0C 89 00 02 01 F5 00 60 00 00 11 91
08:11:36 HTP: Main Menu
08:11:37 DMP: 01 04 14 08 7D 05 93 00 00 0B BA 00 00 0C 89 00 02 01 F4 00 61 00 00 29 FD
08:11:38 WIF: Checking connection...
08:11:38 WIF: Connected
08:11:48 MQT: tele/powermeter/STATE = {"Time":"2019-07-10T08:11:47","Uptime":"0T00:02:17","Heap":22,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"POWER":"OFF","Wifi":{"AP":1,"SSId":"THANGA","BSSId":"C4:71:54:D2:37:46","Channel":1,"RSSI":60,"LinkCount":1,"Downtime":"0T00:00:04"}}
08:11:48 MQT: tele/powermeter/SENSOR = {"Time":"2019-07-10T08:11:48","ENERGY":{"TotalStartTime":"2019-07-08T23:56:49","Total":24.229,"Yesterday":11.990,"Today":12.239,"Period":1,"Power":0,"ApparentPower":0,"ReactivePower":0,"Factor":0.00,"Frequency":0,"Voltage":0,"Current":0.000}}
08:11:50 DMP: 01 04 14 08 88 05 8E 00 00 0B B8 00 00 0C 8A 00 02 01 F5 00 61 00 00 21 00
08:11:51 DMP: 01 04 14 08 8B 05 93 00 00 0B CB 00 00 0C 8A 00 02 01 F5 00 61 00 00 46 E1
08:11:52 DMP: 01 04 14 08 88 05 87 00 00 0B AC 00 00 0C 8A 00 02 01 F5 00 61 00 00 C7 46
08:11:58 WIF: Checking connection...
08:11:58 WIF: Connected
08:12:05 DMP: 01 04 14 08 86 04 C0 00 00 09 CA 00 00 0C 8B 00 02 01 F5 00 5E 00 00 C9 8E
08:12:06 DMP: 01 04 14 08 8C 04 C0 00 00 09 D0 00 00 0C 8C 00 02 01 F5 00 5E 00 00 52 FD
08:12:07 DMP: 01 04 14 08 8C 04 C0 00 00 09 D0 00 00 0C 8C 00 02 01 F4 00 5E 00 00 6F 3D
08:12:18 WIF: Checking connection...
08:12:18 WIF: Connected
08:12:20 DMP: 01 04 14 08 91 04 C0 00 00 09 D5 00 00 0C 8D 00 02 01 F5 00 5E 00 00 B9 06
08:12:21 DMP: 01 04 14 08 91 04 C0 00 00 09 D5 00 00 0C 8D 00 02 01 F5 00 5E 00 00 B9 06
08:12:22 DMP: 01 04 14 08 94 04 C2 00 00 09 DC 00 00 0C 8D 00 02 01 F5 00 5E 00 00 C9 63
08:12:23 DMP: 01 04 14 08 89 04 BA 00 00 09 C2 00 00 0C 8D 00 02 01 F5 00 5E 00 00 A9 0A
08:12:24 DMP: 01 04 14 08 8B 04 C0 00 00 09 D1 00 00 0C 8D 00 02 01 F5 00 5E 00 00 E8 98
08:12:25 DMP: 01 04 14 08 82 04 BA 00 00 09 BC 00 00 0C 8D 00 02 01 F5 00 5F 00 00 F7 51
08:12:26 DMP: 01 04 14 08 82 04 BA 00 00 09 BC 00 00 0C 8D 00 02 01 F5 00 5F 00 00 F7 51
08:12:38 WIF: Checking connection...
08:12:38 WIF: Connected
08:12:45 DMP: 01 04 14 08 7D 05 20 00 00 0A B1 00 00 0C 8E 00 02 01 F5 00 60 00 00 FC 90
08:12:46 DMP: 01 04 14 08 81 05 64 00 00 0B 48 00 00 0C 8E 00 02 01 F4 00 60 00 00 8F F8
08:12:47 MQT: tele/powermeter/STATE = {"Time":"2019-07-10T08:12:47","Uptime":"0T00:03:17","Heap":22,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"POWER":"OFF","Wifi":{"AP":1,"SSId":"THANGA","BSSId":"C4:71:54:D2:37:46","Channel":1,"RSSI":58,"LinkCount":1,"Downtime":"0T00:00:04"}}
08:12:47 MQT: tele/powermeter/SENSOR = {"Time":"2019-07-10T08:12:47","ENERGY":{"TotalStartTime":"2019-07-08T23:56:49","Total":24.230,"Yesterday":11.990,"Today":12.240,"Period":1,"Power":289,"ApparentPower":300,"ReactivePower":83,"Factor":0.96,"Frequency":50,"Voltage":218,"Current":1.380}}
08:12:58 WIF: Checking connection...
08:12:58 WIF: Connected

i connected pezm to GPIO1 & GPIO3 I've back to 6.5 and it work

log:

07:57:13 MQT: tele/powermeter/SENSOR = {"Time":"2019-07-10T07:57:13","ENERGY":{"TotalStartTime":"2019-07-08T23:56:49","Total":24.164,"Yesterday":11.990,"Today":12.174,"Period":6,"Power":312,"ApparentPower":322,"ReactivePower":80,"Factor":0.97,"Frequency":50,"Voltage":219,"Current":1.472}}
07:58:13 MQT: tele/powermeter/STATE = {"Time":"2019-07-10T07:58:13","Uptime":"0T00:32:30","SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"POWER":"OFF","Wifi":{"AP":1,"SSId":"THANGA","BSSId":"C4:71:54:D2:37:46","Channel":1,"RSSI":58,"LinkCount":1,"Downtime":"0T00:00:38"}}
07:58:13 MQT: tele/powermeter/SENSOR = {"Time":"2019-07-10T07:58:13","ENERGY":{"TotalStartTime":"2019-07-08T23:56:49","Total":24.169,"Yesterday":11.990,"Today":12.179,"Period":5,"Power":307,"ApparentPower":318,"ReactivePower":83,"Factor":0.97,"Frequency":50,"Voltage":219,"Current":1.450}}
07:59:13 MQT: tele/powermeter/STATE = {"Time":"2019-07-10T07:59:13","Uptime":"0T00:33:30","SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"POWER":"OFF","Wifi":{"AP":1,"SSId":"THANGA","BSSId":"C4:71:54:D2:37:46","Channel":1,"RSSI":58,"LinkCount":1,"Downtime":"0T00:00:38"}}
07:59:13 MQT: tele/powermeter/SENSOR = {"Time":"2019-07-10T07:59:13","ENERGY":{"TotalStartTime":"2019-07-08T23:56:49","Total":24.174,"Yesterday":11.990,"Today":12.184,"Period":5,"Power":338,"ApparentPower":346,"ReactivePower":73,"Factor":0.98,"Frequency":50,"Voltage":218,"Current":1.590}}
08:00:13 MQT: tele/powermeter/STATE = {"Time":"2019-07-10T08:00:13","Uptime":"0T00:34:30","SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"POWER":"OFF","Wifi":{"AP":1,"SSId":"THANGA","BSSId":"C4:71:54:D2:37:46","Channel":1,"RSSI":58,"LinkCount":1,"Downtime":"0T00:00:38"}}
08:00:13 MQT: tele/powermeter/SENSOR = {"Time":"2019-07-10T08:00:13","ENERGY":{"TotalStartTime":"2019-07-08T23:56:49","Total":24.180,"Yesterday":11.990,"Today":12.190,"Period":6,"Power":328,"ApparentPower":337,"ReactivePower":78,"Factor":0.97,"Frequency":50,"Voltage":215,"Current":1.570}}
08:01:13 MQT: tele/powermeter/STATE = {"Time":"2019-07-10T08:01:13","Uptime":"0T00:35:30","SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"POWER":"OFF","Wifi":{"AP":1,"SSId":"THANGA","BSSId":"C4:71:54:D2:37:46","Channel":1,"RSSI":58,"LinkCount":1,"Downtime":"0T00:00:38"}}
08:01:13 MQT: tele/powermeter/SENSOR = {"Time":"2019-07-10T08:01:13","ENERGY":{"TotalStartTime":"2019-07-08T23:56:49","Total":24.185,"Yesterday":11.990,"Today":12.195,"Period":5,"Power":335,"ApparentPower":343,"ReactivePower":74,"Factor":0.98,"Frequency":50,"Voltage":217,"Current":1.578}}
08:02:00 MQT: tele/powermeter/UPTIME = {"Time":"2019-07-10T08:02:00","Uptime":"0T00:36:17"}
08:02:13 MQT: tele/powermeter/STATE = {"Time":"2019-07-10T08:02:13","Uptime":"0T00:36:30","SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"POWER":"OFF","Wifi":{"AP":1,"SSId":"THANGA","BSSId":"C4:71:54:D2:37:46","Channel":1,"RSSI":58,"LinkCount":1,"Downtime":"0T00:00:38"}}
08:02:13 MQT: tele/powermeter/SENSOR = {"Time":"2019-07-10T08:02:13","ENERGY":{"TotalStartTime":"2019-07-08T23:56:49","Total":24.190,"Yesterday":11.990,"Today":12.200,"Period":5,"Power":301,"ApparentPower":311,"ReactivePower":81,"Factor":0.97,"Frequency":50,"Voltage":218,"Current":1.431}}
08:03:13 MQT: tele/powermeter/STATE = {"Time":"2019-07-10T08:03:13","Uptime":"0T00:37:30","SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"POWER":"OFF","Wifi":{"AP":1,"SSId":"THANGA","BSSId":"C4:71:54:D2:37:46","Channel":1,"RSSI":60,"LinkCount":1,"Downtime":"0T00:00:38"}}
08:03:13 MQT: tele/powermeter/SENSOR = {"Time":"2019-07-10T08:03:13","ENERGY":{"TotalStartTime":"2019-07-08T23:56:49","Total":24.196,"Yesterday":11.990,"Today":12.206,"Period":6,"Power":360,"ApparentPower":367,"ReactivePower":74,"Factor":0.98,"Frequency":50,"Voltage":220,"Current":1.671}}
08:04:13 MQT: tele/powermeter/STATE = {"Time":"2019-07-10T08:04:13","Uptime":"0T00:38:30","SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"POWER":"OFF","Wifi":{"AP":1,"SSId":"THANGA","BSSId":"C4:71:54:D2:37:46","Channel":1,"RSSI":58,"LinkCount":1,"Downtime":"0T00:00:38"}}
08:04:13 MQT: tele/powermeter/SENSOR = {"Time":"2019-07-10T08:04:13","ENERGY":{"TotalStartTime":"2019-07-08T23:56:49","Total":24.201,"Yesterday":11.990,"Today":12.211,"Period":5,"Power":361,"ApparentPower":368,"ReactivePower":72,"Factor":0.98,"Frequency":50,"Voltage":221,"Current":1.668}}
08:05:13 MQT: tele/powermeter/STATE = {"Time":"2019-07-10T08:05:13","Uptime":"0T00:39:30","SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"POWER":"OFF","Wifi":{"AP":1,"SSId":"THANGA","BSSId":"C4:71:54:D2:37:46","Channel":1,"RSSI":58,"LinkCount":1,"Downtime":"0T00:00:38"}}
08:05:13 MQT: tele/powermeter/SENSOR = {"Time":"2019-07-10T08:05:13","ENERGY":{"TotalStartTime":"2019-07-08T23:56:49","Total":24.207,"Yesterday":11.990,"Today":12.217,"Period":6,"Power":308,"ApparentPower":318,"ReactivePower":80,"Factor":0.97,"Frequency":50,"Voltage":218,"Current":1.459}}
08:06:13 MQT: tele/powermeter/STATE = {"Time":"2019-07-10T08:06:13","Uptime":"0T00:40:30","SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"POWER":"OFF","Wifi":{"AP":1,"SSId":"THANGA","BSSId":"C4:71:54:D2:37:46","Channel":1,"RSSI":58,"LinkCount":1,"Downtime":"0T00:00:38"}}
08:06:13 MQT: tele/powermeter/SENSOR = {"Time":"2019-07-10T08:06:13","ENERGY":{"TotalStartTime":"2019-07-08T23:56:49","Total":24.212,"Yesterday":11.990,"Today":12.222,"Period":5,"Power":313,"ApparentPower":322,"ReactivePower":75,"Factor":0.97,"Frequency":50,"Voltage":218,"Current":1.473}}
ninhvanthang commented 5 years ago

I tried change time to retry to 10 send_retry = 10; but bug still exist

arendst commented 5 years ago

When using 6.5 also enable more logging with weblog 4 and report if you receive data every second.

As a workaround for 6.6 you might want to increase define ENERGY_WATCHDOG in xdrv_03_energy.ino from 4 to 40 or even higher to stop resetting measured values.

ninhvanthang commented 5 years ago

Please check log for 6.5 I'll try edit xdrv_03_energy and report to you today.

16:43:29 DMP: 01 04 14 08 91 08 07 00 00 11 29 00 00 1C A1 00 02 01 F6 00 61 00 00 68 25
16:43:30 DMP: 01 04 14 08 92 08 61 00 00 11 F8 00 00 1C A1 00 02 01 F6 00 62 00 00 2A CE
16:43:31 DMP: 01 04 14 08 92 08 61 00 00 11 F8 00 00 1C A2 00 02 01 F6 00 62 00 00 3E 3E
16:43:32 WIF: Checking connection...
16:43:32 WIF: Connected
16:43:32 DMP: 01 04 14 08 7F 08 4F 00 00 11 AF 00 00 1C A2 00 02 01 F6 00 62 00 00 11 FB
16:43:33 MQT: tele/powermeter/STATE = {"Time":"2019-07-10T16:43:33","Uptime":"0T07:52:27","SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"POWER":"OFF","Wifi":{"AP":1,"SSId":"THANGA","BSSId":"C4:71:54:D2:37:46","Channel":1,"RSSI":52,"LinkCount":74,"Downtime":"0T00:04:02"}}
16:43:33 MQT: tele/powermeter/SENSOR = {"Time":"2019-07-10T16:43:33","ENERGY":{"TotalStartTime":"2019-07-08T23:56:49","Total":28.149,"Yesterday":11.990,"Today":16.159,"Period":9,"Power":453,"ApparentPower":463,"ReactivePower":95,"Factor":0.98,"Frequency":50,"Voltage":218,"Current":2.127}}
16:43:33 DMP: 01 04 14 08 7C 08 2D 00 00 11 5B 00 00 1C A2 00 02 01 F6 00 62 00 00 92 B4
16:43:34 DMP: 01 04 14 08 8A 08 73 00 00 12 19 00 00 1C A2 00 02 01 F6 00 62 00 00 CB DA
16:43:35 DMP: 01 04 14 08 8A 08 73 00 00 12 19 00 00 1C A2 00 02 01 F6 00 62 00 00 CB DA
16:43:42 DMP: 01 04 14 08 8C 08 B8 00 00 12 A0 00 00 1C A3 00 02 01 F6 00 62 00 00 CA 34
16:43:43 DMP: 01 04 14 08 91 08 AA 00 00 12 9C 00 00 1C A3 00 02 01 F6 00 62 00 00 DC C3
16:43:50 DMP: 01 04 14 08 98 09 03 00 00 13 72 00 00 1C A4 00 02 01 F6 00 62 00 00 B2 CC
16:43:51 DMP: 01 04 14 08 99 08 FF 00 00 13 6A 00 00 1C A4 00 02 01 F6 00 62 00 00 7E 24
16:43:52 WIF: Checking connection...
16:43:52 WIF: Connected
16:43:52 DMP: 01 04 14 08 99 08 F4 00 00 13 56 00 00 1C A4 00 02 01 F6 00 62 00 00 59 2A
16:43:59 DMP: 01 04 14 08 99 08 F2 00 00 13 4B 00 00 1C A5 00 02 01 F6 00 62 00 00 9A C6
16:44:12 WIF: Checking connection...
16:44:12 WIF: Connected
16:44:12 MQT: Attempting connection...
16:44:17 MQT: Connected
16:44:17 MQT: tele/powermeter/LWT = Online (retained)
16:44:17 MQT: cmnd/powermeter/POWER = 
16:44:17 MQT: Subscribe to cmnd/powermeter/#
16:44:17 MQT: Subscribe to cmnd/sonoffs/#
16:44:17 MQT: Subscribe to cmnd/DVES_AF5D2E_fb/#
16:44:18 DMP: 01 04 14 08 89 08 FF 00 00 13 41 00 00 1C A8 00 02 01 F5 00 62 00 00 CE 0C
16:44:19 DMP: 01 04 14 08 81 09 15 00 00 13 78 00 00 1C A8 00 02 01 F6 00 62 00 00 0A FC
16:44:26 DMP: 01 04 14 08 7D 09 A3 00 00 14 98 00 00 1C A9 00 02 01 F5 00 62 00 00 CD C8
16:44:27 DMP: 01 04 14 08 7B 09 9E 00 00 14 9D 00 00 1C A9 00 02 01 F5 00 63 00 00 98 19
16:44:28 HTP: Console
16:44:34 DMP: 01 04 14 08 7B 08 FF 00 00 13 2B 00 00 1C AA 00 02 01 F5 00 62 00 00 44 6B
16:44:36 WIF: Checking connection...
16:44:36 WIF: Connected
16:44:38 MQT: tele/powermeter/STATE = {"Time":"2019-07-10T16:44:38","Uptime":"0T07:53:32","SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"POWER":"OFF","Wifi":{"AP":1,"SSId":"THANGA","BSSId":"C4:71:54:D2:37:46","Channel":1,"RSSI":56,"LinkCount":74,"Downtime":"0T00:04:02"}}
16:44:38 MQT: tele/powermeter/SENSOR = {"Time":"2019-07-10T16:44:38","ENERGY":{"TotalStartTime":"2019-07-08T23:56:49","Total":28.157,"Yesterday":11.990,"Today":16.167,"Period":8,"Power":491,"ApparentPower":500,"ReactivePower":96,"Factor":0.98,"Frequency":50,"Voltage":217,"Current":2.303}}
16:44:41 DMP: 01 04 14 08 7C 08 F2 00 00 13 0A 00 00 1C AB 00 02 01 F6 00 62 00 00 51 FD
16:44:42 DMP: 01 04 14 08 7D 08 F9 00 00 13 23 00 00 1C AB 00 02 01 F5 00 62 00 00 3D 9A
16:44:43 DMP: 01 04 14 08 7D 08 F9 00 00 13 23 00 00 1C AB 00 02 01 F5 00 62 00 00 3D 9A
16:44:44 DMP: 01 04 14 08 7A 09 09 00 00 13 43 00 00 1C AC 00 02 01 F5 00 62 00 00 3A B1
16:44:48 HTP: Main Menu
16:44:51 HTP: Configuration
16:44:56 WIF: Checking connection...
16:44:56 WIF: Connected
16:44:58 HTP: Configure Logging
16:45:02 HTP: Configuration
16:45:03 HTP: Main Menu
16:45:04 HTP: Console
16:45:15 DMP: 01 04 14 08 8E 08 EE 00 00 13 33 00 00 1C B0 00 02 01 F6 00 62 00 00 71 5F
16:45:16 DMP: 01 04 14 08 8E 08 EE 00 00 13 33 00 00 1C B0 00 02 01 F6 00 62 00 00 71 5F
16:45:16 WIF: Checking connection...
16:45:16 WIF: Connected
16:45:17 DMP: 01 04 14 08 91 09 13 00 00 13 89 00 00 1C B0 00 02 01 F6 00 62 00 00 C5 EE
16:45:18 DMP: 01 04 14 08 8E 09 4E 00 00 13 FC 00 00 1C B0 00 02 01 F6 00 62 00 00 4D 8F
16:45:19 DMP: 01 04 14 08 90 09 1C 00 00 13 AC 00 00 1C B0 00 02 01 F5 00 63 00 00 AB 44
16:45:20 DMP: 01 04 14 08 8F 09 11 00 00 13 81 00 00 1C B1 00 02 01 F6 00 62 00 00 D8 7C
16:45:27 DMP: 01 04 14 08 78 09 0A 00 00 13 45 00 00 1C B1 00 02 01 F6 00 62 00 00 6B 6F
16:45:28 DMP: 01 04 14 08 56 08 ED 00 00 12 B0 00 00 1C B2 00 02 01 F6 00 62 00 00 78 BF
16:45:29 DMP: 01 04 14 08 56 08 ED 00 00 12 B0 00 00 1C B2 00 02 01 F6 00 62 00 00 78 BF
16:45:30 DMP: 01 04 14 08 7B 09 29 00 00 13 7F 00 00 1C B2 00 02 01 F6 00 62 00 00 8B 1B
16:45:31 DMP: 01 04 14 08 85 09 19 00 00 13 88 00 00 1C B2 00 02 01 F6 00 62 00 00 CD 5E
16:45:32 DMP: 01 04 14 08 83 09 5D 00 00 14 14 00 00 1C B2 00 02 01 F6 00 62 00 00 E0 99
16:45:36 WIF: Checking connection...
16:45:36 WIF: Connected
16:45:38 MQT: tele/powermeter/STATE = {"Time":"2019-07-10T16:45:38","Uptime":"0T07:54:32","SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"POWER":"OFF","Wifi":{"AP":1,"SSId":"THANGA","BSSId":"C4:71:54:D2:37:46","Channel":1,"RSSI":58,"LinkCount":74,"Downtime":"0T00:04:02"}}
16:45:38 MQT: tele/powermeter/SENSOR = {"Time":"2019-07-10T16:45:38","ENERGY":{"TotalStartTime":"2019-07-08T23:56:49","Total":28.165,"Yesterday":11.990,"Today":16.175,"Period":8,"Power":514,"ApparentPower":522,"ReactivePower":93,"Factor":0.98,"Frequency":50,"Voltage":218,"Current":2.397}}
16:45:45 DMP: 01 04 14 08 79 09 12 00 00 13 55 00 00 1C B4 00 02 01 F6 00 62 00 00 DD 54
16:45:46 DMP: 01 04 14 08 78 09 13 00 00 13 5B 00 00 1C B4 00 02 01 F6 00 62 00 00 A7 B6
16:45:47 DMP: 01 04 14 08 7B 08 FE 00 00 13 28 00 00 1C B4 00 02 01 F6 00 62 00 00 D5 98
16:45:54 DMP: 01 04 14 08 6E 08 F4 00 00 12 F6 00 00 1C B5 00 02 01 F5 00 62 00 00 9B 7B
16:45:55 DMP: 01 04 14 08 70 08 F9 00 00 13 06 00 00 1C B5 00 02 01 F5 00 62 00 00 E1 F2
16:45:56 DMP: 01 04 14 08 72 08 F9 00 00 13 09 00 00 1C B5 00 02 01 F5 00 62 00 00 8C 45
16:45:56 WIF: Checking connection...
16:45:56 WIF: Connected
16:46:03 DMP: 01 04 14 08 74 09 05 00 00 13 2B 00 00 1C B6 00 02 01 F5 00 62 00 00 B8 D3
16:46:04 DMP: 01 04 14 08 70 08 FE 00 00 13 12 00 00 1C B6 00 02 01 F5 00 62 00 00 77 27
16:46:05 DMP: 01 04 14 08 6F 08 FC 00 00 13 0A 00 00 1C B7 00 02 01 F6 00 62 00 00 2D D9
16:46:06 DMP: 01 04 14 08 6F 08 FC 00 00 13 0A 00 00 1C B7 00 02 01 F6 00 62 00 00 2D D9
16:46:07 DMP: 01 04 14 08 6B 08 FD 00 00 13 07 00 00 1C B7 00 02 01 F5 00 62 00 00 DA 34
16:46:08 DMP: 01 04 14 08 72 08 F9 00 00 13 09 00 00 1C B7 00 02 01 F5 00 62 00 00 95 25
16:46:09 DMP: 01 04 14 08 78 08 FB 00 00 13 20 00 00 1C B7 00 02 01 F6 00 62 00 00 89 35
16:46:16 DMP: 01 04 14 08 74 08 F9 00 00 13 11 00 00 1C B8 00 02 01 F5 00 62 00 00 7D 85
16:46:16 WIF: Checking connection...
16:46:16 WIF: Connected
16:46:17 DMP: 01 04 14 08 73 09 00 00 00 13 1B 00 00 1C B8 00 02 01 F5 00 62 00 00 13 66
16:46:18 DMP: 01 04 14 08 71 08 FB 00 00 13 10 00 00 1C B8 00 02 01 F6 00 62 00 00 56 A8
16:46:19 DMP: 01 04 14 08 71 08 F8 00 00 13 06 00 00 1C B9 00 02 01 F6 00 62 00 00 9C 9E
16:46:20 DMP: 01 04 14 08 71 08 F8 00 00 13 06 00 00 1C B9 00 02 01 F6 00 62 00 00 9C 9E
16:46:27 DMP: 01 04 14 08 67 09 07 00 00 13 13 00 00 1C BA 00 02 01 F6 00 62 00 00 D6 8C
16:46:34 DMP: 01 04 14 08 65 08 FC 00 00 12 F8 00 00 1C BB 00 02 01 F5 00 62 00 00 E0 72
16:46:35 DMP: 01 04 14 08 6D 09 04 00 00 13 15 00 00 1C BB 00 02 01 F5 00 62 00 00 FD F3
16:46:36 DMP: 01 04 14 08 6B 08 FE 00 00 13 0D 00 00 1C BB 00 02 01 F5 00 62 00 00 67 CE
16:46:36 WIF: Checking connection...
16:46:36 WIF: Connected
16:46:37 DMP: 01 04 14 08 6B 09 15 00 00 13 3B 00 00 1C BB 00 02 01 F5 00 62 00 00 40 C0
16:46:38 MQT: tele/powermeter/STATE = {"Time":"2019-07-10T16:46:38","Uptime":"0T07:55:32","SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"POWER":"OFF","Wifi":{"AP":1,"SSId":"THANGA","BSSId":"C4:71:54:D2:37:46","Channel":1,"RSSI":62,"LinkCount":74,"Downtime":"0T00:04:02"}}
16:46:38 MQT: tele/powermeter/SENSOR = {"Time":"2019-07-10T16:46:38","ENERGY":{"TotalStartTime":"2019-07-08T23:56:49","Total":28.174,"Yesterday":11.990,"Today":16.184,"Period":9,"Power":492,"ApparentPower":501,"ReactivePower":93,"Factor":0.98,"Frequency":50,"Voltage":216,"Current":2.325}}
16:46:50 DMP: 01 04 14 08 72 09 79 00 00 14 30 00 00 1C BD 00 02 01 F6 00 63 00 00 94 AF
16:46:56 WIF: Checking connection...
16:46:56 WIF: Connected
arendst commented 5 years ago

From your 6.5 log you see you miss data too resulting in the error you encounter in 6.6

Just checked my PZEM016:

11:52:35 DMP: 01 04 14 08 C5 00 6C 00 00 00 F2 00 00 18 3D 00 00 01 F4 00 64 00 00 53 8E
11:52:36 DMP: 01 04 14 08 C5 00 6C 00 00 00 F2 00 00 18 3D 00 00 01 F4 00 64 00 00 53 8E
11:52:37 DMP: 01 04 14 08 C5 00 6C 00 00 00 F2 00 00 18 3D 00 00 01 F4 00 64 00 00 53 8E
11:52:38 DMP: 01 04 14 08 C3 00 6C 00 00 00 F2 00 00 18 3D 00 00 01 F4 00 64 00 00 DB 06
11:52:39 DMP: 01 04 14 08 C4 00 6C 00 00 00 F1 00 00 18 3D 00 00 01 F4 00 63 00 00 DA 70
11:52:40 MQT: tele/rf1/STATE = {"Time":"2019-07-10T11:52:40","Uptime":"0T00:00:17","Heap":20,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"POWER1":"OFF","Wifi":{"AP":2,"SSId":"indebuurt2","BSSId":"A0:AB:1B:7D:42:AC","Channel":5,"RSSI":100,"LinkCount":1,"Downtime":"0T00:00:07"}}
11:52:40 MQT: tele/rf1/SENSOR = {"Time":"2019-07-10T11:52:40","ENERGY":{"TotalStartTime":"2018-11-23T15:33:47","Total":0.009,"Yesterday":0.000,"Today":0.009,"Period":0.00,"Power":24.10,"ApparentPower":24.24,"ReactivePower":0.00,"Factor":0.99,"Frequency":50.0,"Voltage":224.40,"Current":0.108}}
11:52:40 DMP: 01 04 14 08 C4 00 6C 00 00 00 F1 00 00 18 3D 00 00 01 F4 00 63 00 00 DA 70
11:52:41 DMP: 01 04 14 08 C7 00 6C 00 00 00 F2 00 00 18 3D 00 00 01 F4 00 64 00 00 2A 36
11:52:42 DMP: 01 04 14 08 C5 00 6C 00 00 00 F2 00 00 18 3D 00 00 01 F4 00 64 00 00 53 8E
11:52:43 DMP: 01 04 14 08 C4 00 6C 00 00 00 F2 00 00 18 3D 00 00 01 F4 00 64 00 00 6E 72
11:52:44 DMP: 01 04 14 08 C1 00 6C 00 00 00 F1 00 00 18 3D 00 00 01 F4 00 64 00 00 A7 7D
11:52:45 DMP: 01 04 14 08 C1 00 6C 00 00 00 F1 00 00 18 3D 00 00 01 F4 00 64 00 00 A7 7D
11:52:46 DMP: 01 04 14 08 C2 00 6C 00 00 00 F1 00 00 18 3D 00 00 01 F4 00 64 00 00 E3 39
11:52:47 DMP: 01 04 14 08 C2 00 6C 00 00 00 F1 00 00 18 3D 00 00 01 F4 00 64 00 00 E3 39
11:52:48 DMP: 01 04 14 08 C3 00 6C 00 00 00 F1 00 00 18 3D 00 00 01 F4 00 63 00 00 6F 04
11:52:49 DMP: 01 04 14 08 C3 00 6C 00 00 00 F1 00 00 18 3D 00 00 01 F4 00 63 00 00 6F 04

No missed data while configured this way: image

and using a RS485 converter like below image

I guess you will have to consider your serial connection between PZEM and ESP8266.

ninhvanthang commented 5 years ago

I'm using pzem-004t v3, and follow this image to connect it to sonoff, pzem 004t

that module show tx,rx, not A,B like on pzem016, does i need rs 485 converter?

arendst commented 5 years ago

Ah, it seems the 004T V3 does already contain a RS232 to RS485 converter.

In that case I think you are blowing the serial interface of the esp8266 using 5V. You might want to try the fix as used for the old PZEM004 to make it's interface work on 3V3 inline with the ESP8266 serial interface protocol.

See here too http://pdacontrolen.com/meter-pzem-004t-with-arduino-esp32-esp8266-python-raspberry-pi/ regarding 5V to 3V3 fix.

ninhvanthang commented 5 years ago

Thank @arendst , finally it's worked,

problem is i used 5V for serial, this new version is different as v1, they swapped position of 2 optocouplers, i soldered 1K resistor as photo and it's work

pzem004tv3

sheminasalam commented 4 years ago

Thank @arendst , finally it's worked,

problem is i used 5V for serial, this new version is different as v1, they swapped position of 2 optocouplers, i soldered 1K resistor as photo and it's work

pzem004tv3

Is this setup still working, i mean changing the 1k resistor optocoupler locations.? I am also having this problem with one of my pzem. Can you confirm that the device is working in 3v serial with this setup?

ninhvanthang commented 4 years ago

Thank @arendst , finally it's worked, problem is i used 5V for serial, this new version is different as v1, they swapped position of 2 optocouplers, i soldered 1K resistor as photo and it's work pzem004tv3

Is this setup still working, i mean changing the 1k resistor optocoupler locations.? I am also having this problem with one of my pzem. Can you confirm that the device is working in 3v serial with this setup?

yes, i's working in 3V of sonoff basic after more than one year

sheminasalam commented 4 years ago

Thank @arendst , finally it's worked, problem is i used 5V for serial, this new version is different as v1, they swapped position of 2 optocouplers, i soldered 1K resistor as photo and it's work pzem004tv3

Is this setup still working, i mean changing the 1k resistor optocoupler locations.? I am also having this problem with one of my pzem. Can you confirm that the device is working in 3v serial with this setup?

yes, i's working in 3V of sonoff basic after more than one year

I have tried this setup now but found that the device was not transmitting. when i disconnected the resistor, it was working fine.

hacksics commented 3 years ago

Just FYI if ENERGY_WATCHDOG is set to higher value, then tasmota stops reading from the pzem (it goes to some kind of the dead lock) - I need to investigate this more.

I have had this problem in 9.2.0 and setting the ENERGY_WATCHDOG = 60. Sometimes 4 is not enough as it will show 0 voltage time to time.

To check if my PZEM was the problem, I checked the DC voltage coming to PZEM and it's 5.1V. I've plugged in the PZEM to windows machine and used the Peacefair application to check and it was working fine without voltage dropouts. So my guess is something causing tasmota not to send the PzemAcModbus->Send() command.

I will investigate more.