0
\$\begingroup\$

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?

EDIT: The adapter is this: http://www.ebay.co.uk/itm/Optical-Probe-IEC1107-IEC61107-62056-21-with-USB-cable-Windows-10-version-/201922292332?

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

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

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)
\$\endgroup\$
  • \$\begingroup\$ Most interesting. I'll try this and report back. \$\endgroup\$ – Lenne Oct 14 '17 at 16:28
  • \$\begingroup\$ @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. \$\endgroup\$ – Lenne Oct 17 '17 at 9:56
  • \$\begingroup\$ Did not work. Tried both ports :-( \$\endgroup\$ – Lenne Oct 17 '17 at 10:50
  • \$\begingroup\$ It's not my answer, it's user165748. Write to him - I only fixed the formatting. \$\endgroup\$ – Transistor Oct 17 '17 at 13:20
  • \$\begingroup\$ 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. \$\endgroup\$ – user165748 Oct 19 '17 at 4:25
0
\$\begingroup\$

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"
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.