OpenEnergyMonitor Community

Error Feed power to kwh after import from mysql into mariadb

Good morning,

the value of most feed whit power to kwh have an error after importing the database from mysql into mariadb. The value resulted is zero.

Instead the feed power to kwh/d is correct.

Is there a verification or regeneration tool?

Many thanks

Hello @michelino are your feeds stored in mysql or are they PHPFina/PHPTimeseries and you just moved the emoncms sql database?

Hello Trystan. my feeds isa strored in mysql. I just moved moved the emoncms sql database.That’s about 30 Gb. Only some values ​​of kwh (power to kwh) are incorrect, all other feeds including kwh-d are correct.
this is my public control : Emoncms - dashboard view

Ok, can you read from the mysql database the last valid value for the feeds and then update the last value to reflect the correct value?

Are you using redis by any chance to cache the last value of the feeds?

Is there a particular reason you cant use the PHPFina and PHPTimeSeries feed engines? I would recommend using these engines, there are actually post processing tools for power to kWh feeds available for the PHPFina feed engine.

You might be interested in @nchaveiro’s recent post on the topic of converting mysql feeds to phptimeseries in his case: Convert mySQL feeds to what? - #2 by TrystanLea

Hello, thanks for you solution.

Today i try to upgrade the correct value in the last written record.
Just a clarification: updating the last record with the correct value do I also alter the kwh-d value or is it indifferent?

I use hdd (ssd) and nont use redis.

My raspberry server is also used for other services including home automation .

Thanks for your suggestion regarding PHPFina.

If these are different feeds then it will not affect your kWh/d data.

It’s still worth using redis for performance even on a SSD, though it would make fixing this particular issue a little bit trickier as you’d need to update the record in redis not mysql.

Hello Trystan,
i have update the record of feed.

The value of the feed does not change in the feed list.

Is there a command to force the re-reading of the feed without restarting the raspberry ?

Another question, is it possible to increase the write frequency of feed values in the database or force them to be written when the server is shut down?
When the server restarted I lost the daily values.