Emoncms: Power to kWh Feeds and Daly Feeds kWh/D are not recorded

Hi, I’m using Emoncms 9.7 | 2016.05.25.
I’m pulse counting my energymeter and sending the values into emoncms. The emoncms is installed on an Ubuntu machine.

The Feed is like this:

Log to feed is working since ages - perfect!

I tested some different engines for “Power to kWh” but they are NOT counting all values. At some days the for example last sunnday:
Feed power to kWh shows: 4,5kWh

In Power-Feed ist shows about 37,89kWh - this seems to be all right

The Power to kWh/D Feed is not recorded at all.

When I try to download the recorded feeds as csv it writes following error message:

<br />
<b>Fatal error</b>:  Uncaught exception 'Exception' with message 'DateTimeZone::__construct(): Unknown or bad timezone (1)' in /var/www/emoncms/Modules/feed/engine/shared_helper.php:20
Stack trace:
#0 /var/www/emoncms/Modules/feed/engine/shared_helper.php(20): DateTimeZone-&gt;__construct('1')
#1 /var/www/emoncms/Modules/feed/engine/MysqlTimeSeries.php(375): SharedHelper-&gt;getTimeZoneFormated(1465077625, '1')
#2 /var/www/emoncms/Modules/feed/feed_model.php(544): MysqlTimeSeries-&gt;csv_export(13, '1465077600', '1465941600', '1', '1')
#3 /var/www/emoncms/Modules/feed/feed_controller.php(117): Feed-&gt;csv_export(13, '1465077600', '1465941600', '1', '1', 'Node 11: Stromz...')
#4 /var/www/emoncms/core.php(64): feed_controller()
#5 /var/www/emoncms/index.php(153): controller('feed')
#6 {main}
  thrown in <b>/var/www/emoncms/Modules/feed/engine/shared_helper.php</b> on line <b>20</b><br />

Is here anybody who could maybe give me a hint?

Thank you very much so far.


The pulses from your meter are usually energy not power, so line 3 is fine it is recording the energy used, presumably in kWh following the x100 in line 2, although I’m unsure of the purpose of the allow positive in line 1 as you can only count pulses you cannot have a negative reading (unless you have some unusual processing in-line).

Line 4 is a “power to kWh” so it will not have the desired result as you are passing an energy value to it.

It’s a little unclear if the pulse count is an accumulating total or a count since the last update, your example suggests the latter due to low numbers. If that is the case you just need a run of the mill accumulator that adds the new value to the running total each update or if it is in fact an accumulating total pulse count you are receiving then you should use a Wh accumulator so the running total isn’t reset when the pulse count resets or rolls over. (check your scaling here as I believe the accumulators use Wh’s not kWh’s)

I’m also unsure why you have reset to original so many times, are these just tests? many of the “feed” type processes pass the original value to the next process so you shouldn’t need those.

To comment on the error and the feed types you will need to include the feeds page too. But try using just the appropriate accumulator and then a kWh to kWh/d or a Wh increments to kWh/d for daily data first.

Hi Paul,
thank you very much for your answer. I’m counting the pulse meter, but also measuring time beetween pulses and calculateing real power in “0,01 W”, not Wh. I need to multiply by 100 to get W.

The values from pulse counter are not accumulated. Its only the “Power used at a time” (Watt).

The reset is due to problems of not counting the kWh. It looks to me, like there can’t be two “Power to kWh” one after one other? Therefore I just “Reset to Original” > kind of workarround…

What I can’t understand is what you mean with “include the feeds page too” - can you please explain this to me?

And how can I accumulate my power values? I think they should first become kWh and then be accumulated or?

Thank you very much


this seems to be the Solution for the problem:

DateTimeZone::__construct(): Unknown or bad timezone (7) · Issue #356 · emoncms/emoncms · GitHub