Flowcode8 Modbus with PZEM-004T Power Monitor

For general Flowcode discussion that does not belong in the other sections.
chipfryer27
Valued Contributor
Posts: 1685
http://meble-kuchenne.info.pl
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 374 times
Been thanked: 583 times

Re: Flowcode8 Modbus with PZEM-004T Power Monitor

Post by chipfryer27 »

Hi

If I click on the link I'm informed the attachment doesn't exist any more. Watt is going on? A bit Phased perhaps? Maybe a Volt-face in offering the component? I think I should go now :)

Regards

medelec35
Matrix Staff
Posts: 2086
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 644 times
Been thanked: 702 times

Re: Flowcode8 Modbus with PZEM-004T Power Monitor

Post by medelec35 »

Sorry, I was editing the post.
I have finished editing now so should be all good to go. :)
Martin

chipfryer27
Valued Contributor
Posts: 1685
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 374 times
Been thanked: 583 times

Re: Flowcode8 Modbus with PZEM-004T Power Monitor

Post by chipfryer27 »

Hi

Got it thanks. I'll try and have a play with it tomorrow.

Regards

medelec35
Matrix Staff
Posts: 2086
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 644 times
Been thanked: 702 times

Re: Flowcode8 Modbus with PZEM-004T Power Monitor

Post by medelec35 »

Great, thanks.
I would be interested in feedback, positive or negative as that is how we can improve components. :)
Martin

chipfryer27
Valued Contributor
Posts: 1685
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 374 times
Been thanked: 583 times

Re: Flowcode8 Modbus with PZEM-004T Power Monitor

Post by chipfryer27 »

Hi

Dug out my old gadget (still works) so I'll try and test tomorrow.

Regards

chipfryer27
Valued Contributor
Posts: 1685
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 374 times
Been thanked: 583 times

Re: Flowcode8 Modbus with PZEM-004T Power Monitor

Post by chipfryer27 »

Hi

When you hover over ReadPowerAlarmThreshold it informs that it will read the value in Watts. All good there.

However if you hover over SetPowerThresholdLevel it informs that it is going to request register vales blah, blah, and if you hover over PowerThresholdValue it informs it wants the Reg Address of the high value. Methinks your fingers got tired typing :)

I'll get back to you later once I've connected it up.

Regards

colinwoodcock
Posts: 14
Joined: Thu Dec 10, 2020 2:40 pm

Re: Flowcode8 Modbus with PZEM-004T Power Monitor

Post by colinwoodcock »

Hi Martin,

I've just installed Flowcode 10 and downloaded the component so I will test it over the next day or two and let you know. Thanks for all your efforts! Regards, Colin.

chipfryer27
Valued Contributor
Posts: 1685
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 374 times
Been thanked: 583 times

Re: Flowcode8 Modbus with PZEM-004T Power Monitor

Post by chipfryer27 »

Hi

Thought I'd make things difficult :)

Rather than use the ESP32 as per the FAD project, I used a Pi Pico (which is new to me) and fc10..32. I connected the module and also a little OLED based on SSD1306.

Completely forgetting to use the FloatToString$ function I wondered why I wasn't getting expected values :)

Once the grey cells kicked in I'm pleased to say that everything appears to work fine.

I could read all values and I set a Threshold Value too. If the threshold was reached it would alert me to such and then reset Energy value.

With the threshold set at 1000, even with the Bay Lights on in the Evil Lab I was still a good way off, and in each iteration of my loop I'd see the Energy value increase. Switching on a power hungry machine triggered the alarm and subsequently reset the energy value.

Note that all the above was just to test functionality and I'm not suggesting resetting your Energy value should be linked to overshooting a threshold, well unless you actually want to...

Thanks for creating the component and other than the "tool tip" issue mentioned previously it seems to work well.

Regards

medelec35
Matrix Staff
Posts: 2086
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 644 times
Been thanked: 702 times

Re: Flowcode8 Modbus with PZEM-004T Power Monitor

Post by medelec35 »

@Iain
Thanks for the great spot.
I have corrected that, and I need to correct some console messages as well.
I will post a corrected version on Monday.
Also thanks for testing the component out.
I'm glad it's working well.

@Colin
You're welcome.
There will be some finishing touches required e.g. like the post above.
Hopefully, all functionality will be working as expected for you as well.
Martin

colinwoodcock
Posts: 14
Joined: Thu Dec 10, 2020 2:40 pm

Re: Flowcode8 Modbus with PZEM-004T Power Monitor

Post by colinwoodcock »

Hi Martin,

I've tested this new component today and it seems to be working fine. I am using a 300A/100mA current transformer with my power monitor so I have to multiply the amp, power and energy values by 3!!! There is just one thing, I notice that if there is no connection to the module, all values come back at maximum. Is there any way to report CRC and no reply errors as with the Modbus component to trap these? Otherwise, all good so far. Regards, Colin.

Post Reply