Read Data Serially by sending Commands via UART Ser2Net

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
asking
Normal user
Posts: 11
Joined: 11 Aug 2017, 06:39

Read Data Serially by sending Commands via UART Ser2Net

#1 Post by asking » 15 Jan 2018, 02:10

Hi,

I am trying to get value from https://www.aliexpress.com/item/PEACEFA ... 0.0.rWuUQY Electric Monitoring And Communication Module.

For Read the current voltage
Send command: B0 C0 A8 01 01 00 1A
Reply data: A0 00 E6 02 00 00 88

voltage data is D1D2D3 = 00 E6 02, 00 E6 represent the integer-bit of the voltage, 02 represent the decimal of the voltage, the decimal is one digit, converts 00 E6 to decimal is 230; converts 02 to decimal is 2, so the current voltage value is 230.2V.

I have setup Ser2Net and i was able to check via RealTERM its working. But i want to automate this and need to send 0xB0 0xC0 0xA8 0x01 0x01 0x00 0x1A from easy esp itself every few seconds and store its value in form of INT and then give to openhab2 for graphing.

Please guide which is the best way to do ?

User avatar
enesbcs
Normal user
Posts: 587
Joined: 18 Jun 2017, 11:02
Location: Békéscsaba, Hungary
Contact:

Re: Read Data Serially by sending Commands via UART Ser2Net

#2 Post by enesbcs » 15 Jan 2018, 07:28

asking wrote: 15 Jan 2018, 02:10 I have setup Ser2Net and i was able to check via RealTERM its working. But i want to automate this and need to send 0xB0 0xC0 0xA8 0x01 0x01 0x00 0x1A from easy esp itself every few seconds and store its value in form of INT and then give to openhab2 for graphing.

Please guide which is the best way to do ?
I think the best way to deal with this device is a plugin.
I can alter my P165 plugin to support it, but i do not own this device, so it won't be easy. :)

update: I just realized that this device is PZEM-004T which already has a plugin. (P171)

asking
Normal user
Posts: 11
Joined: 11 Aug 2017, 06:39

Re: Read Data Serially by sending Commands via UART Ser2Net

#3 Post by asking » 20 Jan 2018, 19:32

enesbcs wrote: 15 Jan 2018, 07:28
asking wrote: 15 Jan 2018, 02:10 I have setup Ser2Net and i was able to check via RealTERM its working. But i want to automate this and need to send 0xB0 0xC0 0xA8 0x01 0x01 0x00 0x1A from easy esp itself every few seconds and store its value in form of INT and then give to openhab2 for graphing.

Please guide which is the best way to do ?
I think the best way to deal with this device is a plugin.
I can alter my P165 plugin to support it, but i do not own this device, so it won't be easy. :)

update: I just realized that this device is PZEM-004T which already has a plugin. (P171)
You mean to say this plugin is already available in latest version of EasyESP ?

User avatar
enesbcs
Normal user
Posts: 587
Joined: 18 Jun 2017, 11:02
Location: Békéscsaba, Hungary
Contact:

Re: Read Data Serially by sending Commands via UART Ser2Net

#4 Post by enesbcs » 21 Jan 2018, 09:58

asking wrote: 20 Jan 2018, 19:32 You mean to say this plugin is already available in latest version of EasyESP ?
I said that the device is the same, and you can read&ask about this plugin at here:
viewtopic.php?f=5&t=2595&p=22585
The plugin marked as TESTING, and can be compiled for ESPEasy.
https://github.com/letscontrolit/ESPEas ... M-004T.ino

Post Reply

Who is online

Users browsing this forum: No registered users and 32 guests