Hello,
I need to read the actual power from P34S02 meter via RS485 with Arduino Mega.
I got this specification from utility company:
"Every 30 seconds at 19200 Bd meter of serial no.3400100688 in mode D sends data defined by the attached table."
Can anyone point me to the right direction, or provide an example ardino project for this?
Read this. I hope it helps you to get started with IEC, but you don't need to send anything for the meter, just listen to the serial port. https://www.gurux.fi/Gurux.DLMS.Iec
In general, you can listen to your serial port with any terminal application and you can see the meter data in a string. You need to parse the received data. If you add the data here I can check if you can use one library to parse it.
0000 af 41 55 d8 35 50 33 b4 53 c5 cc 53 2d 30 47 50 .AU.5P3.S..S-0GP
0010 b1 b2 b2 8d 0a 8d 0a 30 2e 39 2e b2 28 30 b2 33 .......0.9..(0.3
0020 30 b1 b1 33 a9 8d 0a 30 2e 39 2e b1 28 30 b1 b7 0..3...0.9..(0..
0030 b4 b8 b4 b1 a9 8d 0a b1 2e 36 2e 30 28 b1 35 2e .........6.0(.5.
0040 b8 b4 30 aa eb d7 a9 28 30 b2 33 30 b1 b1 33 b1 ..0....(0.30..3.
0050 b7 b1 35 30 30 a9 8d 0a b1 2e b8 2e 30 28 30 30 ..500.......0(00
0060 30 30 33 35 b8 b8 aa eb d7 e8 a9 8d 0a b1 2e b8 0035............
0070 2e b1 28 30 30 30 30 33 35 b8 b2 aa eb d7 e8 a9 ..(000035.......
0080 8d 0a b1 2e b8 2e b2 28 30 30 30 30 30 30 30 35 .......(00000005
0090 aa eb d7 e8 a9 8d 0a 35 2e b8 2e 30 28 30 30 30 .......5...0(000
00a0 30 30 30 30 b2 aa eb f6 e1 72 e8 a9 8d 0a 36 2e 0000.....r....6.
00b0 b8 2e 30 28 30 30 30 30 30 30 30 b1 aa eb f6 e1 ..0(0000000.....
00c0 72 e8 a9 8d 0a b7 2e b8 2e 30 28 30 30 30 30 30 r........0(00000
00d0 b2 b4 35 aa eb f6 e1 72 e8 a9 8d 0a b8 2e b8 2e ..5....r........
00e0 30 28 30 30 30 30 b1 39 33 33 aa eb f6 e1 72 e8 0(0000.933....r.
00f0 a9 8d 0a 33 b2 2e b7 2e 30 28 b2 33 b7 aa 56 a9 ...3....0(.3..V.
0100 8d 0a 35 b2 2e b7 2e 30 28 b2 33 b8 aa 56 a9 8d ..5....0(.3..V..
0110 0a b7 b2 2e b7 2e 30 28 b2 33 b7 aa 56 a9 8d 0a ......0(.3..V...
0120 33 b1 2e b7 2e 30 28 30 b2 30 2e b7 b8 aa 41 a9 3....0(0.0....A.
0130 8d 0a ..
0000 35 b1 2e b7 2e 30 28 30 b1 b7 2e 35 35 aa 41 a9 5....0(0...55.A.
0010 8d 0a b7 b1 2e b7 2e 30 28 30 b1 b7 2e 30 35 aa .......0(0...05.
0020 41 a9 21 8d 0a A.!..
I can somewhat grasp what should be there, but many characters are garbled in ASCII in both Wireshark and netcat ( I have the meter connected via Waveshare RS485 to ETH converter, but that shouldn't be a problem..?
Do You have an idea how to read the numbers correctly?
Hi,
Hi,
Mode D is EC 62056-21 ASCII mode. So it's easier to parse.
https://www.gurux.fi/DLMSCOSEMFAQ
Read this. I hope it helps you to get started with IEC, but you don't need to send anything for the meter, just listen to the serial port.
https://www.gurux.fi/Gurux.DLMS.Iec
In general, you can listen to your serial port with any terminal application and you can see the meter data in a string. You need to parse the received data. If you add the data here I can check if you can use one library to parse it.
BR,
Mikko
Hello Thanks for moving me…
Hello
Thanks for moving me forward.
This is what I get from RS485:
0000 af 41 55 d8 35 50 33 b4 53 c5 cc 53 2d 30 47 50 .AU.5P3.S..S-0GP
0010 b1 b2 b2 8d 0a 8d 0a 30 2e 39 2e b2 28 30 b2 33 .......0.9..(0.3
0020 30 b1 b1 33 a9 8d 0a 30 2e 39 2e b1 28 30 b1 b7 0..3...0.9..(0..
0030 b4 b8 b4 b1 a9 8d 0a b1 2e 36 2e 30 28 b1 35 2e .........6.0(.5.
0040 b8 b4 30 aa eb d7 a9 28 30 b2 33 30 b1 b1 33 b1 ..0....(0.30..3.
0050 b7 b1 35 30 30 a9 8d 0a b1 2e b8 2e 30 28 30 30 ..500.......0(00
0060 30 30 33 35 b8 b8 aa eb d7 e8 a9 8d 0a b1 2e b8 0035............
0070 2e b1 28 30 30 30 30 33 35 b8 b2 aa eb d7 e8 a9 ..(000035.......
0080 8d 0a b1 2e b8 2e b2 28 30 30 30 30 30 30 30 35 .......(00000005
0090 aa eb d7 e8 a9 8d 0a 35 2e b8 2e 30 28 30 30 30 .......5...0(000
00a0 30 30 30 30 b2 aa eb f6 e1 72 e8 a9 8d 0a 36 2e 0000.....r....6.
00b0 b8 2e 30 28 30 30 30 30 30 30 30 b1 aa eb f6 e1 ..0(0000000.....
00c0 72 e8 a9 8d 0a b7 2e b8 2e 30 28 30 30 30 30 30 r........0(00000
00d0 b2 b4 35 aa eb f6 e1 72 e8 a9 8d 0a b8 2e b8 2e ..5....r........
00e0 30 28 30 30 30 30 b1 39 33 33 aa eb f6 e1 72 e8 0(0000.933....r.
00f0 a9 8d 0a 33 b2 2e b7 2e 30 28 b2 33 b7 aa 56 a9 ...3....0(.3..V.
0100 8d 0a 35 b2 2e b7 2e 30 28 b2 33 b8 aa 56 a9 8d ..5....0(.3..V..
0110 0a b7 b2 2e b7 2e 30 28 b2 33 b7 aa 56 a9 8d 0a ......0(.3..V...
0120 33 b1 2e b7 2e 30 28 30 b2 30 2e b7 b8 aa 41 a9 3....0(0.0....A.
0130 8d 0a ..
0000 35 b1 2e b7 2e 30 28 30 b1 b7 2e 35 35 aa 41 a9 5....0(0...55.A.
0010 8d 0a b7 b1 2e b7 2e 30 28 30 b1 b7 2e 30 35 aa .......0(0...05.
0020 41 a9 21 8d 0a A.!..
I can somewhat grasp what should be there, but many characters are garbled in ASCII in both Wireshark and netcat ( I have the meter connected via Waveshare RS485 to ETH converter, but that shouldn't be a problem..?
Do You have an idea how to read the numbers correctly?
Thanks