Okay, a bit more info on the Perl script.
On a reasonably clean Ubuntu 10.04.3 LTS server install, the script works without needing to install any additional Perl modules.
Open the script in a text editor and change line 14 where it says meterIP to the IP address of your meter. Ours has a static IP. So from:
my $url = 'http://meterIP/ChannelData.xml';
or whatever it should be.
my $url = 'http://10.0.0.241/ChannelData.xml';
Save and exit.
Copy the script to somewhere on the machine you want to use and give it a meaningful name. Mine's called emdmp.pl and lives in /home/pete/bin
The following instructions assume you're using a terminal prompt (aka command prompt).
Make it executable:
Test it without any options:
pete@memory:~/bin$: chmod +x emdmp.pl
You should get
Screen shot 2011-11-16 at 14.33.27.png
Now let's see if we can talk to the meter. Let's grab everything:
and you'll see something like this:
pete@memory:~/bin$: ./emdmp.pl -a
Screen shot 2011-11-16 at 14.35.19.png
If that works, we can start automating it by getting crontab (like scheduled tasks on Windows) to call the script every five minutes.
Screen shot 2011-11-16 at 14.38.51.png
pete@memory:~/bin$: crontab -e
In the above example we're calling the script every five minutes and adding the result onto the end (note double ">" ) of a csv file in a web-accessible directory. Ours is web-accessible so it's available to anyone.
Whoever is running the script via crontab needs to be able to write to that directory. If you don't care about making it web accessible, just modify crontab to write to your home directory by changing:
And yes, I like hideous terminal colours.