Problem with power to kWh

I have an emontx v2 transmitting to a raspberry pi running the new 9.2 and everything works great except for an issue i have with the power to kWh processor. I just installed the myelectric app and only had a kWh/d feed so needed a kwh cumulative feed. I ran the process script from usefulscripts to convert my existing power feed and that worked fine and everything looks good in the my electric app.

The issue i have is that the kwh feed stops updating and wont increase. I did some troubleshooting to see if i can find why but i have no answer. If i create a new kwh feed it updates just fine. If i modify the feed value in mysql to anything above 100 it stops updating. If i change the value to 99.9 it updates until it reaches 100 and then stops.

I have tried a new mysql database from scratch and deleting all files from the phpfina folder but nothing has helped.

CidiRome's picture

Re: Problem with power to kWh

Hi.

Maybe it is a problem with the feeds value accuracy, try to change with:

ALTER TABLE `feeds` CHANGE `value` `value` DECIMAL(26,12) NULL DEFAULT NULL;

This change has corrected some problems I've had with the W to KWh processors, for me before.

Cheers.

howdi124's picture

Re: Problem with power to kWh

looks like that has fixed it. Mysql gave me a warning for the 2 rows that contain kWh info so there was something up with them. They are updating now 

CidiRome's picture

Re: Problem with power to kWh

Take care if you update your emoncms version because this change/fix will be lost unless they change the "incorrect" property in the emonCMS package, so you will need to do it again.

Cheers.

howdi124's picture

Re: Problem with power to kWh

I will add to to things to look out for. I had to fill in the new inputProcess column with null before i could edit anything before updating.

joyrider3774's picture

Re: Problem with power to kWh

if you alter Modules\feed\feed_schema.php to switch the float setting for value to decimal(26,12) after doing an upgrade of emoncms you don't need to reapply the above query after doing a database upgrade. Emoncms will then see that it's identical and does not restore the database to float. that's what i'm doing now. Also if you don't have access or know howto apply the change to mysql you can alter that file as well and then under administration do a database upgrade emoncms will apply it for you then

Comment viewing options

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