jorgebooks / measureit

Automatically exported from code.google.com/p/measureit
0 stars 0 forks source link

google import gives one error #8

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago

$ php -f ./import_google_powermeter.php 1 raw.csv 
file was found. 
Import is now starting.SQL Abfrage ist ungueltig. You have an error in your SQL 
syntax; check the manual that corresponds to your MySQL server version for the 
right syntax to use near '.000, 15, '2011-03-06' )' at line 1

i fix this by adding '' to all variables on the SQL statements, like:

$db->query( "INSERT INTO measure_watt_daily( sensor, data, time) values( 
'$argv[1]', '$daily', '$k' )" );

Original issue reported on code.google.com by dmotale...@gmail.com on 23 Aug 2011 at 6:21

GoogleCodeExporter commented 9 years ago
fixed. will be online in hte next version.

how is the import working? are the data ok after import?
I just had a small sample file to build this script

thx for feedback

Original comment by lalelu...@gmail.com on 23 Aug 2011 at 6:40

GoogleCodeExporter commented 9 years ago
i have a little less than 6 months of data in google and now that i'm looking 
better at it, seems that something is wrong...

viewing 12 Aug 2011 i have in google 11.6 MW/h (ignore the scale, in google all 
my values are 1000x bigger, dont know why) and in the import i get to the same 
day i get in measureit  69.67 KW/h. 

Checking the cvs and adding all values for that day i have the 11.6 MW/h.
On currentcostgui i get ~11,3 KW/h

so looks its doing something wrong... i'm guessing this:

$watt = ( $data[2] * 6 ) * 1000;

i dont understand why you are doing this, but looks to me that is the source of 
the problem. 

i dont mind sending you privately my raw data and some screenshots of google 
data if you want to test and compare.

thanks for this app, and again, sorry about the bug flood :)

Original comment by dmotale...@gmail.com on 24 Aug 2011 at 2:12

GoogleCodeExporter commented 9 years ago
I ask for feedback. That is my fault :)

If you could send me the data I will take a look. Thank you for your feedback. 
You can send the files to measureitsoft [at] gmail [dot] com

Original comment by lalelu...@gmail.com on 24 Aug 2011 at 3:45

GoogleCodeExporter commented 9 years ago
the script does not make sense since google remove the data and it seems that 
there are no more people out there that use it.

i will delete it from the next version

Original comment by lalelu...@gmail.com on 24 Jun 2013 at 5:06