CurrentCost cc128 Ubuntu data logging
Posted March 19, 2009on:
I decided to get some logging data from the CurrentCost (cc128) model which I have but I was having issues with getting data from the /dev/ttyUSB0 port at which it was attached using the pl2303 drivers for usb to serial.
A simple cat of /dev/ttyUSB0 lead to just gibberish been output on the terminal. Poking around at the system I found that the cable im using has the pl2303x chip set which can have driver issues with some older kernel modules. There are patchs for the older kernal modules which stop this device been picked up as the older incompatible pl2303 (see here). The real cause of my problems was the serial port settings which I was able to resolve by using minicom to set the right settings for the port.
The cc128 uses 57600 bps 8N1
You can use the minicom application to set this and then using cat /dev/ttyUSB0 will work fine for you.
Ill add another update later once I start logging the data. Plan is to be able to log all data to mysql DB, create a RRD file at the same time for some simple graphs and also allow a real time feed of the application in the form of an AJAX web client I think.
On a note for anyone who needs to factory reset there CurrentCost energy monitor you can just hold down any 2 of the buttons when powering up the device and it will reset everything to factory defaults.