Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All entities randomly, become unavailable. #30

Closed
spinecho31 opened this issue Dec 7, 2023 · 36 comments
Closed

All entities randomly, become unavailable. #30

spinecho31 opened this issue Dec 7, 2023 · 36 comments

Comments

@spinecho31
Copy link

Integration randomly becomes unavailable, so far I couldn't not isolate the cause.
Using the latest version 1.6.2

How can I help you troubleshoot this?
Screenshot_20231206-214740
Screenshot_20231207-022227

@jimdholmes
Copy link

jimdholmes commented Dec 8, 2023

Hi, not sure if this related or if it helps however I am having issues with three seperate integrations since upgrading to 2023.12 yesterday, this being one of them. The issue I am seeing states "Config flow could not be loaded: 500 Internal Server Error Server got itself in trouble" for each of the integrartions that have stopped working.

The other two integrations are:

  • Tesla Custom Integration
  • Tapo Custom Integration

Both of these are displaying the same error message as above.

Might just be coincidence but my HA Octopus Intelligent, Tesla and Tapo integrations all stopped working with the same error message on upgrading to 2023.12 after a restart.

@jimdholmes
Copy link

Quick update, rolled back to a previous version of HA and all working again 😁

@Stewbo1
Copy link

Stewbo1 commented Dec 13, 2023

I also have this issue since upgrading HA to 2023.12.1.

@BadgerLoaf
Copy link

I'm seeing the same, irregular dropouts. The following history chart shows the missing data over the past couple of days (the grey missing areas).

Screenshot 2023-12-18 at 16 04 39

HA: 2023.12.3
Octopus Intelligent: v1.6.2

@megakid - Are you aware of any issues? Do you need us to take any logs etc?

@goul
Copy link

goul commented Dec 18, 2023

Just to confirm I'm seeing the same on HA 2023.12.3. With debug on all I can see in logs is :

2023-12-18 17:39:56.895 DEBUG (MainThread) [custom_components.octopus_intelligent] Setting up Octopus Intelligent System component
2023-12-18 17:40:26.903 DEBUG (MainThread) [custom_components.octopus_intelligent.octopus_intelligent_system] Finished fetching Octopus Intelligent data in 30.004 seconds (success: False)

Tried removing and adding through HACS, but no joy.

Let me know if I can do anything to help.

@nickcj931
Copy link

Just doing my updates and came across same issue when trying to update home assistant to 2023.12.3 from 2023.10.1, although following a restore it still will not initialise the integration. Even before the update I did notice that there are a lot more gaps in the data shown as per @BadgerLoaf.

HA: 2023.10.1 (rollback from failed attempt on 2023.12.3) still not working
Octopus Intelligent: v1.6.2

I am seeing a few warnings in the logs relating to the integration:

Logger: py.warnings
Source: runner.py:186
First occurred: 16:47:27 (1 occurrences)
Last logged: 16:47:27

/usr/local/lib/python3.11/asyncio/base_events.py:1907: RuntimeWarning: coroutine 'OctopusIntelligentSystem.start' was never awaited handle = self._ready.popleft()

Logger: homeassistant.config_entries
Source: config_entries.py:441
First occurred: 16:47:57 (1 occurrences)
Last logged: 16:47:57

Config entry '' for octopus_intelligent integration not ready yet: Error communicating with Octopus GraphQL API: ; Retrying in background

Logger: py.warnings
Source: runner.py:186
First occurred: 16:47:27 (5 occurrences)
Last logged: 16:50:55

/usr/local/lib/python3.11/asyncio/base_events.py:1907: RuntimeWarning: coroutine 'OctopusIntelligentSystem.start' was never awaited handle = self._ready.popleft()
/usr/local/lib/python3.11/asyncio/base_events.py:1923: RuntimeWarning: coroutine 'OctopusIntelligentSystem.start' was never awaited handle = None # Needed to break cycles when an exception occurs.

Things attempted:

  • Reverted back to previous HA version 2023.10.1 - integration does not start
  • Re-downloaded the Octopus Intelligent integration - integration does not start
  • Deleted the integration at previous version 1.6.1 - full system reboot - integration does not start

Have Octopus changed something? or is the service down from them perhaps?

@nickcj931
Copy link

I've just noticed that my friends integration has been down since 1545 UK time 18th Dec today as well.... so seems a mere coincidence that it felt that HA 2023.12.3 broke this integration.

It seems that either:

  1. Octopus have an outage
  2. Octopus have made some changes their end which broke the integration ?

Thoughts?

@gdotp01
Copy link

gdotp01 commented Dec 18, 2023

@nickcj931 mine became unavailable at the same time. I suspect it’s an octopus issue.

@Ryderbrew
Copy link

Same boat here, went down at 15:44. I wonder if its a regional octopus intel server issue. I'm in the st7 are, where are you guys located.

@garethcook
Copy link

Ditto. Seeing this, and has been working OK for the past week.

Logger: py.warnings
Source: runner.py:188
First occurred: 19:32:07 (3 occurrences)
Last logged: 19:33:59

/usr/local/lib/python3.11/asyncio/base_events.py:1926: RuntimeWarning: coroutine 'OctopusIntelligentSystem.start' was never awaited handle = None # Needed to break cycles when an exception occurs.
/usr/local/lib/python3.11/asyncio/base_events.py:1910: RuntimeWarning: coroutine 'OctopusIntelligentSystem.start' was never awaited handle = self._ready.popleft()

@drnichols
Copy link

Same here although I've tried an alternative Octopus integration which is working, suggesting the API is working (although may have changed functionality?). https://github.com/BottlecapDave/HomeAssistant-OctopusEnergy

@garethcook
Copy link

I have that add-on also, from before it had Intelligent support. That's also failing for me.

@drnichols
Copy link

I just tried to re-add the integration with my details which returned already configured and then re-initialised the integration which is now working again so perhaps a transient issue.

@gdotp01
Copy link

gdotp01 commented Dec 18, 2023

Yep it’s back up and I’d changed nothing.

@BadgerLoaf
Copy link

Yes, that was the biggest drop for a while, but not sure if the cause will be any different that all the others seen recently.

Screenshot 2023-12-18 at 20 55 42

@nickcj931
Copy link

Same boat here, went down at 15:44. I wonder if its a regional octopus intel server issue. I'm in the st7 are, where are you guys located.

Im in Powys Wales.

But didn't think they had regional servers since uk doesn't have that type of datacenter setup as we are that small. Maybe Lon and Man for example.

But the drop outs are getting worse and worse.

I wonder if they are hitting the API limits perhaps? Companies do this all the time, create and offer an API and don't actually think what happens when it needs to scale and it starts to cost serious ££ ....
I just hope the don't rug pull it as its been such a great service and I literally use Octopus because of it being so feature rich.

@nickcj931
Copy link

I've found this discussion over on the BottlecapDave /
HomeAssistant-OctopusEnergy that @drnichols mentioned.

Seems like they have introduced rate limit after all, although it seems they are talking about the Home Mini - I wonder if that is a platform wide rate limit on whole API Kraken or just for Home Mini related data? no idea

I wouldn't have a clue how to check the code on this integration, but wonder if its "gapping out" because of this limiter (yesterday being an odd ball where perhaps Octopus did maintenance), and a polling rate needs to be adjusted in the app?

@G8YTZ
Copy link

G8YTZ commented Jan 8, 2024

Same issue here as above.

@MarkTarry
Copy link

It seems that I'm also facing an issue with entities falling back to "unavailable" state - it's happening with the megakid/ha_octopus_intelligent integration entities:

image

But, interestingly, it's not happening with the equivalent BottlecapDave/HomeAssistant-OctopusEnergy integration entities:

image

So, if this was API throttling, then the other integration is somehow handling it.

@G8YTZ
Copy link

G8YTZ commented Jan 13, 2024 via email

@andyvee69
Copy link

Not only is there rate limiting in place, Octopus are now blocking requests that do not have a suitable request header.

@bensebborn
Copy link

Same issue here. Lots of drop outs which are causing my “end” automations to run multiple times.

Uploading IMG_4732.png…

@Paulholloway
Copy link

Paulholloway commented Jan 14, 2024

I'm finding that, predominantly, octopus_intelligent_offpeak_end is unavailable for quite some time. From the history, I find that the other entities do drop out but (as I write) they've all a value. Fortunately, at 23:30:01 I more often than not (this week) octopus_intelligent_offpeak_end has a value and so my automations tend to run. I'm hoping a tweak to my automation to be less sensitive to the entity being unavailable is a short term solution. Ideally, I'd quite like it to be more stable / available.

Edit. WRT changelog for v1.6.0, I'm thinking that this is the expected behaviour (if there has been a restart etc after offpeak end:

Offpeak End sensor will continue to display the last time offpeak ended (until a new offpeak period starts) whilst next offpeak will show the current offpeak start until that period ends, where it will display the next known offpeak period start time.

That aside, my log has:

2024-01-14 07:26:48.674 ERROR (MainThread) [custom_components.octopus_intelligent.octopus_intelligent_system] Error fetching Octopus Intelligent data: Error communicating with Octopus GraphQL API:

2024-01-14 01:07:34.674 ERROR (MainThread) [custom_components.octopus_intelligent.octopus_intelligent_system] Error fetching Octopus Intelligent data: Error communicating with Octopus GraphQL API: 

And I'm now finding that most of the entities (interestingly, now, not offpeak end) are showing as unavailable.

Hopefully that's (A) related and (B) some use?

@sparkyhughes
Copy link

I’m seeing the same issues too.
Is this being worked on or do we need to consider using a different integration? 1.6.2 came out June last year.

@G8YTZ
Copy link

G8YTZ commented Jan 16, 2024

Hi, not sure if this related or if it helps however I am having issues with three seperate integrations since upgrading to 2023.12 yesterday, this being one of them. The issue I am seeing states "Config flow could not be loaded: 500 Internal Server Error Server got itself in trouble" for each of the integrartions that have stopped working.

The other two integrations are:

  • Tesla Custom Integration
  • Tapo Custom Integration

Both of these are displaying the same error message as above.

Might just be coincidence but my HA Octopus Intelligent, Tesla and Tapo integrations all stopped working with the same error message on upgrading to 2023.12 after a restart.

Yes, I have see issues with other integrations, particularly the PowerWall, implying a "breaking change" has caused the issue. I don't use the Tesla car integration, though I have installed it and it is currently disabled. If you restart HA it fixes the issue (reload does not), it appears to be a process that stops randomly and occasionally restarts. I'm running HA on an Intel NUC Celeron.

@drnichols
Copy link

I've been having issues with the entities becoming unavailable or just showing the incorrect values for the past couple of months. I've installed this integration too (https://bottlecapdave.github.io/HomeAssistant-OctopusEnergy/) which is not as rich but is not having the same issues. I've updated my sensors in HA to use the status of which ever integration is working at the time (using or logic).

@bensebborn
Copy link

@megakid any suggestions/workarounds?

@daknightuk
Copy link

daknightuk commented Jan 23, 2024

Same issue here, was working fine on Core 2024.1.5 ,Supervisor 2023.12.1
I get the impression that Octopus has realised that some people are creating automations which use their "car charging slots" to charge solar battery storage from grid and run high wattage appliances like the washing machine, tumble dryer etc etc... as their intelligent octopus tariff is 0.07 Kwh
Rebooting home assistant seemed to fix the issue I do think they might have rate limits in place? or is it possible that they are only allowing 1 device to access this at a time? I was in my octopus app at the time

I wasn't using the integration to control my charging, I was however using it to monitor when charging was taking place. Its worth noting that if any of you have a zappi charger then its possible to use the myenergi integration entity myenergi zappi-(serial number) Status to pick up Boosing.

Also myenergi zappi-(Serial Number) Plug status to pick up Charging, Waiting for EV, EV disconnected.

@megakid
Copy link
Owner

megakid commented Jan 23, 2024

Apologies for radio silence- I've not been available to look at this (new job and baby in the house). I'll try to take a look but this is a change on Octopus's end that I'll need to work with and/or around.

Thanks for your patience!

@MartinJSa
Copy link

What's the default poll interval for this integration? I'm wondering if we need to be 'good API citizens' and make the polling less frequent? A small change here could help if Octopus are struggling with API load, and isn't likely to make a big difference to how well our automations work?

@MrAlgo
Copy link

MrAlgo commented Jan 26, 2024

Not sure what the difference is between these integrations but I tried this instead (https://github.com/BottlecapDave/HomeAssistant-OctopusEnergy) and it works well. Megakid is above and the new one is below. Had to adjust my automations etc but working again now.

image

Congrats on the new arrival.

@daknightuk
Copy link

Not sure what the difference is between these integrations but I tried this instead (https://github.com/BottlecapDave/HomeAssistant-OctopusEnergy) and it works well. Megakid is above and the new one is below. Had to adjust my automations etc but working again now.

image

Congrats on the new arrival.

I didn't realise that the BottlecapDave integration had the intelligent smart charging in already. I just wonder why are there 2 different integrations doing similar things..

@G8YTZ
Copy link

G8YTZ commented Jan 26, 2024

Not sure what the difference is between these integrations but I tried this instead (https://github.com/BottlecapDave/HomeAssistant-OctopusEnergy) and it works well. Megakid is above and the new one is below. Had to adjust my automations etc but working again now.
image
Congrats on the new arrival.

I didn't realise that the BottlecapDave integration had the intelligent smart charging in already. I just wonder why are there 2 different integrations doing similar things..

I too have swapped over to BottlecapDave, but today that became unavailable too, so it must be an issue at the Octopus end or perhaps we are sending too many requests over? THE advantage of the Octopus Intelligent integration is it give you the 1, 2 and 3 hour slot indicators.

@DragonQ
Copy link

DragonQ commented Jan 28, 2024

I didn't realise that the BottlecapDave integration had the intelligent smart charging in already. I just wonder why are there 2 different integrations doing similar things..

Yes for some reason the BottlecapDave integration doesn't have issues with sensors turning unavailable like this one does.

However, this one has 2 advantages: it has a "next offpeak start" sensor, and it updates dispatch slots way more accurately. I suspect the latter might be due to it polling the API more frequently, which could also be the cause of the constant "unavailable" issues?

@megakid
Copy link
Owner

megakid commented Jan 28, 2024

This integration polls the API every 5 mins (see interval here https://github.com/megakid/ha_octopus_intelligent/blob/main/custom_components/octopus_intelligent/octopus_intelligent_system.py) which feels quite conservative but is obviously still a problem.

I did see someone say a header is required now which I need to research. I will try to get to it tonight

@megakid
Copy link
Owner

megakid commented Feb 4, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests