Problem
I am intermittently (4-6 times a day) getting an error 'Error fetching myenergi data:' turning on debug it seems to be coming from the call
GET /api/AccountAccess/LibbiMode?serialNo=xxxxxx https://myaccount.myenergi.com/api/AccountAccess/LibbiMode?serialNo=xxxxxx
I am not sure but could this be a Token Expiration problem?
Is anyone else seeing this?
Configuration
Installation method
Home Assistant OS Core 2026.3.3
Supervisor 2026.03.2
Operating System 17.1
Frontend 20260312.0
My Energi Version 0.2.0
Debug Logs
2026-03-23 16:09:44.621 DEBUG (MainThread) [custom_components.myenergi] Refresh history local start of day in UTC 2026-03-23 00:00:00+00:00 UTC
2026-03-23 16:09:44.624 DEBUG (MainThread) [pymyenergi.client] Refreshing data for all myenergi devices
2026-03-23 16:09:44.624 DEBUG (MainThread) [pymyenergi.connection] GET /cgi-jstatus-* https://s18.myenergi.net/cgi-jstatus-*
2026-03-23 16:09:45.082 INFO (MainThread) [httpx] HTTP Request: GET https://s18.myenergi.net/cgi-jstatus-* "HTTP/1.1 200 OK"
2026-03-23 16:09:45.085 DEBUG (MainThread) [pymyenergi.connection] GET status 200
2026-03-23 16:09:45.086 DEBUG (MainThread) [pymyenergi.client] Updating eddi eddi-xxxxxx
2026-03-23 16:09:45.087 DEBUG (MainThread) [pymyenergi.client] Updating libbi libbi-xxxxx
2026-03-23 16:09:45.087 DEBUG (MainThread) [pymyenergi.connection] GET /api/AccountAccess/LibbiMode?serialNo=xxxxxx https://myaccount.myenergi.com/api/AccountAccess/LibbiMode?serialNo=xxxxxx
2026-03-23 16:09:45.224 INFO (MainThread) [httpx] HTTP Request: GET https://myaccount.myenergi.com/api/AccountAccess/LibbiMode?serialNo=xxxxx "HTTP/1.1 401 Unauthorized"
2026-03-23 16:09:45.227 DEBUG (MainThread) [pymyenergi.connection] GET status 401
2026-03-23 16:09:45.227 DEBUG (MainThread) [custom_components.myenergi]
2026-03-23 16:09:45.228 ERROR (MainThread) [custom_components.myenergi] Error fetching myenergi data:
2026-03-23 16:09:45.228 DEBUG (MainThread) [custom_components.myenergi] Full error:
Traceback (most recent call last):
File "/config/custom_components/myenergi/init.py", line 110, in _async_update_data
await self.client.refresh()
File "/usr/local/lib/python3.14/site-packages/pymyenergi/client.py", line 266, in refresh
await existing_device.refresh_extra()
File "/usr/local/lib/python3.14/site-packages/pymyenergi/libbi.py", line 102, in refresh_extra
chargeFromGrid = await self._connection.get(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
...<2 lines>...
)
^
File "/usr/local/lib/python3.14/site-packages/pymyenergi/connection.py", line 161, in get
return await self.send("GET", url, data, oauth)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/pymyenergi/connection.py", line 110, in send
raise WrongCredentials()
pymyenergi.exceptions.WrongCredentials
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 426, in _async_refresh
self.data = await self._async_update_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/myenergi/init.py", line 114, in _async_update_data
raise UpdateFailed() from exception
homeassistant.helpers.update_coordinator.UpdateFailed
2026-03-23 16:09:45.244 DEBUG (MainThread) [custom_components.myenergi] Finished fetching myenergi data in 0.623 seconds (success: False)
Problem
I am intermittently (4-6 times a day) getting an error 'Error fetching myenergi data:' turning on debug it seems to be coming from the call
GET /api/AccountAccess/LibbiMode?serialNo=xxxxxx https://myaccount.myenergi.com/api/AccountAccess/LibbiMode?serialNo=xxxxxx
I am not sure but could this be a Token Expiration problem?
Is anyone else seeing this?
Configuration
Installation method
Home Assistant OS Core 2026.3.3
Supervisor 2026.03.2
Operating System 17.1
Frontend 20260312.0
My Energi Version 0.2.0
Debug Logs
2026-03-23 16:09:44.621 DEBUG (MainThread) [custom_components.myenergi] Refresh history local start of day in UTC 2026-03-23 00:00:00+00:00 UTC
2026-03-23 16:09:44.624 DEBUG (MainThread) [pymyenergi.client] Refreshing data for all myenergi devices
2026-03-23 16:09:44.624 DEBUG (MainThread) [pymyenergi.connection] GET /cgi-jstatus-* https://s18.myenergi.net/cgi-jstatus-*
2026-03-23 16:09:45.082 INFO (MainThread) [httpx] HTTP Request: GET https://s18.myenergi.net/cgi-jstatus-* "HTTP/1.1 200 OK"
2026-03-23 16:09:45.085 DEBUG (MainThread) [pymyenergi.connection] GET status 200
2026-03-23 16:09:45.086 DEBUG (MainThread) [pymyenergi.client] Updating eddi eddi-xxxxxx
2026-03-23 16:09:45.087 DEBUG (MainThread) [pymyenergi.client] Updating libbi libbi-xxxxx
2026-03-23 16:09:45.087 DEBUG (MainThread) [pymyenergi.connection] GET /api/AccountAccess/LibbiMode?serialNo=xxxxxx https://myaccount.myenergi.com/api/AccountAccess/LibbiMode?serialNo=xxxxxx
2026-03-23 16:09:45.224 INFO (MainThread) [httpx] HTTP Request: GET https://myaccount.myenergi.com/api/AccountAccess/LibbiMode?serialNo=xxxxx "HTTP/1.1 401 Unauthorized"
2026-03-23 16:09:45.227 DEBUG (MainThread) [pymyenergi.connection] GET status 401
2026-03-23 16:09:45.227 DEBUG (MainThread) [custom_components.myenergi]
2026-03-23 16:09:45.228 ERROR (MainThread) [custom_components.myenergi] Error fetching myenergi data:
2026-03-23 16:09:45.228 DEBUG (MainThread) [custom_components.myenergi] Full error:
Traceback (most recent call last):
File "/config/custom_components/myenergi/init.py", line 110, in _async_update_data
await self.client.refresh()
File "/usr/local/lib/python3.14/site-packages/pymyenergi/client.py", line 266, in refresh
await existing_device.refresh_extra()
File "/usr/local/lib/python3.14/site-packages/pymyenergi/libbi.py", line 102, in refresh_extra
chargeFromGrid = await self._connection.get(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
...<2 lines>...
)
^
File "/usr/local/lib/python3.14/site-packages/pymyenergi/connection.py", line 161, in get
return await self.send("GET", url, data, oauth)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/pymyenergi/connection.py", line 110, in send
raise WrongCredentials()
pymyenergi.exceptions.WrongCredentials
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 426, in _async_refresh
self.data = await self._async_update_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/myenergi/init.py", line 114, in _async_update_data
raise UpdateFailed() from exception
homeassistant.helpers.update_coordinator.UpdateFailed
2026-03-23 16:09:45.244 DEBUG (MainThread) [custom_components.myenergi] Finished fetching myenergi data in 0.623 seconds (success: False)