You may be able to using RS485 (PZEM-016). Someone used it for 3 phase. Try looking in the Projects pages.
Sent from Mail for Windows
--
You received this message because you are subscribed to the Google Groups "TasmotaUsers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonoffusers...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/sonoffusers/bdd9da84-774f-43c2-b92e-495ee37b8862n%40googlegroups.com.
Assign the serial ports to the GPIO in configuration...
From: Khurram
Sent: 01 October 2023 11:30
To: TasmotaUsers
Subject: Re: Connect pzem-004t and pzem-017 to same controller
I am not able to use these commands on as ESP32. The pzem-017 is on gpio16+17 and its data shows on the homepage. I am trying to get pzem-004t data through serial bridge. I have tried to assign serbr rx/tx on gpio 33/32. But the SerialSend5 (or SSerialSend5) command does not return any data (the command is sent successfully in both cases as indicated by the "SerialSend":"Done" message in the console). How do I tell the ESP32 to send the serial commands through the gpio 33/32 serial port?
Thanks.
On Thursday, 28 September 2023 at 17:00:56 UTC+5 Khurram wrote:
The (very long) tasmota thread mentioned in the previous post holds an answer which works great for my purpose. @adityama suggested using serialbridge in tasmota to poll the pzem (in fact, he is polling 3 pzems for 3 phase AC monitoring) and transform the result in a nodered flow. This is a great solution to my problem. He describes his solution here, the serialbridge commands are here and the nodered flow is here. I could not get software serialbridge commands to work on my esp8266 nodemcu controller, but hardware serialbridge commands work fine.
Thanks
On Saturday, 23 September 2023 at 13:06:32 UTC+5 knowles...@gmail.com wrote:
The protocols are different 004 uses RS232 016/7 use RS485. In theory there's nothing to stop you using separate GPIOs for each device (but suspect it might not work).
There is a (long) thread of something similar.
Sent from Outlook for Android
From: sonof...@googlegroups.com <sonof...@googlegroups.com> on behalf of Andrew L <pkkr...@gmail.com>
Sent: Saturday, September 23, 2023 8:30:12 AM
To: TasmotaUsers <sonof...@googlegroups.com>
Subject: Re: Connect pzem-004t and pzem-017 to same controller
If the PZEM-017 is similar in communication style to the 004, I think you should be able to use scripting and treat each of them as a smart meter. Or just use the PZEM-004 as a smart meter, and define the 017 traditionally. https://tasmota.github.io/docs/Smart-Meter-Interface/#peacefair-pzem004tv30-modbus
However, worth bringing up on Github as a feature request. Seems worthy of consideration, but I don't know how much coding would be involved.
On Friday, September 22, 2023 at 11:48:25 AM UTC Khurram wrote:
At the moment, I don't think it is possible to connect both the pzem-004t and pzem-017 to the same controller (esp8266/esp32 based). I would like to measure both the DC battery voltage+current and AC voltage+current from an inverter without using 2 esp controllers. I cannot find anything in the web interface as there is just 1 PZEM Tx gpio setting. Is it possible to edit the code to support Tx separately for the 2 pzems?
Thanks
--
You received this message because you are subscribed to the Google Groups "TasmotaUsers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonoffusers...@googlegroups.com.To view this discussion on the web, visit https://groups.google.com/d/msgid/sonoffusers/8a9d4cc2-d320-4681-8491-9ef387003af8n%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "TasmotaUsers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonoffusers...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/sonoffusers/3eaf0257-00ca-42ea-ac04-70cdcc7f16a4n%40googlegroups.com.
Not at home so can't check but Serial Bridge Tx is not the same as Serial Tx
Sent from Outlook for Android
From: Khurram
Sent: 02 October 2023 08:08
To: TasmotaUsers
Subject: Re: Connect pzem-004t and pzem-017 to same controller
I have replaced SerBr Tx/Rx with Serial Tx/Rx but I still do not get any response to the SerialSend5 command. I have swapped the gpios between Tx and Rx as well, but still get no result.
On Monday, 2 October 2023 at 01:41:09 UTC+5 knowles...@gmail.com wrote:
Not at home so can't check but Serial Bridge Tx is not the same as Serial Tx
Sent from Outlook for Android
From: sonof...@googlegroups.com <sonof...@googlegroups.com> on behalf of Andrew L <pkkr...@gmail.com>
Sent: Sunday, October 1, 2023 7:53:05 PM
To: TasmotaUsers <sonof...@googlegroups.com>
Subject: Re: Connect pzem-004t and pzem-017 to same controller
Can you just use hardware serial on GPIO1 and 3? Ideally you could use a logic analyzer to see whether anything is being output to the pins you expect. They're cheap. https://www.aliexpress.us/item/3256803056912561.html?spm=a2g0o.productlist.main.3.10f87f6ciYjZkv&algo_pvid=69511905-8fb1-4d21-a678-8ac7cc0ad778&algo_exp_id=69511905-8fb1-4d21-a678-8ac7cc0ad778-1&pdp_npi=4%40dis%21USD%215.93%214.92%21%21%215.93%21%21%402103231116961863247051743e497f%2112000024825198543%21sea%21US%212667998236%21&curPageLogUid=NLJoqs15KAgd
On Sunday, October 1, 2023 at 4:57:52 PM UTC Khurram wrote:
I am assigning the gpios as shown in the picture.
What am I doing wrong?
Thanks
On Sun, Oct 1, 2023, 5:50 PM Philip Knowles <knowles...@gmail.com> wrote:
Assign the serial ports to the GPIO in configuration...
Sent from Mail for Windows
From: Khurram
Sent: 01 October 2023 11:30
To: TasmotaUsers
Subject: Re: Connect pzem-004t and pzem-017 to same controller
I am not able to use these commands on as ESP32. The pzem-017 is on gpio16+17 and its data shows on the homepage. I am trying to get pzem-004t data through serial bridge. I have tried to assign serbr rx/tx on gpio 33/32. But the SerialSend5 (or SSerialSend5) command does not return any data (the command is sent successfully in both cases as indicated by the "SerialSend":"Done" message in the console). How do I tell the ESP32 to send the serial commands through the gpio 33/32 serial port?
Thanks.
On Thursday, 28 September 2023 at 17:00:56 UTC+5 Khurram wrote:
The (very long) tasmota thread mentioned in the previous post holds an answer which works great for my purpose. @adityama suggested using serialbridge in tasmota to poll the pzem (in fact, he is polling 3 pzems for 3 phase AC monitoring) and transform the result in a nodered flow. This is a great solution to my problem. He describes his solution here, the serialbridge commands are here and the nodered flow is here. I could not get software serialbridge commands to work on my esp8266 nodemcu controller, but hardware serialbridge commands work fine.
Thanks
On Saturday, 23 September 2023 at 13:06:32 UTC+5 knowles...@gmail.com wrote:
The protocols are different 004 uses RS232 016/7 use RS485. In theory there's nothing to stop you using separate GPIOs for each device (but suspect it might not work).
There is a (long) thread of something similar.
Sent from Outlook for Android
From: sonof...@googlegroups.com <sonof...@googlegroups.com> on behalf of Andrew L <pkkr...@gmail.com>
Sent: Saturday, September 23, 2023 8:30:12 AM
To: TasmotaUsers <sonof...@googlegroups.com>
Subject: Re: Connect pzem-004t and pzem-017 to same controller
If the PZEM-017 is similar in communication style to the 004, I think you should be able to use scripting and treat each of them as a smart meter. Or just use the PZEM-004 as a smart meter, and define the 017 traditionally. https://tasmota.github.io/docs/Smart-Meter-Interface/#peacefair-pzem004tv30-modbus
However, worth bringing up on Github as a feature request. Seems worthy of consideration, but I don't know how much coding would be involved.
On Friday, September 22, 2023 at 11:48:25 AM UTC Khurram wrote:
At the moment, I don't think it is possible to connect both the pzem-004t and pzem-017 to the same controller (esp8266/esp32 based). I would like to measure both the DC battery voltage+current and AC voltage+current from an inverter without using 2 esp controllers. I cannot find anything in the web interface as there is just 1 PZEM Tx gpio setting. Is it possible to edit the code to support Tx separately for the 2 pzems?
Thanks
--
You received this message because you are subscribed to the Google Groups "TasmotaUsers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonoffusers...@googlegroups.com.To view this discussion on the web, visit https://groups.google.com/d/msgid/sonoffusers/8a9d4cc2-d320-4681-8491-9ef387003af8n%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "TasmotaUsers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonoffusers...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/sonoffusers/3eaf0257-00ca-42ea-ac04-70cdcc7f16a4n%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "TasmotaUsers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonoffusers...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/sonoffusers/41e1de28-5981-4c04-93b2-5776481fa0d8n%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "TasmotaUsers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonoffusers...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/sonoffusers/67a0905a-f17a-473e-b489-507795341866n%40googlegroups.com.
I THINK that the PZEM-004T driver handles the data request trigger and it then comes back into the appropriate driver buffer to handle.
To communicate with the PZEM-017 it uses MODBus but I think you might need to use SSerialSend if not using the hardware ports
From: Philip Knowles
Sent: 04 October 2023 12:55
To: Khurram; TasmotaUsers
Subject: RE: Connect pzem-004t and pzem-017 to same controller
Serial Bridge sends and receives data strings
From: Khurram
Sent: 02 October 2023 08:08
To: TasmotaUsers
Subject: Re: Connect pzem-004t and pzem-017 to same controller
I have replaced SerBr Tx/Rx with Serial Tx/Rx but I still do not get any response to the SerialSend5 command. I have swapped the gpios between Tx and Rx as well, but still get no result.
Serial is used for just serial comms like when you are flashing and some software is handling the comms
Serial Bridge is used for data transfer in packets – the ESP says tell me this and the other device responds with the data
To view this discussion on the web, visit https://groups.google.com/d/msgid/sonoffusers/2b868ff3-f234-4e6e-aac8-ccd63c0767een%40googlegroups.com.
ESP32 supports TasmotaSerial. ESP32 has 2 hardware serials 1/3 and 17/16. Any other GPIO will most likely need to use software serial
What you need to do is
Firstly, get one device to work using 1/3
Secondly, get the other device to work using 1/3 (I think that the stop bits are different)
Once you know that both devices work disconnect the device (and remove the configuration)
Thirdly, get the first device to work on 17/16
Fourthly, put the configuration into 1/3 and check the device on 16/17 still works
Fifthly, connect the second device to 1/3 again.
You can only check what will work once you know that they will work on the other GPIO.
To view this discussion on the web, visit https://groups.google.com/d/msgid/sonoffusers/75cc8c46-be58-4dc0-8d66-2baf23abd0een%40googlegroups.com.
%20scra.jpg?part=0.1&view=1)
I think I said a while back that the ESP32 should use TasmotaSerial and you may have needed to use SSerial if not using the default Tx/Rx but it’s working...
Sent from Mail for Windows
From: Khurram
Sent: 08 October 2023 12:17
To: TasmotaUsers
Subject: Re: Connect pzem-004t and pzem-017 to same controller
I have given up on using esp32 and have replaced it with a nodemcu. I am using the following configuration and it works great. I don't know what is wrong with the esp32 but nothing seems to work with SerBr Rx/Tx settings (whether assigned to gpio 1/3, 16/17, 21/22 and 32/33).
On Thursday, 5 October 2023 at 11:57:25 UTC+5 knowles...@gmail.com wrote:
That's why you need to get it working 'normally'. You don't know whether the issue is hardware, Tasmota or mis-coding
Sent from Outlook for Android
To unsubscribe from this group and stop receiving emails from it, send an email to sonoffusers..@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/sonoffusers/3ce978e8-2e8f-45de-a5de-dac681c44c7en%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "TasmotaUsers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonoffusers...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/sonoffusers/8a5352a1-ebf2-41ee-b653-6a7a93b24f1en%40googlegroups.com.