johnblackmore / cc128-php-extractor

PHP cli program to extract data from cc128 serial link and create graphs + python script for batch upload to powermeter TAGS: currencost, cc128, php, google visualization, web, python, powermeter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cc128-php-extractor is a PHP program to make graphics from your current cost cc128 device.
------------------------------------------------------------------------------------------

Actually there is 2 parts :
- PHP extractor (ENVI => PHP => Sqlite)
- Python upload (Sqlite => Python => Google Power Meter)

In a future release PHP extractor will be replaced with a python one.


The program use the 2-hour consumption average so it needs to be pluged all the 30 days 
to don't loose any data.


PHP extractor usage :

- configure serial port into cc128.php
- hold down OK and down buttons on the cc128 (current cost) untill led is flashing
- run in a console 
	$ php cc128.php
- the program is acquiring new data and store them
- you should now have an cc128.db sqllite file
- the db file is used to generated a javascript file holding all the plots
- open index.html in your browser and review your power consumption


to refresh data :
- use the same procedure (only new data will be added)


Python upload usage :
- configure authToken and variable path in config
- run in a console
	$ ./sqlite2googlepowermeter.py -f full_path_to_config_file path_to_sqlite_file



please report bugs at : http://github.com/ka2er/cc128-php-extractor/issues 

About

PHP cli program to extract data from cc128 serial link and create graphs + python script for batch upload to powermeter TAGS: currencost, cc128, php, google visualization, web, python, powermeter