core: Tibber integration not working; server rejected WebSocket connection
The problem
After updating to the newest beta, the integration stopped working.
What version of Home Assistant Core has the issue?
2023.3.0b0
What was the last working version of Home Assistant Core?
2023.2.5
What type of installation are you running?
Home Assistant OS
Integration causing the issue
tibber
Link to integration documentation on our website
https://rc.home-assistant.io/integrations/tibber
Diagnostics information
Logger: tibber
Source: /usr/local/lib/python3.10/site-packages/tibber/__init__.py:181
First occurred: 9:06:34 AM (16 occurrences)
Last logged: 9:27:58 AM
Error in watchdog connect, retrying in 69 seconds, 9
Error in watchdog connect, retrying in 84 seconds, 10
Error in watchdog connect, retrying in 139 seconds, 11
Error in watchdog connect, retrying in 172 seconds, 12
Error in watchdog connect, retrying in 169 seconds, 13
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/tibber/__init__.py", line 173, in _rt_watchdog
await self.sub_manager.connect_async()
File "/usr/local/lib/python3.10/site-packages/gql/client.py", line 632, in connect_async
await self.transport.connect()
File "/usr/local/lib/python3.10/site-packages/gql/transport/websockets_base.py", line 490, in connect
self.websocket = await asyncio.wait_for(
File "/usr/local/lib/python3.10/asyncio/tasks.py", line 445, in wait_for
return fut.result()
File "/usr/local/lib/python3.10/asyncio/tasks.py", line 650, in _wrap_awaitable
return (yield from awaitable.__await__())
File "/usr/local/lib/python3.10/site-packages/websockets/legacy/client.py", line 659, in __await_impl_timeout__
return await asyncio.wait_for(self.__await_impl__(), self.open_timeout)
File "/usr/local/lib/python3.10/asyncio/tasks.py", line 445, in wait_for
return fut.result()
File "/usr/local/lib/python3.10/site-packages/websockets/legacy/client.py", line 666, in __await_impl__
await protocol.handshake(
File "/usr/local/lib/python3.10/site-packages/websockets/legacy/client.py", line 332, in handshake
raise InvalidStatusCode(status_code, response_headers)
websockets.exceptions.InvalidStatusCode: server rejected WebSocket connection: HTTP 404
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 9
- Comments: 22 (1 by maintainers)
You can do the following to get the sensors working again (probably requires home assistant >=2023.3.0):
https://github.com/home-assistant/core/tree/dev/homeassistant/components/tibberas the URLconfigfolder calledcustom_componentsconfig/custom_componentscalledtibbertibberfolderThis forces Home Assistant to use of the latest version of the pytibber library.
You can also create sensors to fetch information manually.
Sadly the consumption data requires a websocket subscription, so you’re limited to price information.
This sensor will fetch an array of todays and tomorrows prices:
Make sure to replace
!secret Tibber_APIwith your API key (starts with Bearer…)I hope someone can fix this quickly…I use Tibber and the Pulse in a few of my automations and they are now all dead in the water. If there is a workaround I can implement myself as a stopgap measure then I would love to hear about it…
Works with 2023.3.1
Workaround fixes it… waiting for the fix in the core.
https://github.com/home-assistant/core/issues/88656#issuecomment-1451245229
I just did some local testing and updating the manifest to pyTibber==0.27.1 is confirmed to be working again. Im not sure how to make a pull request as i havn`t before. I can give it a try tomorrow but if someone can do it faster feel free to do so.
Works (Y) Should this folder be removed after update?
All sensors stop working :S we need a fix ASAP!
The Tibber status page says:
API/HA - Tibber API will not work with the latest HA update
Monitoring - Home assistant can currently connect to websockets only when they specify user agent HomeAssistant/2022.12, HomeAssistant/2023.1 or HomeAssistant/2023.2. HomeAssistant/2023.3 wont be able to connect unless it will start using the pyTibber version 0.27. (Currently it uses 0.26). Feb 14, 2023 - 08:20 CET