Aims to periodically reads over IR the register of a Landis+Gyr E230 Power Meter and displays some statistics in a console app
echo -n -e '\x2F\x3F\x21\x0D\x0A' > /dev/ttyUSB0
C#
application
manually the output can be read while having run this command before chating with the unit.
cat /dev/ttyUSB0
This output has been read using the cat
-command.
/LGZ4ZMR120AC.K750
/LGZ4ZMR120AC.K750
F.F.0(00000000)
0.0.2( 175225)
0.0.0(13267131)
0.0.3( )
1.8.1(024581.111*kWh)
1.8.2(019882.194*kWh)
2.8.1(000000.000*kWh)
2.8.2(000000.000*kWh)
1.8.0(044463.305*kWh)
2.8.0(000000.000*kWh)
15.8.0(044463.305*kWh)
C.7.0(0053)
32.7.0(233)
52.7.0(235)
72.7.0(236)
31.7.0(001.06)
51.7.0(001.93)
71.7.0(000.12)
p
Corresponding OBIS-Code: https://www.promotic.eu/en/pmdoc/Subsystems/Comm/PmDrivers/IEC62056_OBIS.htm
To ease the string-processing and posting results to http-based API I transform the bash-base sample into a python application.
Without those sources and references I would not have been able to achieve this result.