[APP][DEV][PRO] Octopus Energy Integration

Consequences - App Crashes

When I released V1.0.31 I accidentally left some test code in the App. This data would allow you to create Smart Energy Devices even though you don’t have an Intelligent Tariff and don’t have any Smart Devices. If you are an Intelligent Tariff customer you might have created devices that don’t really exist on your account.

The release of V1.0.33 has exposed the consequences of my error and the app is crashing for some of you as it tries to update a Smart Energy Device that doesn’t actually exist. You can stop this happening simply be deleting the device.

I have made a change in the code which means that, for most of you, the offending device will be marked UNAVAILABLE in Homey (a Red Triangle with an exclamation mark on the device). If you show the capabilities panel for the device there will be a message “bad device; please delete”. Please follow the suggestion!

I believe that at least one user who is affected by the problem is an Intelligent Tariff customer (maybe it’s you @SirSh0rty?). In this case I have hardened the code. The app should run normally but the erroneously created device will never update because it never receives any new data (because it doesn’t exist on the Octopus account).

Please look out for this circumstance and delete the offending device.

These changes will be published as V1.0.34

Please accept my apologies for the mess-up and its consequences.

V1.0.34 Handle Crashes from Devices Created From Test Data

Further to my post, above, V1.0.34 has been created to help overcome the consequences. The hardening of the code is the only change made.

Once again “we apologise for the inconvenience”.

Alec's best of the forum (and elsewhere) thread | Frontier Forums

V1.0.34 Usage Analysis

Good news - ironed out the kinks caused by my mistake of including test data in the published version. Making steady progress towards integrating Dispatches into the Energy Account device; Tariff devices should follow pretty quickly because they will use the same concepts (and reuse code).

Version Installs Crashes Crash Types Comment
1.0.34 9 107 0 Weird new bug, ouch
1.0.30 2 0 0 Robust for non-intelligent tariff customers
1.0.29 3 0 0 OK so far…
1.0.28 1 1 1 Query returning malformed response
1.0.21 1 98 4* Stupid typo I should have spotted (12/13)
1.0.9 1 24924 6 Early release with simplistic assumptions

Updated 2025-12-03 11:30

* Release 1.0.21 is interesting - the number of crash types has not really doubled since the last version of this table. One user is still on Homey 12.8.2 (current Homey release is 12.9.0). If your Homey device supports the upgrade I recommend you install it. Homey reports crash-types against each Homey release - it’s the same two faults but in two different Homey releases.

Please Upgrade

Still quite a few users running old (some very old) releases. Given these are less stable, that must be causing you some annoyance from crashes. Can I please encourage you to upgrade. You will get extra functionality too.

Working great for me so far thank you!

Will keep an eye on it over the next few days. Great work @David_Piper thank you!

1 Like

Intelligent Tariff Users

Any feedback on the Dispatch Starts and Dispatch Ends trigger flow cards?

All Users

Any requests for additional Flow Cards?

Weird Crash “Just Started” in V1.0.34

Something weird has happened in V1.0.34 that I don’t understand. Having run without problems since its release, it has started crashing for at least one user. It’s also crashing in a weird place that gets executed many-many-many times and hasn’t crashed before - a file that has not changed since V1.0.28 (12th November). So I am at a bit of a loss to explain what is going on.

The crash started at 2025-12-02T11:30 and was last seen at 13:17 (the same day). If you have experienced these crashes please get in contact so I can try and work out what is happening. The simplest solution is probably simply to uninstall and reinstall.

Thanks!

V1.0.34 Bug #12

The fault that appeared in V1.0.34 yesterday has been logged as bug #12. The fix will be released along with an improved Energy Account device that takes Dispatch Pricing into account. Defects permitting, I anticipate making this release tomorrow morning.

V1.0.35 Implement Intelligent Dispatches in Energy Account Device

For Intelligent Tariff users, Dispatch Pricing will be reflected in the Energy Account device (but not yet in the Tariff devices - coming in the next version). If there are Smart Devices registered on the Octopus account then a new boolean capability will be displayed - “In Dispatch” - it says “Yes” or “No”. This Capability is hidden if there are no Smart Devices registered.

In addition the device displays the Import Price - when a dispatch is active, this will show the Dispatch Unit Price; when a dispatch is not active it shows the normal Tariff Unit Price. Two additional capabilities are added - Chunk Consumption and Chunk Value. The term “chunk” is being used as the label for the 30 minute periodicity imposed by the UK Smart Metering network.

These two capabilities will be of interest to @Brettus_Maximus. If you plot the insights of these two capabilities you will see consumption and cost per half hour. Note it’s half an hour “in arrears” because at 10:00 (for example) Homey logs consumption from 09:30-10:00.

Here are my insights for the last 24 hours…

Alongside pricing information - notice how consumption aligns to the lowest price :grin:

Bug #12

The code has been strengthened to work around this bug. It is not resolved since I don’t understand the root cause.

Next…

Extend Intelligent Dispatches to the (import) Tariff device.

V1.0.35 Usage Analysis

Version Installs Crashes Crash Types Comment
1.0.35 15 1 1 Strange crash - keeping it under review
1.0.30 2 0 0 Robust for non-intelligent tariff customers
1.0.29 2 1 1 OK so far…
1.0.28 1 1 1 Query returning malformed response
1.0.21 1 1822 3* Stupid typo I should have spotted (12/13)
1.0.9 1 33922 6 Early release with simplistic assumptions
Totals 22 :scream: 12* 1.0.21 = 3 crash types across 2 Homey vns

Across the 22 installs there are now 56 different Homey devices instantiated.

@ 2025-12-22 07:55

Please Upgrade

At the risk of becoming a repetitive bore, please can I ask users on the oldest releases to upgrade.

Update

Taking a pause for a few days! Following recent announcements from Octopus about the Intelligent Go tariff, it is clear that there needs to be a rethink of how to handle intelligent dispatches - some of the assumptions built into the app around what dispatches mean and how to handle them are now clearly wrong. I need to study the information around the changes and synthesise a coherent picture of how to manage the data effectively. Hope to start making progress again soon.

Right now, there are triggers around dispatches starting and ending. Pricing data in the Octopus Account device reflects the consumption and prices prevailing during dispatches.

Looks like changes are arriving at the end of January, so there’s not a lot of time to make a coherent and effective set of alterations to the app.

I’ve been thinking about this David, and at the moment it might not be a problem.

My understanding is that Kracken will still release dispatches as we expect but if you want to charge outside of those it’s a bump charge. To make any big changes would also require a change in their side and I doubt they want that.

Hi Stu

Thanks for the feedback. My concern is that it’s not a change to the way that Dispatches work, but a clarification of how they work that will have an impact on the way the App handles them. I need to re-read the FAQ list and get my thoughts straight. But here is an initial reaction:

In our discussions and thus in the way the App handles Dispatches is the assumption that a Dispatch is primarily about reduced price for a stated period of time (expanded to 30 minute chunks) and less about delivering a quantity of energy to a device. Thus dispatch time = discount time (after taking chunks into account).

The implications of the FAQ (as I have understood them so far) is that a Dispatch is now (has always been) primarily about delivering a quantity of energy to a device and that the association of a discounted price to the dispatch is a useful and attractive secondary effect. This secondary effect is now being modified.

This is illustrated by one of the FAQ that implies that after 6 hours, device charging will continue at bump price, but if there is a planned dispatch in progress, other energy will continue to be consumed at the discount price. I need to confirm this by re-reading the FAQ and ensuring that I am not over-interpreting.

This explains why Completed Dispatches are useful - they capture the amount of energy dispatched to the device (to the device, not to the whole property). I guess that Octopus get this data directly from the device itself - meters don’t split up consumption by use. That’s why the completed dispatches are important and also (I suspect) why they only become available some hours after consumption has occurred - the data being processed separately from normal meter data (or OHM data).

Not sure how the App can handle it yet. I have some thoughts around continuing to charge all dispatch energy at discount rate then, retrospectively adding additional costs for dispatch energy after 6 hours of dispatches have passed. The situation is only further complicated if there are multiple devices - again from my outline reading of the FAQ, only one 6 hour allowance is made available to be consumed by all devices on the account. If my understanding is correct, then the app will need to count device-minutes of charging.

I think this is the way the Octopus will probably handle it too since the only changes they will have to make is to adjust bills for non-discounted dispatch energy (and add data to bills to show this is happening). The apps task is made more complicated because it is capturing the data in real time rather than handling everything retrospectively as the Kraken system will.

My next task is to re-read the FAQ and either reinforce or change my conclusions. Work for tomorrow :alarm_clock:.

1 Like

I have just installed Homey with the self hosted option.

I was looking to replace my Home Assistant instance as its getting long in the tooth and messy.

Do you have details on how to get your Octopus app installed?

I was looking for exactly this.

Hi Martin. I have to confess that I know very little about the self-hosted option of Homey. IF it emulates a Homey Pro (rather than Homey Cloud) - I believe this is the case - AND you are logged into the Host, THEN visiting the App Store and installing the App from there should work.

The only slight complexity is that this App has not yet been published as a Community App - you need the explicit link to the test version of the App to install it. I repeat the link below…

You will be the first self-hosted user - let the group know how you get on. If you succeed in the installing on your Host then I will add you to the alpha test group so you can provide your feedback on the self-hosted experience. Fascinating…

You answered what I figured out and was missing :slight_smile:

I was in the App looking for it but couldnt find it. But using the URL above I could install it on my instance.

Yup all installed and setup, pulling in the data nicely.

So far so good :slight_smile:

2 Likes

Thanks Martin. Welcome to the Homeyverse :scream:

@Savell_Martin for my interest, what tariff(s) are you on? Just sent you an invite to the alpha test group. Though in reality there’s not much difference between that group and this one…

I have Intelligent Go

With a hypervolt charger for my EV.

Thanks for the invite.

V1.0.36 Released

This is a minor release that starts to address forthcoming changes to Intelligent Octopus Go. The release adds a single capability to the smartEnergyDevice Homey device. The capability counts the number of minutes of dispatch received by the smartEnergyDevice during the day (reset to 0 at midnight).

1 Like

V1.0.37 Released

Apologies for two releases in quick succession. Realised that the algorithm behind the calculation of dispatch minutes was incorrect (having made a mental breakthrough with how dispatches and Smart Devices actually work). This version simply updates the algorithm - if you don’t use the Intelligent Octopus Go tariff (maybe flux?) then you don’t need to update.

Release Usage Analysis

Version Installs Crashes Crash Types Comment
1.0.37 19 0 0 Released 2025-12-26T13:10Z
1.0.35 1 1 1 Strange crash - keeping it under review
1.0.30 2 0 0 Robust for non-intelligent tariff customers
1.0.29 1 1 1 OK so far…
1.0.28 1 1 1 Query returning malformed response
1.0.21 1 1852 3* Stupid typo I should have spotted (12/13)
1.0.9 1 39358 6 Early release with simplistic assumptions
Totals 26 :scream: 12* 1.0.21 = 3 crash types across 2 Homey vns

64 Kraken Devices

@ 2025-12-28 11:15

1 Like