Reasonable, but did try to connect via SSH but it came back with connection refused so not sure what I was doing wrong or what I should do if it did let me in
John
Reasonable, but did try to connect via SSH but it came back with connection refused so not sure what I was doing wrong or what I should do if it did let me in
John
Per yr request in another thread ā hereās my variant on Trystanās great Python script to download historic Octopus Agile 30 mins consumption data. It now includes CUM consumption.
octopus_consumption_TL+JB.zip (1.8 KB)
Iāve removed personal info.
And youāll probably want to prune my verbose comments ā just memory joggers for me.
If youāve already downloaded historic data, running this new script will not re-download it. So temporarily change the 0 on line 37 to 10000 to work around this problem.
Setting up FEEDs is a bit of a hassle ā but you donāt need to do that just to try out this script ā just run it under Python3 in an SSH terminal.
These screenshots illustrate the end result ā¦
If to the emonbase, what user/password combo did you use?
OOPS!
My revised script resets the CUM each day as the previous dayās history is added.
And that kinda defeats the object
Iām on the case ā¦
Iād had a look and was wondering. You need the last data value out of the feed as your starting point!
https://YOURIP/feed/value.json?id=1
I fixed the problem with the cum starting point yesterday - both for first run and subsequent runs.
And yesterday with two fresh empty feeds, it ran OK.
And the daily cronjob ran successfully this AM - the previous cum advanced - so good to go ā¦
octopus_consumption_TL+JB_v2.zip (1.8 KB)
Recommendation - if youāve previously run Trystanās original script and only have daily data, itās best to create two fresh empty feeds before running this modified script.
managed to get in to SSH now (was not enabled) Any help with what to do now. I suspect I need to copy the script somewhere first (onto the EmonPi), not a clue how to do this I can then see that you run the command to set it to run at the prompt. Sorry for being so daft
John
@TrystanLea, can you drop this into UsefulScripts please?
Done: usefulscripts/octopus at master Ā· emoncms/usefulscripts Ā· GitHub
Iāve added this in
I havent added this in yet.
I use the Octopus Agile emoncms app to do this.
Yes
Iāve added the script to the usefulscripts repository as @borpin suggested.
Here are the steps to use the new location:
1. Run Emoncms update to pull in the latest version of the usefulscripts repository
2. SSH onto the Pi and navigate to the agile script directory:
cd /opt/emoncms/modules/usefulscripts/octopus
3. Create config file from default:
cp default.agile.conf agile.conf
4. Enter configuration including emoncms apikey and authentication and meter details from Octopus
nano agile.conf
5. Run script for the first time to pull in data:
python3 agile.py
6. Run script from crontab every morning to pull in latest data:
30 9 * * * /usr/bin/python3 /opt/emoncms/modules/usefulscripts/octopus/agile.py > /dev/null 2>&1
This example runs the script at 9:30am every morning, consider changing the exact timing to reduce simultaneous load on the octopus servers from lots of piās calling this script at the same time (Probably not an issue but heyā¦)
But it doesnāt ācompareā it just uses it instead? I was hoping for a means to check the accuracy of the measured figures. I couldnāt work out how to do it on the Graphs.
I have worked out that the easiest way to check between 2 accumulating feeds, is to graph one on the left scale, one on right and compare the diff figure in statistics. Once I have that I can then apply a scaling multiplier in the Input Process. Has been quite successful.
Perhaps this could be done as an app where you can select 2 (or more) different feeds for comparison (e.g. Agile, Pulse, CT)?
I have worked out that the easiest way to check between 2 accumulating feeds, is to graph one on the left scale, one on right and compare the diff figure in statistics. Once I have that I can then apply a scaling multiplier in the Input Process. Has been quite successful.
Good idea as well!
I seem to be getting quite a few data outages on my half hourly data from the smart meter, i often have full days missing, but then clearing the feed and re-running the script from the start seems to pull the missing historic data in again⦠do octopus query for this missing data at the end of the month/week?
At the moment Im missing new data since the September 24th and am missing both 21nd and 22nd of September but older missing days have now appeared after I cleared the feed and re-imported from the startā¦
Processing a cumulative feed from this would require going back and reprocessing when the missing days become available⦠will have to think how best to do thisā¦
I havenāt tried the script yet but FYI my Octopus (Go) data has frozen
on the website since the 24th September too so there may be a wider issue.
If you open the browser console window
Oh that is obvious⦠.
I seem to be getting quite a few data outages on my half hourly data from the smart meter, i often have full days missing, but then clearing the feed and re-running the script from the start seems to pull the missing historic data in again⦠do octopus query for this missing data at the end of the month/week?
I think Octopus are having issues. I have an open ticket re missing data and they say it isnāt just me.
I did mention it in the other thread on the agile app Octopus Agile emoncms app - #111 by TrystanLea but I dont blame you for not seeing it. This and the comparison feature needs to be added to the guide documentationā¦
Should probably just include the info below the tickbox selectorā¦
I seem to be getting quite a few data outages on my half hourly data from the smart meter, i often have full days missing, but then clearing the feed and re-running the script from the start seems to pull the missing historic data in again⦠do octopus query for this missing data at the end of the month/week?
At the moment Im missing new data since the September 24th and am missing both 21nd and 22nd of September but older missing days have now appeared after I cleared the feed and re-imported from the startā¦
Processing a cumulative feed from this would require going back and reprocessing when the missing days become available⦠will have to think how best to do thisā¦
Iām noticing a few gaps too - itās at the Octopus end, usually. They sometimes need a chase, but they will have to re-fetch it before a bill is issued. It is the subject of some debate on the Octopus Agile forum atm.
FWIW I wrote a Node-RED flow that will backfill data for the missing slots, if thatās useful to anyone. It uses the same method as the editrealtime visualisation (ie. pokes it in via the update url, rather than the input one). Works well for me so far. Needs moderately careful handling insofar as you need to put the period from/to in correctly, and Iām longing for a decent ācalendar style date-pickerā to refine the Node-Red flow somewhat - but it worksā¦
Shout if wanted. Not sure whether to just post it here or whether thatās a breach of local etiquette.