The best I can really do so far is (from SSH):
Code: Select all
cat /dev/ttyUSB0
Code: Select all
00016.3V-00013.4A 00218.2W 00557.5WH
Here are my awk examples. To rewrite the output so either just volts or amps are displayed
Volts
Code: Select all
awk 'BEGIN {FS = "" } ; { print $5$6$7$8$9 }' /dev/ttyUSB0
Amps
Code: Select all
awk 'BEGIN {FS = "" } ; { print $14$15$16$17$18 }' /dev/ttyUSB0
And finally, my ham-handed attempt to write a script based on other examples here (Ideally I would rewrite each portion of 00016.3V-00013.4A 00218.2W 00557.5WH so I had V and A as separate sensors:
Code: Select all
#! /bin/sh
#
while :
do
# pull data filter the needed string
nc localhost 8082 /dev/stdout 2>/dev/null | gawk 'BEGIN {FS=""} {print $5$6$7$8$9} {printf "data9 %d\n" }'
# make sure output gets flushed
sync
# wait 300 seconds for next read
sleep 30
done
Thanks again for any advice, Im getting by just ssh into meteohub and cat-ing the serial port, but Id love to log and chart without having to dump modify and bring into another program like excel. Meteohub seems like it would be a perfect platform for this with most tools needed already present and numerous ways to approach the design. I also have a wmr-100 which is reading the weather fine.. see my page at weather undergound at:
http://www.wunderground.com/weatherstat ... =KCOHARTS4
Thanks!