Octopus Agile emoncms app

It’s a bit more complicated than that. I have a solar system and separate battery system, so two inverters. I have an EmonPi and it’s CT clamps on the house and solar side.

For the battery system I use Home Assistant to get data from the battery inverter and send this to EmonCMS.

I do this so I can fully utilise the Solar Battery app in EmonCMS and see the battery SoC, etc.

Anyway, I digress. I have figured out the issue in that I was putting the negative feed in the wrong place. This is how I have it now.

I’m a little late to this, but when I try to run this App, I get an error.

If I use Firefox, it’s:

EmonCMS Error
-------------
Message: TypeError: data.agile[(2 * (z - 1))] is undefined
Route: app/view?name=Octopus+Agile
Line: 972
Column: 35

If I use Vivaldi (basically Chrome), it’s:

JavaScript from "emonpi.home"
EmonCMS Error
----------- 
Message: Uncaught TypeError: Cannot read property '1' of
undefined
Route: app/view?name=Octopus+Agile
Line: 972
Column: 54

Unfortunately, the app’s page is effectively broken with a spinning “ajax-loader” so I’m unable to click on the spanner to edit the page and correct anything - presuming a feed name needs altering.

So, I have the App, but I can’t use / edit it, or remove it.

This is on emonSD-24Jul20, updated ~2 days ago…

I had a question about this. I hope this thread (and not a new one) is the right place to ask it…

I’m confiused as to where the meter_kwh_hh is supposed to come from…? AFAICS, data is only available for the previous day from the Octopus API (which is a bit disappointing, TBH). Is it possible to get data directly from the smart meter somehow…? How is this consumed by emoncms…?

I have data coming in to emoncms from CT sensors around Solar and consumption, but just wondering how the meter_kwh_hh fits into this…

Thanks in advance! :smiley:

Welcome, @SunnySparks, to OEM.

I’m sorry no-one has replied to you yet, maybe @TrystanLea can help you?

You need to use one of the various mechanisms to download the data from Octopus on a daily basis and inject it into emoncms. - e.g. Python script to import Octopus Agile consumption data into emoncms - #30 by TrystanLea There are also Node-Red solutons as well.

That is how it is - take it up with OFGEM :slight_smile: (I do agree).

No unless you have a Glow stick which I think then will enable that.

Hi all,

I also hope this is an appropriate place, rather than a new thread, to point out that the emoncms.org feed of carbon intensity seems to have stopped working at 0710 yesterday. It now returns all nulls https://emoncms.org/feed/data.json?id=428391&start=1613668200000&end=1613865600000&interval=1800&skipmissing=0&limitinterval=0

Loving the app, and I’ve just switched to octopus so hoping to get my smart meter soon and become one of those annoying agile snobs :smiley:

Bruce

2 Likes

I’m having a few issues getting my head around what I need to do to my feeds to get this to correctly work with my battery system. I have separate PV and battery systems, 3 CT clamps. Main feeds are the PV, Battery_charge, Battery_discharge and Use - where Use is solar power + battery power, plus grid power.

I’m pretty sure it’s down to me adding the battery power input, rather than the charge/discharge feeds, but I’m not sure of the best approach how it should be done (otherwise I’ll end up with something weird like this:


where overnight charging was detected as export.

Hello,

Not sure whether I should add to this thread or start a new one, opting for the former. Octopus Agile on my emonpi is returning this message:

I’m not sure why, but it suddenly started happening the other day. I’ve been a happy user of The Octopus Agile app in emoncms as it does a pretty good job of estimating what the electricity is costing on a daily basis

EmonCMS Error
-------------
Message: TypeError: data.agile[(2 * (z - 1))] is undefined
Route: app/view?name=Octopus+Agile&readkey=db8d9bc543ca91f1121833f8ad8d4127
Line: 1125
Column: 35

I’m no pythonista, though I’m starting to get the hang of it. I think this means that it hasn’t got any data (e.g. the next day’s half-hourly pricing), but I’m not really sure where to look. If there is a handy log I can get hold of, please let me know.

I know it’s a bit crude, but I’ve been rebooting, which seems to fix it. Disclaimer: I’m a sysadmin/devops guy by trade, so I get to turn it off and on again if it doesn’t work :slight_smile:

Browser is Firefox 113.0.2 (64-bit) on Ubuntu 20.04

Does anyone have any ideas? Happy to go digging into the code is it helps…

Thanks

Jerry

Thanks @ticktockhouse, which tariff variant have you selected? does it make any difference if you try different tariff variants in the app? might also be worth updating the app module and emoncms core on the admin > update page…

I will also look into this and see if I can add some extra error checking

Quick update:

After updating EmonCMS via the GUI, I now occasionally get this error:

During that update process, I also discovered that the OS had bad info in the /etc/resolv.conf, so wasn’t resolving anything properly.

EmonCMS Error
-------------
Message: TypeError: octopus_feed_list[config.app.tariff.value] is undefined
Route: app/view?name=Octopus+Agile&readkey=xyxyxyxyyxyxyyx
Line: 978
Column: 9

(API key is obfuscated)

This seems to sort itself out at certain points during the day and the page comes up without errors after no more interaction from me. I’m not 100% sure, but I think it happens just after the next day’s data becomes available, which is usually around 1600 UTC.

If/when it’s working again tomorrow, I will try to remember to check for tariff variants and the other things you suggested.

BTW, where does the code sit on the filesystem? I might try digging into it a bit myself…

Could be related. The code is located at:

/var/www/emoncms/Modules/app/apps/OpenEnergyMonitor/octopus

This seems to be something related to the emoncms/app/octopus-feed-list api. Perhaps that’s returning empty or missing items at certain times of the day?

Thanks :pray:

Does this run periodically? Is there something I can invoke on the CLI in order to get it to poll for the half-hourly pricing data either on demand, or as a cron job…?

I’m a bit late to the game. Did you get to the bottom of this?

I added batteries to my system recently and got the Solar Battery app to work nicely. However, the Octopus Agile app seems to exclude my battery export to grid. I’m not sure why - looking at the export and export_kwh feeds, these look correct.

Relevant screenshots below.

Summary

Export power feed:

Export_kWh feed:

Solar battery app:

Octopus Agile app (note the lack of export 6-7):