As per the title I’m trying to get a daily cost of electricity I’ve used into EmonCMS.
Using some Python I’ve written (yes, I need to put it up on Github ASAP), I have a input of kWh’s, unit price & cost of half hour, coming in from the Octopus API.
What I can’t work out is how to add those HH prices into a daily total. Any ideas?
Hello @Vster if your posting the half hourly values to emoncms inputs you could try using the accumulator input process - this will create an cumulative total.
Hello again, @TrystanLea was correct (ovbiously!) about using the Accumulator process to create a cumulative total of all the Agile Half Hour costs from the Octopus API.
However, after discovering a slight glitch in my maths, I’ve rerun the Python program (though a huge bash harness) to download all the data from Octopus again and rewrite the feed. In doing this I’m getting a glitch in the data, primarily whenever the data input is started again the Accumulator processes running total jumps to a much higher value for a while before dropping back to where it should be. The “data curve” at the top of glitch is correct, the data being feed is the same, it seems to be the act of resubmitting it is upsetting something in the accumulation?
No problem, it seems to have been running fine for months, it’s the processing in the EmonCMS input I messed up, so I thought I’d reload the all the data, and then this happens. Typical!
The 1572534000 is the time, the 3 is node, the 0.014 is the kW used in the HH, 7.14 is the Agile unit price, the 0.099 is the Agile cost for that HH and the 0.21 is the ‘Normal’ price for that HH.
Duh! It’s going to one of those days.
So, running the background process “postprocess_run.php” results in this…
PHP Notice: Undefined variable: settings in /home/pi/postprocess/postprocess_run.php on line 9
PHP Notice: Undefined variable: settings in /home/pi/postprocess/postprocess_run.php on line 37
ERROR: Redis is not enabled
Looking the php it seem “settings” is not defined and REDIS is not enabled. However, the process_settings.php is there in /var/www/emoncms and so is the settings.php which has all the secuirty info in it. Also, Redis is there and running!?
The only thing I can think is that I’m still running the previous version of EmonCMS, and the PostProcessing module is too new maybe? Or have I goofed elsewhere? Any ideas?