Time of use data collection, analysis, display

Im on a real steep learning curve with all this monitoring, but I have learned a lot! I have solar PV, an ASHP, Tesla Powerwall2 and run on Octopus Go, charging the battery overnight and topping up with solar during the day.

So far I have managed to get the basic system (EmonPi, EmonTX and multiple current clamps) installed and operating, navigating through inputs and feeds and building a dashboard.
The with a lot of searching (and help) in the forum and on google managed to interface to my Powerwall and pull off lots of data and create new feeds (had to teach myself the basics of Python and JSON for that to understand what what going on!). Then I got advanced and linked my Octopus smart meter in and now have 3 years of half hourly data available (I just love data!!) and getting updates every day. But I think I have reached the limit of my knowledge now!

I would like to be able to display cumulative (on a daily basis) power consumption for the offpeak and peak time periods. I have the historical data available and can get the real time (well every 30 secs or so) from the powerwall feed. Clearly it is possible (the time of use app) but i would like to display this in my own dashboard (and I cannot find the code for the time of use app (assuming it is written in python) which would help me replicate the analysis.

Can anyone point me in the right direction to get started on this?

Many, many, many thanks in advance!!

The “Apps” for EmonCMS are all written in javascript as they run client-side in the browser window. They do pull feed data from the EmonCMS backend using some smarts built-in there too.

If you start one of the Apps and take a look at the “Developer console” in your browser, you should be able to see all of the javascript code. You’d also be able to find the actual code in your EmonCMS installation under the folder structure used by your web server (/var/www/emoncms/Modules/app/apps/OpenEnergyMonitor/ on my EmonCMS install)

Many thanks for that. I have found the file, now to take a look and get my head around javascript to understand how it all works! Nice little task for the weekend!