# IR data from Landis+Gyr E350

I have purchased a ir->serial port cable for reading from the IR-port on electrical meters.

With the included program meter.exe, I can only get this:

C:\extra\Downloads\meter>meter -port=com3
olcdtool version 1.00
Opening: com3, baud: 300
Meter ID: /LGZ4ZMF100AC.M29


then what looks like a question mark in a square.

But no data.

Any clues? Can the power company turn off the port so it sends no data?

Here is the reader software: https://www.dropbox.com/s/qjhykezcojkt3g7/meter.zip?dl=0

• Where did you get that program meter.exe from? Can you add some link to the product? – Al Bundy May 16 '17 at 19:35
• I got it with the cable; I can post it later. – Lenne May 17 '17 at 7:40
• Did you solve the issue? – Al Bundy May 25 '17 at 16:06
• No, but now I added a link to the reader software. (on dropbox, but is available without login) – Lenne May 29 '17 at 15:47
• Look at the IR transmitter trough your phone camera and see if it lights up. – kva May 29 '17 at 15:48

For this 300 baud 7E1 counter, you need to trigger the answer. Below example is on my Raspberry Pi system:

echo -n -e '\x2F\x3F\x21\x0D\x0A' > /dev/ttyUSB0


I think the above command is exactly what gives you your output ("LGZ4ZMF100AC.M29"). Then WITHIN 2 s max you need to send the next command:

echo -n -e '\x06\x30\x30\x30\x0D\x0A' > /dev/ttyUSB0


This should then trigger the answer from the device. In my case it gives me

F(00)
C.1.0(38294136)
0.0(70148674        )
C.1.1(        )
1.8.1(000093.853*kWh)
1.8.2(000004.012*kWh)
1.8.3(000004.013*kWh)
1.8.4(000004.013*kWh)
1.8.5(000004.014*kWh)
1.8.6(000004.014*kWh)
1.8.0(000113.919*kWh)
2.8.1(001870.106*kWh)
2.8.2(000000.000*kWh)
2.8.3(000000.000*kWh)
2.8.4(000000.000*kWh)
2.8.5(000000.000*kWh)
2.8.6(000000.000*kWh)
2.8.0(001870.106*kWh)
15.8.0(001984.028*kWh)
C.5.0(4401)
C.7.0(0009)
32.7(232*V)
52.7(231*V)
72.7(230*V)

• Most interesting. I'll try this and report back. – Lenne Oct 14 '17 at 16:28
• @Transistor Which port did you put the "eye" on? I have a port at the top and one in the middle on a GSM-module. – Lenne Oct 17 '17 at 9:56
• Did not work. Tried both ports :-( – Lenne Oct 17 '17 at 10:50
• It's not my answer, it's user165748. Write to him - I only fixed the formatting. – Transistor Oct 17 '17 at 13:20
• We talk about landis+gyr 350, correct? Mine looks like shown here landisgyr.de/product/… I have no module installed and the only optical IR port is on the right handed front side of the device (see pic in linked description). My IR head has a magnet build in and you just plug it on the port, cable pointing down. – user165748 Oct 19 '17 at 4:25

I couldn't get read from serial port to work, so I did this instead: cat /dev/ttyUSB0 to a file, and tail'ing until the end character "!"

#!/bin/bash
EYE=/dev/ireye             #ttyUSB number may change
find /dev -type f -delete  #remove real files in /dev
TMPFILE=mktemp
trap 'kill $CHILD; rm$TMPFILE' 0 #cleanup at exit
stty -F $EYE 300 cs7 parenb -parodd clocal -hupcl -opost -onlcr ignbrk ignpar -icrnl -isig -icanon -iexten -echo -echoe -echoctl -echoke #send output from meter to tempfile cat$EYE>$TMPFILE & CHILD=$!
sleep 1
echo -n -e "\x2F\x3F\x21\x0D\x0A">$EYE sleep 2 echo -n -e '\x06\x30\x30\x30\x0D\x0A'>$EYE
t=0
sleep 1
until tail $TMPFILE|grep "!" do sleep 1 t=expr$t + 1
echo -n "$t " if [$t -gt 40 ]
then
echo "Timeout"
exit 1
fi
done
# convert to json and send to mqtt
awk -f /root/j.awk $TMPFILE | mqtt-simple -h localhost -r -p smartmeter kill$CHILD

echo "done \$t polls"