SOLVED: issue with "kWh to kWh/d"

I am trying to use emoncms on a cloud hosted web server (OVH). I have managed to make it work (more or less) with some tuning (see Installation d’emoncms sur serveur mutualisé OVH) but I still have an issue : the "kWh to kWh/d" does not function properly: anytime I try to define it I get this error when updating :

Fatal error: Call to a member function fetch_array() on a non-object in /homez.540/monrepertoire/www/emoncms/Modules/input/process_model.php on line 455

I wonder if it has a relationship with the fact that I need to use mySQL (I cannot install timestore because it is not "my" server).

This function was working on the emoncms.org server with the "kWh to kWh/d (OLD)", which is not in git (only on emoncms.org).

TrystanLea's picture

Re: SOLVED: issue with "kWh to kWh/d"

Hello Oliver, Try using the kwh_to_kwhd2 input processor, I need to look at those functions again, recent changes with the different engines may have broken it, Im not sure.

oliv06's picture

Re: SOLVED: issue with "kWh to kWh/d"

Thanks Tristan, I did not realize that there were two "kWh to kWh/d" functions (in the french translation they are both called "kWh vers kWh/j") : the second one seems to work (at least it does not return an error, I have to wait to check if result is ok).

oliv06's picture

Re: SOLVED: issue with "kWh to kWh/d"

I does not work either : using kwh_to_kwhd2 I get only 0 as a result, even though my input source increases.

oliv06's picture

Re: SOLVED: issue with "kWh to kWh/d"

I eventually found out the problem : it is necessary to delete the "kwhd" feed created by the kwh_to_kwhd function and not reuse it as a target of the kwh_to_kwhd2 process, as kwh_to_kwhd creates only one datafield in the feed mySQL table, and kwh_to_kwhd2 needs 2 !

Perhaps it would be a good idea to add a control in the input process creation ?

TrystanLea's picture

Re: SOLVED: issue with "kWh to kWh/d"

Great thanks for finding out the cause, Il look into adding a control, good idea.

Comment viewing options

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