Optical pulse to W without REDIS or PHPTIMESERIES

I have a solar PV installation with a pulse detector on the PV meter. I need to convert the pulse count input and convert to Watts but because of limitations on the server hosting emonCMS, I have ‘mySQL Time Series’ as the only Engine choice. Is there a way on the emon Pi that I can do the conversion and save it as a feed?


Perhaps I should clarify: is there a way I can send the processed data to my copy of emoncms rather than the raw data?

Not to my knowledge unless you involve something like nodered, but IMO that’s getting a bit messy.

The whaccumulator process is dependent on redis, but the pulse_count_to_pulse_increment followed by a (ordinary non “wh”) accumulator should work fine with mysql feeds.

I can certainly pick “accumulator” but does this give me Watts or do I need other stages? Sorry for appearing dim!

That depends on how big a pulse is!

If each pulse is 1wh and you want the accumulator to log watt hours (not kWh) then no, you are good to go. But if the pulse is anything else, you will need to do some scaling, eg if the pulse is 0.5Wh then you need to divide the increment output by 2 (ie x0.5) before it goes into the accumulator. If you want kWh (rather than Wh) in the accumulator then you need to divide that increment by 1000 (ie x0.001), you can either combine these (eg x 0.0005) for a compact list or keep them separate for easier understanding.

1 Like

Sorry - this doesn’t seem to be giving me any data at all. In fact the “Total pulse count to pulse increment” doesn’t seem to do anything at all - the graph looks identical.

I tried the sequence (on the Pi itself) “Log to feed log, Wh Accumulator, x 0.001, kWh to Power” but the output of that doesn’t make sense.

Identical to what?

The TPCTPI (Total pulse count to pulse increment) just extracts the increase (difference) from the current and previous inputs. The feed it creates is a helper/worker feed used to store the current value so the future/next input can subtract it from that then current value. By doing this it removes the dependency on Redis.

The increase/difference between the current and previous inputs is passed on to the next process.

The plain accumulator process just keeps a running total of what ever is passed to it, ie it sums the increments to a running total.

Converting pulsecounts (or historic energy units in general) to instantaneous power often yields peculiar results depending on the unit size and the rate of flow, that is a different thing. Are the energy values correct?

The combo of a TPCTPI and plain accumulator is to replace the whaccumulator since you have no Redis. Either of these approaches could have questionable output when converted to a “power”, that’s just a quirk of pulse counting.