-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
After update 6.6.0.12 the PZEM004T no value is shown. #6585
Comments
Please note that the problem occurred after I updated from 6.6.0.6 to 6.6.0.15, I hope this information can narrow the problem window for you. |
There are a lot changes since 6.6.0.6, try do a 'reset 2' or 'reset 3' command to set firmware defaults and configure again the device. |
Cant confirm. Compiled latest development version with LCD support (exactly as https://github.com/arendst/Sonoff-Tasmota/wiki/PZEM004T,-Wemos-D1-Mini-and-a-1602-I2C-display) |
btw, dont use 2.5.2 anymore. It has a big known bug. Memory Manager is not in iRam. |
@Jason2866 do you use hardware or software serial? |
hardware serial |
Thought so. I suspect a software serial issue. Haven't time to investigate now. |
Argh. Software Serial biting again. Aren't there any logs of received data? |
No signal log receive yet.
|
BTW. how do i switch it to hard serial? |
Connect gpio 1 and 3 and use |
I used the same configuration like your template except I used a PZEM004T V2. |
If you restart Tasmota writes a message when hardware serial is used at the beginning in the console |
@s-hadinger and @arendst So it is not a software serial issue! |
Did some investigation and indeed I do not think it's serial related. There were changes in the PZEM004T driver to accomodate three of them connected in serial. In addition the address of the PZEM004T device changed from bogus IP address 192.168.1.1 to 0.0.01 As far as I know only the last octet is used by the PZEM004T software so it should still read a 1 and work. Since the change I only had positive reactions by people using one or three PZEM004T's. I was unable to test this on my PZEM004T as the esp8266 currently refuses to connect to my network. Anyway, this address is written to the device at power on or restart of the esp8266 only once. It may be this writing fails. HOLD ON. While scanning the code it seems this address writing doesn't work as before. You must do it yourself by executing command How could I forget.... |
SUCCESS!!! I just replaced my esp8266 with a new one and verified the PZEM004T worked fine on v6.5.0.2 Then upgraded to 6.6.0.15 and indeed the PZEM004 is gone. After executing command This behaviour is expected since version 6.6.0.12 where up to three PZEM004T's are supported on one serial channel. So this is certainly a big note once the new version is released. Thx for testing. |
the first time:
the second time: (replicated)
weblog 4:
screenshot:the third time: (you can bring it back to working)
the fourth time:
|
The command During power on the software expects three connected PZEM004T with addresses 3, 2 and 1. If no valid response is detected it lowers the amount of detected PZEM004T's and tries the next one. This process is only executed at restart/power on and will take a few seconds per PZEM004T. From your screenshot it appears it has detected two PZEM004T's and therefore the Your weblog shows a valid response from the PZEM004T reporting voltage but it is a byte out of sync. I will need to find a way to become in sync again. This may well be the cause why you see these unexpected results. To be continued... |
Please allow the original to act as a PZEM004T as ModuleAddress 1 to avoid affecting the current configuration of multiple user devices. If more than 1 module, assign the required address. |
I even need to permanently save the address of this module so that when it resets it is not lost. One last word is to allow the option to declare number of PZEM004 module in |
I'll revert the change from address 0.0.0.x to 192.168.1.x. This will solve the issue for users coming from a previous Tasmota version. It won't solve the issue for new users as the newly connected PZEM004T most probably will not have a default address of 192.168.1.1. In those cases the users will need to connect the PZEM004T and use command
The address is written to the PZEM004T and should be permanent. I see no info in the PZEM004T docs where it can be reset. There is not even a default address in the PZEM00T; initial connection can only be completed if the user software writes a known address to it first. Tasmota used to ise 192.168.1.1. I will reinstate this.
Scanning is the current functionality. It fails so I'll need to investigate. |
Mhh, just curios i came from a old version too. Never did command |
That's the brief period after restart where the PZEM's are being probed. Within some seconds it should stabilize to the once recognized.
I do not know. It didn't work for me either. At least with the latest fixes it should continue to use the legacy address of 192.168.1.1. |
For non-Modbus PZEM, doesn't Tasmota "know" how many are connected (or plan to be connected) by the number of Rx/Tx pairs configured so it can start the detection countdown with that number instead of starting with 3 each time? Yes, it's nice for Tasmota to detect, but if it's going to cause issues, perhaps an explicit parameter to manually set the number modules (1..3) to be connected? |
Both modbus and non-modbus are using only one Tx/Rx pair as that's just what is only supported. It should not cause issues with the latest fixes. I will see if I find a valid usecase... |
Hi @arendst It's working well now. Thank you!. |
6.6.0.18 |
Correct. Only 1, 2 or 3 are supported. This results in fake addresses 192.168.1.1, .2 and .3 |
Hello, I'm having troublems connecting PZEM-004T(v2.0) to a D1mini with Tasmota 6.6.0 (2.5.3). Thanks |
Thanks @ascillato. I already flashed D1mini with the 6.6.0.20, but unfortunatly I'm still having problems. I don't know if the problem is with the physical connection between D1mini and PZEM004T. 14:55:45 CMD: ModuleAddress 1 14:54:15 CMD: I2CScan Is this the expected result for the I2CScan command? Btw, I already tried with 3 different PZEM-004T boards (these boards are getting 5V from external source). Thanks |
PZEM004T is using serial to communication, not I2C. |
Hello @wongnam. Thanks for your reply, I did not have problems flashing the 6.6.020 version, so I think the problem is not related with the compilation. What type of logs could I check to see if everything is alright? Thanks |
if you have read through in this article that you will see this info https://github.com/arendst/Sonoff-Tasmota/wiki/PZEM004T,-Wemos-D1-Mini-and-a-1602-I2C-display |
Hello @wongnam, I connected PZEM-004T to an Arduino and with the PZEM library I could get data from the PZEM board, so, the board is ok, and the connections too. This was the steps that I made with Tasmota:
And again, no data from PZEM-004T. Thanks |
It seems that you haven't followed the instructions in the wiki yet, I see that your template parameters(TX, RX) are completely different from the instructions. Please double check the parameters and wiring. |
Hello @wongnam I don't understand how my template parameters are completely different from the instructions, I simply did a copy and paste, the parameters are the same as you can see: I also already tried every possible combinations with this template, and manually configurated the ports in Module Configuration and also tried all combinations. For every configuration I also changed the physical connections (TX and RX) in PZEM004T. Sorry to bother you again, but this is upseting me a lot. I also already tried with 3 other PZEM, and other ESP boards, always wihout success. If you could help again, I would highly appreciate it. Thanks. |
I am also having problems with the Pzem-004t 100A V3 hardware on esp32. I have it connected to the hardware pins, but PZEM simply does not respond to it. Blank data, and the TX led of the PZEM does not blink, only the RX. If I change the RX pin with PZEM17 instead of PZEM04, it starts responding, but obviously, the values are messed up. |
Have you fixed the issue @rotarucosminleonard ? Having the same problem and pulling my hairs out now! @AlfaBravoX's solution didn't work as well! |
Yup, seeing exactly the same issue here on Tasmota 13.1.0.1. Has any solution for this been found? Edit: I think I figured it out. Set your TX pin to "PZEM0XX TX" and your RX pin to "PZEM016 RX", and everything works perfectly with PZEM004 sensors. |
@Leapo this was the solution for my setup, too. I am using an NodeMCU ESP8266 with a PZEM-004T-100A and had set the following configuration: |
BUG DESCRIPTION
After update 6.6.0.15-2.5.2 the PZEM004T no value is shown.
Read the Contributing Guide and Policy and the Code of Conduct
Searched the problem in issues
Searched the problem in the wiki
Searched the problem in the forum
Searched the problem in the chat
Device used (e.g., Sonoff Basic): WEMOS D1 Mini/PZEM004T-V2.0
Tasmota binary firmware version number used: 6.6.0.15 Core2.5.2
Flashing tools used: OTA URL http://thehackbox.org/tasmota/release/sonoff.bin
Provide the output of command:
Backlog Template; Module; GPIO
:If using rules, provide the output of this command:
Backlog Rule1; Rule2; Rule3
:Provide the output of this command:
Status 0
:12:00:59 CMD: status 0
12:00:59 SRC: WebConsole from 192.168.12.125
12:00:59 CMD: Group 0, Index 1, Command "STATUS", Data "0"
12:00:59 MQT: stat/emonitor/STATUS = {"Status":{"Module":0,"FriendlyName":["Energy Monitor"],"Topic":"emonitor","ButtonTopic":"0","Power":1,"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}}
12:00:59 MQT: stat/emonitor/STATUS1 = {"StatusPRM":{"Baudrate":9600,"GroupTopic":"sonoffs","OtaUrl":"http://thehackbox.org/tasmota/release/sonoff.bin","RestartReason":"Software/System restart","Uptime":"0T00:11:53","StartupUTC":"2019-10-07T10:49:06","Sleep":50,"CfgHolder":4617,"BootCount":10,"SaveCount":27,"SaveAddress":"F9000"}}
12:00:59 MQT: stat/emonitor/STATUS2 = {"StatusFWR":{"Version":"6.6.0.15(48ec64c-sonoff)","BuildDateTime":"2019-10-07T12:06:27","Boot":31,"Core":"2_5_2","SDK":"2.2.2-dev(c0eb301)"}}
12:00:59 MQT: stat/emonitor/STATUS3 = {"StatusLOG":{"SerialLog":0,"WebLog":4,"MqttLog":0,"SysLog":0,"LogHost":"","LogPort":514,"SSId":["iot-2","Wong"],"TelePeriod":300,"Resolution":"558180C0","SetOption":["00008009","280500000100060000005A64000000000000","00000000"]}}
12:00:59 MQT: stat/emonitor/STATUS4 = {"StatusMEM":{"ProgramSize":564,"Free":436,"Heap":24,"ProgramFlashSize":1024,"FlashSize":4096,"FlashChipId":"164020","FlashMode":3,"Features":["00000809","8FDAE397","043683A0","22B617CD","01001BC0","00000081"],"Drivers":"1,2,3,4,5,6,7,8,9,10,12,16,18,19,20,21,22,24","Sensors":"1,2,3,4,5,6,7,8,9,10,14,15,17,18,20,22,26,34"}}
12:00:59 MQT: stat/emonitor/STATUS5 = {"StatusNET":{"Hostname":"emonitor-0307","IPAddress":"192.168.12.103","Gateway":"192.168.12.1","Subnetmask":"255.255.255.0","DNSServer":"210.245.31.220","Mac":"DC:4F:22:58:41:33","Webserver":2,"WifiConfig":4}}
12:00:59 MQT: stat/emonitor/STATUS6 = {"StatusMQT":{"MqttHost":"192.168.12.155","MqttPort":1883,"MqttClientMask":"DVES_%06X","MqttClient":"DVES_584133","MqttUser":"admin","MqttCount":1,"MAX_PACKET_SIZE":1000,"KEEPALIVE":30}}
12:00:59 MQT: stat/emonitor/STATUS7 = {"StatusTIM":{"UTC":"Mon Oct 07 11:00:59 2019","Local":"Mon Oct 07 12:00:59 2019","StartDST":"Sun Mar 31 02:00:00 2019","EndDST":"Sun Oct 27 03:00:00 2019","Timezone":"+01:00","Sunrise":"06:58","Sunset":"18:17"}}
12:00:59 MQT: stat/emonitor/STATUS9 = {"StatusPTH":{"PowerDelta":0,"PowerLow":0,"PowerHigh":0,"VoltageLow":0,"VoltageHigh":0,"CurrentLow":0,"CurrentHigh":0}}
12:00:59 MQT: stat/emonitor/STATUS10 = {"StatusSNS":{"Time":"2019-10-07T12:00:59","ENERGY":{"TotalStartTime":"2019-10-07T11:34:49","Total":0.608,"Yesterday":0.000,"Today":0.608,"Power":0,"ApparentPower":0,"ReactivePower":0,"Factor":0.00,"Voltage":0,"Current":0.000}}}
12:00:59 MQT: stat/emonitor/STATUS11 = {"StatusSTS":{"Time":"2019-10-07T12:00:59","Uptime":"0T00:11:53","UptimeSec":713,"Heap":26,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":1,"POWER":"ON","Wifi":{"AP":1,"SSId":"iot-2","BSSId":"70:3A:0E:39:0A:E1","Channel":6,"RSSI":62,"LinkCount":1,"Downtime":"0T00:00:08"}}}
Console output here:
The text was updated successfully, but these errors were encountered: