core: Tibber integration losses his connection and does not get it back

The problem

I’m using the latest release of HA (2023.03.1) and since then the Tibber integration has lost it’s connection twice.

See log for details.

What version of Home Assistant Core has the issue?

2023.3.1

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

No response

Diagnostics information

config_entry-tibber-3f24869fce4711c38ea58585b2147299.json.txt

Tibber log crash 2023-03-06.txt

Example YAML snippet

No response

Anything in the logs that might be useful for us?

2023-03-06 11:00:50.091 DEBUG (MainThread) [homeassistant.components.tibber.sensor] Manually updated Opsaheden 44 data
2023-03-06 11:00:50.108 DEBUG (MainThread) [tibber.tibber_home] Data received for 9ca92063-a177-40f3-........
2023-03-06 11:00:50.390 DEBUG (MainThread) [tibber] Watchdog: Connection is alive
2023-03-06 11:00:55.391 DEBUG (MainThread) [tibber] Watchdog: Connection is alive
2023-03-06 11:01:00.366 DEBUG (MainThread) [homeassistant.components.tibber.sensor] Manually updated Opsaheden 44 data
2023-03-06 11:01:00.380 DEBUG (MainThread) [tibber.tibber_home] Data received for 9ca92063-a177-40f3-........
2023-03-06 11:01:00.393 DEBUG (MainThread) [tibber] Watchdog: Connection is alive
2023-03-06 11:01:05.395 DEBUG (MainThread) [tibber] Watchdog: Connection is alive
2023-03-06 11:01:10.163 DEBUG (MainThread) [homeassistant.components.tibber.sensor] Manually updated Opsaheden 44 data
2023-03-06 11:01:10.178 DEBUG (MainThread) [tibber.tibber_home] Data received for 9ca92063-a177-40f3-............
2023-03-06 11:01:10.397 DEBUG (MainThread) [tibber] Watchdog: Connection is alive
2023-03-06 11:01:15.399 DEBUG (MainThread) [tibber] Watchdog: Connection is alive
2023-03-06 11:01:19.268 ERROR (MainThread) [tibber.tibber_home] Error in rt_subscribe
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/tibber/tibber_home.py", line 415, in _start
    async for data in self._tibber_control.sub_manager.session.subscribe(
  File "/usr/local/lib/python3.10/site-packages/gql/client.py", line 1064, in subscribe
    async for result in inner_generator:
  File "/usr/local/lib/python3.10/site-packages/gql/client.py", line 960, in _subscribe
    async for result in inner_generator:
  File "/usr/local/lib/python3.10/site-packages/gql/transport/websockets_base.py", line 388, in subscribe
    answer_type, execution_result = await listener.get()
  File "/usr/local/lib/python3.10/site-packages/gql/transport/websockets_base.py", line 56, in get
    raise item
gql.transport.exceptions.TransportServerError: No pong received after 5.0 seconds
2023-03-06 11:01:20.401 ERROR (MainThread) [tibber] Watchdog: Connection is down
2023-03-06 11:01:44.313 ERROR (MainThread) [tibber] Error connecting to Tibber: Cannot connect to host api.tibber.com:443 ssl:default [Try again] 
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 1152, in _create_direct_connection
    hosts = await asyncio.shield(host_resolved)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 874, in _resolve_host
    addrs = await self._resolver.resolve(host, port, family=self._family)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/resolver.py", line 33, in resolve
    infos = await self._loop.getaddrinfo(
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 863, in getaddrinfo
    return await self.run_in_executor(
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.10/socket.py", line 955, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Try again

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/tibber/__init__.py", line 214, in _execute
    resp = await self.websession.post(self.api_endpoint, **post_args)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 536, in _request
    conn = await self._connector.connect(
  File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 540, in connect
    proto = await self._create_connection(req, traces, timeout)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 901, in _create_connection
    _, proto = await self._create_direct_connection(req, traces, timeout)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 1166, in _create_direct_connection
    raise ClientConnectorError(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host api.tibber.com:443 ssl:default [Try again]
2023-03-06 11:01:44.318 ERROR (MainThread) [tibber] Error connecting to Tibber: Cannot connect to host api.tibber.com:443 ssl:default [Try again] 
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 1152, in _create_direct_connection
    hosts = await asyncio.shield(host_resolved)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 1152, in _create_direct_connection
    hosts = await asyncio.shield(host_resolved)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 874, in _resolve_host
    addrs = await self._resolver.resolve(host, port, family=self._family)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/resolver.py", line 33, in resolve
    infos = await self._loop.getaddrinfo(
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 863, in getaddrinfo
    return await self.run_in_executor(
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.10/socket.py", line 955, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Try again

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/tibber/__init__.py", line 214, in _execute
    resp = await self.websession.post(self.api_endpoint, **post_args)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 536, in _request
    conn = await self._connector.connect(
  File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 540, in connect
    proto = await self._create_connection(req, traces, timeout)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 901, in _create_connection
    _, proto = await self._create_direct_connection(req, traces, timeout)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 1166, in _create_direct_connection
    raise ClientConnectorError(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host api.tibber.com:443 ssl:default [Try again]
2023-03-06 11:01:44.323 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 1152, in _create_direct_connection
    hosts = await asyncio.shield(host_resolved)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 1152, in _create_direct_connection
    hosts = await asyncio.shield(host_resolved)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 874, in _resolve_host
    addrs = await self._resolver.resolve(host, port, family=self._family)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/resolver.py", line 33, in resolve
    infos = await self._loop.getaddrinfo(
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 863, in getaddrinfo
    return await self.run_in_executor(
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.10/socket.py", line 955, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Try again

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/tibber/tibber_home.py", line 433, in _start
    await asyncio.gather(
  File "/usr/local/lib/python3.10/site-packages/tibber/tibber_home.py", line 198, in update_info
    if data := await self._tibber_control.execute(UPDATE_INFO % self._home_id):
  File "/usr/local/lib/python3.10/site-packages/tibber/__init__.py", line 184, in execute
    res := await self._execute(document, variable_values, timeout=timeout)
  File "/usr/local/lib/python3.10/site-packages/tibber/__init__.py", line 221, in _execute
    return await self._execute(
  File "/usr/local/lib/python3.10/site-packages/tibber/__init__.py", line 221, in _execute
    return await self._execute(
  File "/usr/local/lib/python3.10/site-packages/tibber/__init__.py", line 214, in _execute
    resp = await self.websession.post(self.api_endpoint, **post_args)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 536, in _request
    conn = await self._connector.connect(
  File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 540, in connect
    proto = await self._create_connection(req, traces, timeout)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 901, in _create_connection
    _, proto = await self._create_direct_connection(req, traces, timeout)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 1166, in _create_direct_connection
    raise ClientConnectorError(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host api.tibber.com:443 ssl:default [Try again]
2023-03-06 11:02:09.302 ERROR (MainThread) [tibber] Error in watchdog connect, will retry. Retry count: 2
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/tibber/__init__.py", line 160, in _rt_watchdog
    await self.rt_connect()
  File "/usr/local/lib/python3.10/site-packages/tibber/__init__.py", line 115, in rt_connect
    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 663, in __await_impl__
    _transport, _protocol = await self._create_connection()
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1036, in create_connection
    infos = await self._ensure_resolved(
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1418, in _ensure_resolved
    return await loop.getaddrinfo(host, port, family=family, type=type,
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 863, in getaddrinfo
    return await self.run_in_executor(
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.10/socket.py", line 955, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Try again
2023-03-06 11:02:09.311 ERROR (MainThread) [tibber] Watchdog: Connection is down
2023-03-06 11:02:54.329 ERROR (MainThread) [tibber] Error in watchdog connect, will retry. Retry count: 3
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/tibber/__init__.py", line 160, in _rt_watchdog
    await self.rt_connect()
  File "/usr/local/lib/python3.10/site-packages/tibber/__init__.py", line 115, in rt_connect
    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 663, in __await_impl__
    _transport, _protocol = await self._create_connection()
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1036, in create_connection
    infos = await self._ensure_resolved(
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1418, in _ensure_resolved
    return await loop.getaddrinfo(host, port, family=family, type=type,
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 863, in getaddrinfo
    return await self.run_in_executor(
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.10/socket.py", line 955, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Try again
2023-03-06 11:02:54.334 ERROR (MainThread) [tibber] Watchdog: Connection is down
2023-03-06 11:03:15.348 ERROR (MainThread) [tibber] Error in watchdog connect, will retry. Retry count: 4
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/tibber/__init__.py", line 160, in _rt_watchdog
    await self.rt_connect()
  File "/usr/local/lib/python3.10/site-packages/tibber/__init__.py", line 115, in rt_connect
    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 663, in __await_impl__
    _transport, _protocol = await self._create_connection()
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1036, in create_connection
    infos = await self._ensure_resolved(
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1418, in _ensure_resolved
    return await loop.getaddrinfo(host, port, family=family, type=type,
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 863, in getaddrinfo
    return await self.run_in_executor(
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.10/socket.py", line 955, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Try again
2023-03-06 11:03:15.355 ERROR (MainThread) [tibber] Watchdog: Connection is down
2023-03-06 11:03:21.842 ERROR (MainThread) [snitun.multiplexer.core] Ping fails, no response from peer
2023-03-06 11:03:27.865 ERROR (MainThread) [snitun.client.client_peer] Can't connect to SniTun server eu-west-2-1.ui.nabu.casa:443 with: [Errno -3] Try again
2023-03-06 11:03:27.869 ERROR (MainThread) [hass_nabucasa.remote] Connection problem to snitun server
2023-03-06 11:03:33.881 ERROR (MainThread)

Additional information

No response

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 2
  • Comments: 156 (24 by maintainers)

Most upvoted comments

@Danielhiversen I am not a coder even I work with software systems, I would provide if I had the skills in this. We are dependent on you for this feature 😦 Be care full starting a “sole” project if you cannot maintain it somehow. People believe in this and buy i.e, Tibber Pulse hardware, but also spend a lot of time on error tracking - on each person level of knowledge - in order to support your highly appreciated time on this plugin.

Sure. Here you go. I created the automation directly from the UI. Hope ot works for you.

alias: Tibber failsafe description: “” trigger:

  • platform: state entity_id:
    • sensor.strom_aktuell (your tibber “power” sensor) for: hours: 0 minutes: 1 seconds: 0 condition: [] action:
  • service: homeassistant.reload_config_entry data: {} target: device_id: selectyourtibberentryhere mode: single

I’ve noticed that core is still using pytibber 0.27.0 and not 0.27.1. I have no dropouts or errors when manually using 0.27.1 by adding the integration to custom components and modifying the manifest.json to use pytibber 0.27.1.

Can someone please try the following and check if it solves the problem for them?:

I’ve now added more extensive logs for this specific user to show whether the server thinks it sent data to the client or not. That should allow us to see what happened just before the client closes connection next time.

I can check for the server logs if you experience any outages to see what happened there. I will need to have your home id, user id, IP or email address used to register at tibber. You can contact me via toni@tibber.com.

@toni Sounds great that you improve the reconnect issues on your (tibber) side.

However as @LAPDragnet says, and been concluded by me and others, it is Data Fetching that stops within Tibber integration after Interruption of Connection to Tibber Servers… Why Tibber integration wont recover seems to be that the watchdog (if present) in Tibber Integration do not detect that no data is received even Tibber Integration log says connection is alive. Connection is alive but no payload/measure data is seen in the log. As long developer @Danielhiversen or someone else with skills wont look into this recovery wont work every time there is x-time network connection or service interruption to Tibber servers.

@papnak after detecting the problem with clients reconnecting in bursts leading to connection issues we stopped all Websocket API deployments and are working with an improved/delayed shutdown process (to avoid bursts to the new servers). The implementation is now done but we need to invest time in reviewing and testing this thoroughly to avoid troubles.

I suspect the issue you might be running into with fast refreshing the page is that some of the websocket connections stay open and do not get cleaned out (which is of course wrong but might happen if the client keeps it open). The maximum number of connections we allow per authentication token is 2. See Subscribing to data with websockets. If you exceed that you can no longer connect until the old connections are closed.

Chiming in here to mention that we did a deploy of the websocket server yesterday at around 16:25 CEST, and that would result in disconnects. Clients should reconnect and recover straight away, but if people are seeing actual timeouts during those reconnects, that is suspect. There should be no (general) downtime during a deploy. However, the quick burst of clients reconnecting is hard to handle, so we require clients to use random reconnection delays to not hammer our API, and some do.

For the people who saw timeouts yesterday evening, did the integration eventually recover, and if so, after how long time, or did you have to restart it?

@papnak I actually had the same lockup at 16:28:31 Maybe @Danielhiversen or @toini could check if there was something server side at this time.

Same for me, froze at exactly the same time. I am in Norway with a steady wireless network (Ubiquiti with several APs throughout the house, Tibber Pulse is locked to a dedicated AP so bad wifi is definitely not the issue for me). As many others, the issues started after update to 2023.3.X.

@ShogunMan Good point 👍 I have done a smaller fix in 0.27.1. I do not think that is the main issue, but will anyway update HA to use it.

I am from Sweden with rather rock stable 500 Mbit fiber and the Tibber Pulse connected via Unifi 6 LR APs. I always update when there is a new HA update, so running 2023.4.6 now.

To have a positive note, the summary is that my Tibber Integration has worked much better since March. But then I have added two stop gap solution automations after the discussions here that solves the resulting end user problem of “stalled Tibber sensor data” that makes energy readings die.

Look at the monthly energy summaries for this year where the Tibber integration “stalling” can be seen from the perspective of my wife 😉

Look at January and February with big gaps where the integration stalled, and I did not notice it before doing a manual reload.

energy_usage_jan23 energy_usage_feb23

Then in March I realized I needed to look at this and started posting here - getting good advice resulting in creating the “Tibber integration restart every night” automation that reload the config every night at 03:30. YAML attached below.

So, looking at the march energy stats we can see “stalls” on the 6:th and14:th of march that are “corrected” in the 03:30 reload of the config the day after. But then the energy for the day it stalled ends up on the next day (at 03:30) making the day after looking bad, and the day it died look “good”…

HA_tibber_restart_every_night_automation

energy_usage_mar23

Then after more advice here I added the automation for “Tibber – Auto Reload” (YAML attached) in late March that reloads the configuration for Tiber if the “average power” metric from Tibber has not changed for an hour. So looking at April the end user (wife and kids) experience is good as can be seen. But then it reloads the config every night, AND the auto reload goes in if it has been stale for over an hour and reloads it. But these stop gap automations makes the resulting problem of the stalls go away at least 😃

HA_auto_reload_automation

energy_usage_april23

For the state now - the last time the “Auto Reload” was triggered was on the 19:th of April (see screenshot), but it fixed the stall without any noticable metric loss as can be seen. But the last month (since I added the Auto Reload automation) the end result at least is stable as I do not have any “bad days” with lost energy consumption metrics since mid March…

Tibber Reload april 19

Tibber Reload april 19 energy day

And a note for using Tibber in the HA energy dashboards… Until the friendly advice from @IvovanWilligen in early March, I was using “accumulated consumption” from Tibber for the Energy dashboard but changed to “last meter consumption” that I recommend if anyone has set it up the way I did with accumulated! When using accumulated instead of last meter you get negative readings the day when it recovers.

A thought, if everyone was running something similar to the “Auto Reload” automation, it would be interesting to see if there is a correlation when it happens that could indicate an upstream problem in the Tibber APIs. Or if’s a local problem that has made the integration stall…

And - as images and graphs are fun, the Tibber problem from the Grafana perspective for 2023 where you can se the odd flat plateaus when Tibber Pulse integration has stalled in the “Energi” graph… And yes, winters are dark in Sweden 😃

Some Swedish translations for anyone interested in the other stuff 😉 Energi = Energy (kind of obvious) Värmepump = Heat Pump Innomhus = Indoor Utomhus = Outdoor

grafana_ytd

I don’t believe this bug is very hard to fix, it is about re-establish connection and it should be relatively easy to to track down where and what goes wrong…

@RicardP Would be great if you could help out. Any pull request is more than welcome.

More worrying is that the main developer is a data analyst at Tibber, and should have some information that we lack.

This is something I do in my spare time. Unfortunately, I do not have much time to spend on this at the moment. I do some work on it, and have had some progress. So if no other fixes it, I will fix it at some point

Im sharing logs for one user that experienced outage on 14th April.

Client seems to repeatedly close connection with code 1000 which means “The client closes the socket and the connection by dispatching a 1000: Normal Closure close event to the server indicating a normal closure” (https://github.com/enisdenjo/graphql-ws/blob/master/PROTOCOL.md).

We should try to figure out why the client thinks the connection needs to be closed.

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|                                                                                                                                message                                                                                                                                |
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| 2023-04-14T11:03:41.755Z INFO 01c66591947dd9186acfd73c88184660 [websocket] on complete; userId <user id>; userIp <user ip>; userAgent HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0; subscription id 1              |
| 2023-04-14T11:03:41.755Z INFO [websocket] start streaming for user <user id>; home <home id>; device <device id>; bridge device undefined                                              |
| 2023-04-14T11:03:51.733Z INFO f81f99df2b5f937c9a54d5ee24d8e780 [websocket] on complete; userId <user id>; userIp <user ip>; userAgent HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0; subscription id 2              |
| 2023-04-14T11:03:51.733Z INFO eece06248f8f53368b24e157d715b38d [websocket] on disconnect; userId <user id>; userIp <user ip>; userAgent HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0                               |
| 2023-04-14T11:03:51.734Z INFO 9437145137f4b264d8cb6cd955f57217 [websocket] on close; code 1000; reason ; token count 0; userId <user id>; userIp <user ip>; userAgent HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0 |
| 2023-04-14T11:03:56.627Z INFO a69edf2b41c4cef64c33647bbfcf836d [websocket] client connected; verified token for user <user id>; HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0; <user ip>; count 1                   |
| 2023-04-14T11:04:06.482Z INFO [websocket] start streaming for user <user id>; home <home id>; device <device id>; bridge device undefined                                              |
| 2023-04-14T11:08:41.739Z INFO 7e95ea47c07d1786185f7a4dbf6b9a14 [websocket] on complete; userId <user id>; userIp <user ip>; userAgent HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0; subscription id 1              |
| 2023-04-14T11:08:41.752Z INFO [websocket] start streaming for user <user id>; home <home id>; device <device id>; bridge device undefined                                              |
| 2023-04-14T11:08:51.967Z INFO 31eac93b237fc5fd209086d6d1ae5342 [websocket] on complete; userId <user id>; userIp <user ip>; userAgent HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0; subscription id 2              |
| 2023-04-14T11:08:51.967Z INFO 933e8c78206c153f6de478710aa588cb [websocket] on disconnect; userId <user id>; userIp <user ip>; userAgent HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0                               |
| 2023-04-14T11:08:51.967Z INFO 7674c0b6a8cd5a448671b8312e2a4762 [websocket] on close; code 1000; reason ; token count 0; userId <user id>; userIp <user ip>; userAgent HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0 |
| 2023-04-14T11:08:52.478Z INFO e95d7b9b48107ebc7d9ee9194c54c883 [websocket] client connected; verified token for user <user id>; HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0; <user ip>; count 1                   |
| 2023-04-14T11:09:02.642Z INFO [websocket] start streaming for user <user id>; home <home id>; device <device id>; bridge device undefined                                              |
| 2023-04-14T11:22:24.451Z INFO c82c2e551780a6ef9c6248f4e50be7e8 [websocket] on complete; userId <user id>; userIp <user ip>; userAgent HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0; subscription id 1              |
| 2023-04-14T11:22:24.459Z INFO [websocket] start streaming for user <user id>; home <home id>; device <device id>; bridge device undefined                                              |
| 2023-04-14T11:22:34.755Z INFO 63404d0c9f41ffc6826a018bce8f8eaa [websocket] on complete; userId <user id>; userIp <user ip>; userAgent HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0; subscription id 2              |
| 2023-04-14T11:22:34.755Z INFO 213b7b51429fdd17c30809274d7c6c16 [websocket] on disconnect; userId <user id>; userIp <user ip>; userAgent HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0                               |
| 2023-04-14T11:22:34.755Z INFO c8325440ce3a165ffbf66061b3269767 [websocket] on close; code 1000; reason ; token count 0; userId <user id>; userIp <user ip>; userAgent HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0 |
| 2023-04-14T11:22:35.142Z INFO 0913985b7d0a5ab9eb5b5e1734496934 [websocket] client connected; verified token for user <user id>; HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0; <user ip>; count 1                   |
| 2023-04-14T11:22:45.904Z INFO [websocket] start streaming for user <user id>; home <home id>; device <device id>; bridge device undefined                                              |
| 2023-04-14T11:32:10.273Z INFO 40a2af8a62525f22df4ce2d8bfa8a39a [websocket] on complete; userId <user id>; userIp <user ip>; userAgent HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0; subscription id 1              |
| 2023-04-14T11:32:10.278Z INFO [websocket] start streaming for user <user id>; home <home id>; device <device id>; bridge device undefined                                              |
| 2023-04-14T11:32:20.276Z INFO 468b261b3eea93b773d8b19628d64235 [websocket] on complete; userId <user id>; userIp <user ip>; userAgent HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0; subscription id 2              |
| 2023-04-14T11:32:20.276Z INFO 316b5c8ea22bd3c5c0d9f3ab3f24344e [websocket] on disconnect; userId <user id>; userIp <user ip>; userAgent HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0                               |
| 2023-04-14T11:32:20.276Z INFO c068b90e60908c4df2679ebab563a22d [websocket] on close; code 1000; reason ; token count 0; userId <user id>; userIp <user ip>; userAgent HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0 |
| 2023-04-14T11:32:21.375Z INFO 016f9110e8e301959bc37b48221cbacc [websocket] client connected; verified token for user <user id>; HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0; <user ip>; count 1                   |
| 2023-04-14T11:32:31.369Z INFO [websocket] start streaming for user <user id>; home <home id>; device <device id>; bridge device undefined                                              |
| 2023-04-14T11:37:10.281Z INFO c0568ffca4f622a4bf6b8bb8b8b4f240 [websocket] on complete; userId <user id>; userIp <user ip>; userAgent HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0; subscription id 1              |
| 2023-04-14T11:37:10.286Z INFO [websocket] start streaming for user <user id>; home <home id>; device <device id>; bridge device undefined                                              |
| 2023-04-14T11:37:20.283Z INFO 51d9b0b4c3e590b2c26e5567ebcd6820 [websocket] on complete; userId <user id>; userIp <user ip>; userAgent HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0; subscription id 2              |
| 2023-04-14T11:37:20.283Z INFO 41d0fc4aa13f3327d7e23806650adf13 [websocket] on disconnect; userId <user id>; userIp <user ip>; userAgent HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0                               |
| 2023-04-14T11:37:20.283Z INFO fcab82ee6926bcc57b6bda96a6306300 [websocket] on close; code 1000; reason ; token count 0; userId <user id>; userIp <user ip>; userAgent HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0 |
| 2023-04-14T11:37:20.761Z INFO 3138201d0fb251c1631026ee9b4320e1 [websocket] client connected; verified token for user <user id>; HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0; <user ip>; count 1                   |
| 2023-04-14T11:37:30.520Z INFO [websocket] start streaming for user <user id>; home <home id>; device <device id>; bridge device undefined                                              |
| 2023-04-14T11:51:01.283Z INFO cd89a24e2550d142cae39be9d8c92747 [websocket] on complete; userId <user id>; userIp <user ip>; userAgent HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0; subscription id 1              |
| 2023-04-14T11:51:01.290Z INFO [websocket] start streaming for user <user id>; home <home id>; device <device id>; bridge device undefined                                              |
| 2023-04-14T11:51:11.283Z INFO c155f924cf6407e9f35ab4b711cfd6d7 [websocket] on complete; userId <user id>; userIp <user ip>; userAgent HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0; subscription id 2              |
| 2023-04-14T11:51:11.283Z INFO 10073a45a44798f2acb047e11deffd9c [websocket] on disconnect; userId <user id>; userIp <user ip>; userAgent HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0                               |
| 2023-04-14T11:51:11.283Z INFO 1f891c29350d2bb9e6676363e2002aab [websocket] on close; code 1000; reason ; token count 0; userId <user id>; userIp <user ip>; userAgent HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0 |
| 2023-04-14T11:51:11.776Z INFO f0b9a2db5811fd978f58a70b8b266eda [websocket] client connected; verified token for user <user id>; HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0; <user ip>; count 1                   |
| 2023-04-14T11:51:23.195Z INFO [websocket] start streaming for user <user id>; home <home id>; device <device id>; bridge device undefined                                              |
| 2023-04-14T11:56:01.282Z INFO 2fd356cceb43762f09bc9b3987e21272 [websocket] on complete; userId <user id>; userIp <user ip>; userAgent HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0; subscription id 1              |
| 2023-04-14T11:56:01.287Z INFO [websocket] start streaming for user <user id>; home <home id>; device <device id>; bridge device undefined                                              |
| 2023-04-14T11:56:11.285Z INFO ddcd6471150dbd2d2cdaf74a541f98cd [websocket] on complete; userId <user id>; userIp <user ip>; userAgent HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0; subscription id 2              |
| 2023-04-14T11:56:11.285Z INFO 86b2feeb97c317904e78435cbff15f2c [websocket] on disconnect; userId <user id>; userIp <user ip>; userAgent HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0                               |
| 2023-04-14T11:56:11.285Z INFO 51ddf3dee661fd7c1f2a18b281f8d18f [websocket] on close; code 1000; reason ; token count 0; userId <user id>; userIp <user ip>; userAgent HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0 |
| 2023-04-14T11:56:11.859Z INFO 5165283b6ffd1b38b9f351de64b37c54 [websocket] client connected; verified token for user <user id>; HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0; <user ip>; count 1                   |
| 2023-04-14T11:56:21.693Z INFO [websocket] start streaming for user <user id>; home <home id>; device <device id>; bridge device undefined                                              |
| 2023-04-14T12:16:59.505Z INFO 9dae94532584e78f53154276ee55960e [websocket] on complete; userId <user id>; userIp <user ip>; userAgent HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0; subscription id 1              |
| 2023-04-14T12:16:59.515Z INFO [websocket] start streaming for user <user id>; home <home id>; device <device id>; bridge device undefined                                              |
| 2023-04-14T12:17:09.507Z INFO a9df06652a044718f5ed5786adb51d49 [websocket] on complete; userId <user id>; userIp <user ip>; userAgent HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0; subscription id 2              |
| 2023-04-14T12:17:09.507Z INFO 44b39cc228a3cde8ddd4b844b61492f7 [websocket] on disconnect; userId <user id>; userIp <user ip>; userAgent HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0                               |
| 2023-04-14T12:17:09.508Z INFO 341a35f6d03afbbca599e19915d0a42f [websocket] on close; code 1000; reason ; token count 0; userId <user id>; userIp <user ip>; userAgent HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0 |
| 2023-04-14T12:17:09.960Z INFO cf56c5f595013201bc7baa2a8b46586e [websocket] client connected; verified token for user <user id>; HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0; <user ip>; count 1                   |
| 2023-04-14T12:17:19.868Z INFO [websocket] start streaming for user <user id>; home <home id>; device <device id>; bridge device undefined                                              |
| 2023-04-14T12:28:46.601Z INFO f00c9d7be596a74555e5cb942cbf1c47 [websocket] on complete; userId <user id>; userIp <user ip>; userAgent HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0; subscription id 1              |
| 2023-04-14T12:28:46.606Z INFO [websocket] start streaming for user <user id>; home <home id>; device <device id>; bridge device undefined                                              |
| 2023-04-14T12:28:56.599Z INFO 763069c4298bb500f40f953e231add2f [websocket] on complete; userId <user id>; userIp <user ip>; userAgent HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0; subscription id 2              |
| 2023-04-14T12:28:56.600Z INFO ee6f5915fd140664a1e49c21b89afe19 [websocket] on disconnect; userId <user id>; userIp <user ip>; userAgent HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0                               |
| 2023-04-14T12:28:56.600Z INFO 9d165bbd191c60bf1a91ac8f125152b9 [websocket] on close; code 1000; reason ; token count 0; userId <user id>; userIp <user ip>; userAgent HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0 |
| 2023-04-14T12:28:57.051Z INFO 6f1ddb4423159415bc9d268fea3c0def [websocket] client connected; verified token for user <user id>; HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0; <user ip>; count 1                   |
| 2023-04-14T12:29:06.881Z INFO [websocket] start streaming for user <user id>; home <home id>; device <device id>; bridge device undefined                                              |
| 2023-04-14T12:33:46.603Z INFO 94f9fdcfaba7a7bc714e4a4ad133e71f [websocket] on complete; userId <user id>; userIp <user ip>; userAgent HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0; subscription id 1              |
| 2023-04-14T12:33:46.612Z INFO [websocket] start streaming for user <user id>; home <home id>; device <device id>; bridge device undefined                                              |
| 2023-04-14T12:33:56.603Z INFO 508221ea1cd9aa8b3f247d7e642daa47 [websocket] on complete; userId <user id>; userIp <user ip>; userAgent HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0; subscription id 2              |
| 2023-04-14T12:33:56.603Z INFO 6479c1db33d1d5f29b3773e734eb3c8f [websocket] on disconnect; userId <user id>; userIp <user ip>; userAgent HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0                               |
| 2023-04-14T12:33:56.604Z INFO 6296129f5778c3430d6d1b5a0c6d1b9f [websocket] on close; code 1000; reason ; token count 0; userId <user id>; userIp <user ip>; userAgent HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0 |
| 2023-04-14T12:33:57.461Z INFO 9496410de4451458d906a739564c274a [websocket] client connected; verified token for user <user id>; HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0; <user ip>; count 1                   |
| 2023-04-14T12:34:08.162Z INFO [websocket] start streaming for user <user id>; home <home id>; device <device id>; bridge device undefined                                              |
| 2023-04-14T12:36:26.389Z INFO 334f03b23b2895829aa8ec7dc559d91d [websocket] on complete; userId <user id>; userIp <user ip>; userAgent HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0; subscription id 1              |
| 2023-04-14T12:36:26.393Z INFO [websocket] start streaming for user <user id>; home <home id>; device <device id>; bridge device undefined                                              |
| 2023-04-14T12:36:36.391Z INFO bbb876ff364e3a23c4328fbea902acc8 [websocket] on complete; userId <user id>; userIp <user ip>; userAgent HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0; subscription id 2              |
| 2023-04-14T12:36:36.391Z INFO 990520f6ed56484475e78f0824db48de [websocket] on disconnect; userId <user id>; userIp <user ip>; userAgent HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0                               |
| 2023-04-14T12:36:36.391Z INFO 545ab39d8c79a830dc429ac3d6537e18 [websocket] on close; code 1000; reason ; token count 0; userId <user id>; userIp <user ip>; userAgent HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0 |
| 2023-04-14T12:36:36.815Z INFO ee4d89471f2a842db48e823036537886 [websocket] client connected; verified token for user <user id>; HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0; <user ip>; count 1                   |
| 2023-04-14T12:36:46.612Z INFO [websocket] start streaming for user <user id>; home <home id>; device <device id>; bridge device undefined                                              |
| 2023-04-14T12:52:45.282Z INFO 1e71c018e36bc9e5e088a38d76de5053 [websocket] on complete; userId <user id>; userIp <user ip>; userAgent HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0; subscription id 1              |
| 2023-04-14T12:52:45.294Z INFO [websocket] start streaming for user <user id>; home <home id>; device <device id>; bridge device undefined                                              |
| 2023-04-14T12:52:55.284Z INFO 1012df31f86ee3848bc1f670091fd270 [websocket] on complete; userId <user id>; userIp <user ip>; userAgent HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0; subscription id 2              |
| 2023-04-14T12:52:55.284Z INFO 14af1f9df804a52e44d8f39104e9673d [websocket] on disconnect; userId <user id>; userIp <user ip>; userAgent HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0                               |
| 2023-04-14T12:52:55.284Z INFO fc5b24f2f03b5bca20bf8ddf75959191 [websocket] on close; code 1000; reason ; token count 0; userId <user id>; userIp <user ip>; userAgent HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0 |
| 2023-04-14T12:52:56.476Z INFO 371b444dc094afc91a93e70924e298d2 [websocket] client connected; verified token for user <user id>; HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0; <user ip>; count 1                   |
| 2023-04-14T12:53:05.742Z INFO [websocket] start streaming for user <user id>; home <home id>; device <device id>; bridge device undefined                                              |
| 2023-04-14T12:57:45.283Z INFO f92624706f4f3050c45b92c28f638a5a [websocket] on complete; userId <user id>; userIp <user ip>; userAgent HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0; subscription id 1              |
| 2023-04-14T12:57:45.287Z INFO [websocket] start streaming for user <user id>; home <home id>; device <device id>; bridge device undefined                                              |
| 2023-04-14T12:57:55.286Z INFO acef6197f3f5ecfbf71046177dd655d2 [websocket] on complete; userId <user id>; userIp <user ip>; userAgent HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0; subscription id 2              |
| 2023-04-14T12:57:55.286Z INFO 3312e5bc6417beda86262f25a4b02fad [websocket] on disconnect; userId <user id>; userIp <user ip>; userAgent HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0                               |
| 2023-04-14T12:57:55.286Z INFO 04b495145e62a1d7027db3426367cc24 [websocket] on close; code 1000; reason ; token count 0; userId <user id>; userIp <user ip>; userAgent HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0 |
| 2023-04-14T12:57:55.927Z INFO 4345801965f76d44f46f56a7b169863b [websocket] client connected; verified token for user <user id>; HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0; <user ip>; count 1                   |
| 2023-04-14T12:58:05.847Z INFO [websocket] start streaming for user <user id>; home <home id>; device <device id>; bridge device undefined                                              |
| 2023-04-14T13:24:05.664Z INFO 690a7f0ad1eaa6985762d5be4e690081 [websocket] on complete; userId <user id>; userIp <user ip>; userAgent HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0; subscription id 1              |
| 2023-04-14T13:24:05.669Z INFO [websocket] start streaming for user <user id>; home <home id>; device <device id>; bridge device undefined                                              |
| 2023-04-14T13:24:15.665Z INFO 8422cbdb5d2ca02154f9ff50f196be09 [websocket] on complete; userId <user id>; userIp <user ip>; userAgent HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0; subscription id 2              |
| 2023-04-14T13:24:15.665Z INFO 48d0ff6af8b12da5de75f72005929886 [websocket] on disconnect; userId <user id>; userIp <user ip>; userAgent HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0                               |
| 2023-04-14T13:24:15.666Z INFO a25f82172e3bc3c1b0e9170e9be31f02 [websocket] on close; code 1000; reason ; token count 0; userId <user id>; userIp <user ip>; userAgent HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0 |
| 2023-04-14T13:24:16.072Z INFO 53e9bce9115d8be4a403e4df1019f8b3 [websocket] client connected; verified token for user <user id>; HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0; <user ip>; count 1                   |
| 2023-04-14T13:24:26.025Z INFO [websocket] start streaming for user <user id>; home <home id>; device <device id>; bridge device undefined                                              |
| 2023-04-14T13:29:05.664Z INFO 1ecdaaf4134a7f36be565f9d55f3de01 [websocket] on complete; userId <user id>; userIp <user ip>; userAgent HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0; subscription id 1              |
| 2023-04-14T13:29:05.672Z INFO [websocket] start streaming for user <user id>; home <home id>; device <device id>; bridge device undefined                                              |
| 2023-04-14T13:29:15.665Z INFO 370d4c86b56ed5fde5c44f094415df56 [websocket] on complete; userId <user id>; userIp <user ip>; userAgent HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0; subscription id 2              |
| 2023-04-14T13:29:15.665Z INFO 0987f4b43bd52432f9bdcc7b1398e043 [websocket] on disconnect; userId <user id>; userIp <user ip>; userAgent HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0                               |
| 2023-04-14T13:29:15.665Z INFO d12637aaf9278cc1f513b490920a0818 [websocket] on close; code 1000; reason ; token count 0; userId <user id>; userIp <user ip>; userAgent HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0 |
| 2023-04-14T13:29:16.167Z INFO 8e41462833e707170d4291396096ab1e [websocket] client connected; verified token for user <user id>; HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0; <user ip>; count 1                   |
| 2023-04-14T13:29:27.552Z INFO [websocket] start streaming for user <user id>; home <home id>; device <device id>; bridge device undefined                                              |
| 2023-04-14T13:52:40.540Z INFO 41521fd0f86d194ea84c8fca417d9225 [websocket] on complete; userId <user id>; userIp <user ip>; userAgent HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0; subscription id 1              |
| 2023-04-14T13:52:40.549Z INFO [websocket] start streaming for user <user id>; home <home id>; device <device id>; bridge device undefined                                              |
| 2023-04-14T13:52:50.542Z INFO 74c1a5cd91be95491f5ece8bdebafead [websocket] on complete; userId <user id>; userIp <user ip>; userAgent HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0; subscription id 2              |
| 2023-04-14T13:52:50.543Z INFO e81d4e0978df8aa98629bd63afa0cb9d [websocket] on disconnect; userId <user id>; userIp <user ip>; userAgent HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0                               |
| 2023-04-14T13:52:50.543Z INFO 0b6a5569459cbd80d293cd009b7834ce [websocket] on close; code 1000; reason ; token count 0; userId <user id>; userIp <user ip>; userAgent HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0 |
| 2023-04-14T13:52:51.951Z INFO 99ffbfc5fa7e5f8e0d844b4da59cf391 [websocket] client connected; verified token for user <user id>; HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0; <user ip>; count 1                   |
| 2023-04-14T13:53:01.759Z INFO [websocket] start streaming for user <user id>; home <home id>; device <device id>; bridge device undefined                                              |
| 2023-04-14T14:01:46.130Z INFO 170b9a235967052c7b8073322564f00c [websocket] on complete; userId <user id>; userIp <user ip>; userAgent HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0; subscription id 1              |
| 2023-04-14T14:01:46.134Z INFO [websocket] start streaming for user <user id>; home <home id>; device <device id>; bridge device undefined                                              |
| 2023-04-14T14:01:56.132Z INFO c290e0918fbc445091c8bf881ef5c457 [websocket] on complete; userId <user id>; userIp <user ip>; userAgent HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0; subscription id 2              |
| 2023-04-14T14:01:56.132Z INFO fbef05878e9cec00e6215174e207ea85 [websocket] on disconnect; userId <user id>; userIp <user ip>; userAgent HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0                               |
| 2023-04-14T14:01:56.132Z INFO dd3c4cc307b6d0ef4865c388d1dcb50f [websocket] on close; code 1000; reason ; token count 0; userId <user id>; userIp <user ip>; userAgent HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0 |
| 2023-04-14T14:01:56.567Z INFO d11d654b5888b6c5dd8a29e02ce4ad33 [websocket] client connected; verified token for user <user id>; HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0; <user ip>; count 1                   |
| 2023-04-14T14:02:06.381Z INFO [websocket] start streaming for user <user id>; home <home id>; device <device id>; bridge device undefined                                              |
| 2023-04-14T14:06:46.128Z INFO ee3e41e8cad9b149ae4e19f644a9f01d [websocket] on complete; userId <user id>; userIp <user ip>; userAgent HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0; subscription id 1              |
| 2023-04-14T14:06:46.132Z INFO [websocket] start streaming for user <user id>; home <home id>; device <device id>; bridge device undefined                                              |
| 2023-04-14T14:06:56.130Z INFO 9cf2d4a910889b49d87c278c2afc11d0 [websocket] on complete; userId <user id>; userIp <user ip>; userAgent HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0; subscription id 2              |
| 2023-04-14T14:06:56.130Z INFO 5c31d2d3cd9d7a6336d002abe408efba [websocket] on disconnect; userId <user id>; userIp <user ip>; userAgent HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0                               |
| 2023-04-14T14:06:56.130Z INFO 28e20ac69f26cfb5c291b1922209f2b6 [websocket] on close; code 1000; reason ; token count 0; userId <user id>; userIp <user ip>; userAgent HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0 |
| 2023-04-14T14:06:57.354Z INFO 6a2d8f2af86e2b83b3eabaf3b31bbd70 [websocket] client connected; verified token for user <user id>; HomeAssistant/2023.4.4 aiohttp/3.8.4 Python/3.10 pyTibber/0.27.0; <user ip>; count 1                   |
| 2023-04-14T14:07:06.445Z INFO [websocket] start streaming for user <user id>; home <home id>; device <device id>; bridge device undefined                                              |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Having the full tibber integration under custom_components seems to solve the problem, at least for me. After removing it from custom components and relying on the core integration, I started experiencing hangups again.

I have now tried to circumvent this by creating an automation that reloads Tibber if the state of the Pulse “Power” hasn’t changed in 5 Minutes. This should mean that the maximum lost time would be 5 Minutes which is OK I guess