Serial Volt/Amp meter
Posted: Tue May 01, 2012 8:03 pm
Hello all. Loving this setup for weather. Ive also hacked my nlsu2 to have two more USB ports and added usb/serial adapters to read the output of my Solar/battery system (I use 2 wattsview serial power meters). Knowing nothing about perl programming Im at a bit of a loss on how to set these up. Currently this is what I have done:
seeing that (or ttyUSB1) will output:
I ipkged netcat and made some simple user scripts and :
Using two scripts I put them in one script to call both using . Im not a shell programmer either so Im not certain how to make both devices be read sequentially from one script. Frankly I'm amazed I've gotten this far!
Either way I'm at the point where I either need to get this done right as a "plugin" for meteohub or at the very least get the scripts cleaned up and auto starting at bootup. Graphing would be nice, but at this point I just need to check the status. I don't know how it would be accomplished but rewriting the ASCII output from the power meters to extract Volts and Amps would be nice and make graphing easier.
Just really an exploratory post at this point.
Anyone have any thoughts? Id put a small bounty out if someone wanted to write a script for me and help me get it working
Thanks for any comments!
Bryan
seeing that
Code: Select all
cat /dev/ttyUSB0
Code: Select all
00016.3V-00013.4A 00218.2W 00557.5WH
Code: Select all
./scripts/charge
Code: Select all
./scripts/load
Code: Select all
while true; do nc -i 10 -l -p 8082 < /dev/ttyUSB0 ; done
Code: Select all
./elec
Either way I'm at the point where I either need to get this done right as a "plugin" for meteohub or at the very least get the scripts cleaned up and auto starting at bootup. Graphing would be nice, but at this point I just need to check the status. I don't know how it would be accomplished but rewriting the ASCII output from the power meters to extract Volts and Amps would be nice and make graphing easier.
Just really an exploratory post at this point.
Anyone have any thoughts? Id put a small bounty out if someone wanted to write a script for me and help me get it working
Thanks for any comments!
Bryan