My wife consumes too much energy!!

I use emoncms with phptimeserie engine.

The energy is gone for about 20 minutes.  I have problems with the feed. I attach the file to show the series.

 

how do I delete the wrong data?

 

Thank

nathanmonk's picture

Re: My wife consumes too much energy!!

In my family it is the kids that use up the wifi not the wife ;-) Sorry couldn't help myself. Not sure of the answer sorry.

regards

Nathan

zeno's picture

Re: My wife consumes too much energy!!

The power consumption of my wife is a joke! In a image shows a total energy consumption of 277000 kw in one day!!

I found the file feed_33.MYD but do not know how to change it.

 

Simonk695's picture

Re: My wife consumes too much energy!!

Hi, The following information is for an 'Emoncms' and MySQL setup, not sure if yours is the same (phptimeserie engine?)

You will need to edit the MySQL database to change the values for those that you currently have.

First off, backup your data, so from the Linux shell prompt type: -

mysqldump - u root -p -- emoncms > /home/pi/2014-06-27.sql

Then enter you MySQL root password.

Use ls -l to check the file is there.

use emoncms;

SELECT time, FROM_LINUXTIME(time), data FROM feed_33;

This will locate the rogue data (I hope!)

UPDATE feed_33 SET data = 0 WHERE time = 123456;

The 123456 is the UNIX_Time value.

Hope this helps!

 

 

 

 

Simonk695's picture

Re: My wife consumes too much energy!!

Hi, Looks like you may have to search the database for the error. First backup the database, at the Linux command shell type (less quotes): - "mysqldump -u root -p -- emoncms > /home/pi/2014-06-27_Backup.sql" and press enter. Enter the password for the database 'root' user. Check that the file has been created "ls -l /home/pi" Log into MySQL. Check the table for dates and values... "USE emoncms;" "SELECT time, WHERE_UNIXTIME(time), data FROM feed_33;" You may have dates that have gone back in time, was the Pi reset around that time? If so, you will have to work out how to convert the time into UNIXTIME and correct the data. Like this. Find the data.. "SELECT time, FROM_UNIXTIME(time), data FROM feed33;" Then to correct the date for the right line... "UPDATE feed_33 SET time = 123456 WHERE time = 78910 and data = 234; The first number is the new date/time, the second is the out of synch number and the last three digits is the data value. Without seeing the data, it's hard to nail the script.

Simonk695's picture

Re: My wife consumes too much energy!!

Sorry for the double-tap.  The first post didn't show!

zeno's picture

Re: My wife consumes too much energy!!

Thank Simonk685

I have phpmyadmin, but in mysql don't exist table feed_33 becouse feed data is in file feed_33.MYD (PHPTIMESERIES engine). 

I used mysql but the raspberry crashed every 10 days, with phptimeseries engine is much better.

Zeno

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.