This topic details a mini project using the EON Energy Monitor:
EON have being given them away “free” when you sign up to getting energy from them. It is infact a re-branded Current Cost Energy Monitor.
So using Chris Hand's infomation, the interface on the RJ45 is:
The level is 3.3v TTL so cannot be connected directly to an RS232 port, however I don't have one of them free anyway, so I used a USB to TTL 3.3v serial converter (also used by Chris Hand) from RS (part number 429-307). Current Cost do sell the cable for a good price, but what is the fun in that!!!
Using an old Ethernet cable for an RJ45, connecting the USB to serial convert to the RJ45 connector was easy:
Just connect the pin 4 (blue) of the RJ45 to pin 1 (black) on the TTL-232R-3V3 and connect pin 8 (brown) of the RJ45 to pin 5 (yellow) on the TTL-232R-3V3. If I get time I will make a better cable, but for now this works.
When the hardware connected, I used Minicom to check that it was working. There are two version of currrentCost available, one that runs at 2400 baud, and one that runs at 9600. Mine was a 9600.
The device spits out XML data every 6 seconds. You do not need to request data.
I wrote a simple c program to read the XML stream and convert into a CSV file that gnuplot can understand.
The code can be found here
This application runs on my Linux server and reads and converts the XML stream into the CSV file, I also have a cgi script to convert the CSV file into a picture.
This is an example plot: