Sholofly / lghorizon

Custom integration to control LG Horizon settop boxes for Ziggo(NL), Magenta(AT), UPC(CH), Virgin(GB, IE), Telenet(BE)
GNU General Public License v3.0
58 stars 13 forks source link

After Core update and HA core restart devices remain unavailable #90

Closed JBakers closed 7 months ago

JBakers commented 7 months ago

Describe the bug After core update to 2024.1.3 the devices stay unavailable. I both have a Next (DCX960) and a Next mini (VIP5002W).

To Reproduce Steps to reproduce the behavior: Restart/update core

Expected behavior Devices be available

Screenshots

Version of the component 0.5.4

Logging Enable debug logging and add your log. DO NOT SHARE SENSITIVE DATA SUCH AS PASSWORDS AND ACCOUNT INFO! You can enable logging by setting up the logging component in HA as follows:

debug log attached home-assistant.log

Additional context There is no log in HA as the integration loads without a problem, (see debuglog above) Update to latest core 2024.1.5 I restarted HA multiple times, also restarted the container. I removed integration completely and reinstalled. Energy Modes are set to high and both Next boxes also rebooted.

Sholofly commented 7 months ago

Great Britain?

JBakers commented 7 months ago

Netherlands

mtbbart commented 7 months ago

Same behaviour in Belgium with Telenet.

Braakie commented 7 months ago

Exactly the same here, also the DCX960 living in the Netherlands. media_player.mediabox_next is not available home-assistant.log

deeg61 commented 7 months ago

This morning same here (Netherlands, ziggo box) no longer availlable

golles commented 7 months ago

recording_capacity sensor is working fine, only media_player remains unavailable

golles commented 7 months ago

Not sure if this is a HA core update issue, rolling back to 2024.1.4, 2024.1.3 and 2024.1.2 doesn't make any difference

JBakers commented 7 months ago

Not sure if this is a HA core update issue, rolling back to 2024.1.4, 2024.1.3 and 2024.1.2 doesn't make any difference

yup, restoring previous backups results in same error, not available.

JBakers commented 7 months ago

Exactly the same here, also the DCX960 living in the Netherlands. media_player.mediabox_next is not available home-assistant.log

looks like you uploaded my log (they're exactly the same)

Braakie commented 7 months ago

Sorry

Exactly the same here, also the DCX960 living in the Netherlands. media_player.mediabox_next is not available home-assistant.log

looks like you uploaded my log (they're exactly the same)

I was just comparing and seeing if I saw anything striking. Accidentally uploaded the wrong log. I fixed it and uploaded the correct log

canedje commented 7 months ago

same here Netherlands: Next mini Ziggo after update HA core to 2024.1.5

GHeiner commented 7 months ago

I Have the same problem with my Next Mini Ziggo. After installing 2024.1.5 this morning the device the device stays unavailable. indeed the Recording percentage is available.

Sholofly commented 7 months ago

I can't reproduce the error myself, but i published a new version with a possible fix. Please try v0.5.5

canedje commented 7 months ago

It is up and running again after v0.5.5

GHeiner commented 7 months ago

Yes also in my case it's working as before

Sholofly commented 7 months ago

@nivula, Does it work in CH too?

JBakers commented 7 months ago

Confirmed working again. 0.5.5

netrene commented 7 months ago

0.5.5 does not fix it for me in Switzerland.

Logs ar still full with this: 2024-01-21 21:02:29.024 ERROR (SyncWorker_3) [lghorizon.lghorizon_api] Giving up _do_api_call(...) after 3 tries (lghorizon.exceptions.LGHorizonApiConnectionError: Unable to call https://spark-prod-ch.gnp.cloud.sunrisetv.ch/auth-service/v1/mqtt/token. Error:401 Client Error: Unauthorized for url: https://spark-prod-ch.gnp.cloud.sunrisetv.ch/auth-service/v1/mqtt/token)

Braakie commented 7 months ago

Thanks for the update, it works again.

steuerzentrale commented 7 months ago

0.5.5 does not fix it for me in Switzerland.

Logs ar still full with this: 2024-01-21 21:02:29.024 ERROR (SyncWorker_3) [lghorizon.lghorizon_api] Giving up _do_api_call(...) after 3 tries (lghorizon.exceptions.LGHorizonApiConnectionError: Unable to call https://spark-prod-ch.gnp.cloud.sunrisetv.ch/auth-service/v1/mqtt/token. Error:401 Client Error: Unauthorized for url: https://spark-prod-ch.gnp.cloud.sunrisetv.ch/auth-service/v1/mqtt/token)

can confirm that 0.5.5 does not work in Switzerland, I got exactly the same error.

Core 2024.1.5 Supervisor 2023.12.1 Operating System 11.4 Frontend 20240104.0

DaveCamenisch commented 7 months ago

Same here in Switzerland - 0.5.5 is not working! Brand new installation on a rPi4. All updates done.

Core 2024.1.5 Supervisor 2023.12.1 Operating System 11.4 Frontend 20240104.0

Logger: lghorizon.lghorizon_api Source: /usr/local/lib/python3.11/site-packages/backoff/_common.py:120 First occurred: 20:24:42 (31 occurrences) Last logged: 21:39:10

Giving up connect(...) after 11 tries (lghorizon.exceptions.LGHorizonApiConnectionError: Unable to call https://spark-prod-ch.gnp.cloud.sunrisetv.ch/auth-service/v1/mqtt/token. Error:401 Client Error: Unauthorized for url: https://spark-prod-ch.gnp.cloud.sunrisetv.ch/auth-service/v1/mqtt/token)

Sholofly commented 7 months ago

I've published a new version. Please try if it works for you guys...

steuerzentrale commented 7 months ago

v 0.5.6 is not working either, got the following logs:

Logger: lghorizon.lghorizon_api Source: /usr/local/lib/python3.11/site-packages/backoff/_common.py:120 First occurred: 22:43:13 (2 occurrences) Last logged: 22:43:21

Giving up _do_api_call(...) after 3 tries (lghorizon.exceptions.LGHorizonApiConnectionError: Unable to call https://prod.spark.sunrisetv.ch/v1/mqtt/token. Error:404 Client Error: Not Found for url: https://prod.spark.sunrisetv.ch/v1/mqtt/token)

Sholofly commented 7 months ago

Oops thats my bad. Give me a few minutes

Sholofly commented 7 months ago

@steuerzentrale Would you mind updating and try again?

netrene commented 7 months ago

@Sholofly

0.5.7 does not fix the problem either in Switzerland.

File "/config/custom_components/lghorizon/init.py", line 50, in async_setup_entry await hass.async_add_executor_job(api.connect) asyncio.exceptions.CancelledError: Global task timeout 2024-01-22 23:22:34.650 WARNING (MainThread) [homeassistant.bootstrap] Setup timed out for stage 2 - moving forward 2024-01-22 23:22:35.001 WARNING (MainThread) [homeassistant.components.homekit.type_remotes] media_player.upc: Reached maximum number of sources (90) 2024-01-22 23:24:16.531 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry 0775274852 for lghorizon Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 406, in async_setup result = await component.async_setup_entry(hass, self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/lghorizon/init.py", line 50, in async_setup_entry await hass.async_add_executor_job(api.connect) asyncio.exceptions.CancelledError

DaveCamenisch commented 7 months ago

No, unfortunately it does not work with 0.5.7 either...

This error originated from a custom integration.

Logger: custom_components.lghorizon.config_flow Source: custom_components/lghorizon/config_flow.py:58 Integration: LG Horizon (documentation, issues) First occurred: 23:28:03 (2 occurrences) Last logged: 23:40:38

'hashedCustomerId'

2024-01-22 23:28:03.847 ERROR (SyncWorker_4) [lghorizon.lghorizon_api] Giving up connect(...) after 11 tries (KeyError: 'hashedCustomerId') 2024-01-22 23:28:03.853 ERROR (MainThread) [custom_components.lghorizon.config_flow] 'hashedCustomerId' 2024-01-22 23:40:38.451 ERROR (SyncWorker_1) [lghorizon.lghorizon_api] Giving up connect(...) after 11 tries (KeyError: 'hashedCustomerId') 2024-01-22 23:40:38.455 ERROR (MainThread) [custom_components.lghorizon.config_flow] 'hashedCustomerId'

JimmyKer commented 7 months ago

Hi,

Same problem for me in Belgium, using Telenet. running version version 0.5.5 from the plugin.

I've managed in the last days to keep a working 'LG Horizon' integration by:

Hope this helps other too :)

Kind regards, Jimmy

netrene commented 7 months ago

@Sholofly Is there anything I an do to help you debug the problem in Switzerland? Does a Wireshark log help you more than the internal HA logs. Let me know if I could do anything to support (also remote session possible).

Best Regards René

Sholofly commented 7 months ago

@netrene Please try the latest version. If you still have the problem, please open a new issue. It's very specific for your country.

netrene commented 7 months ago

@netrene Please try the latest version. If you still have the problem, please open a new issue. It's very specific for your country.

I tried 0.5.7 already and its not working. Or is there a newer version?

Sholofly commented 7 months ago

yes 0.5.8

netrene commented 7 months ago

yes 0.5.8

I uninstalled the integration and rebooted. Then I installed 0.5.8 and voila it´s working again in Switzerland.

Thx for your effort.

René

DaveCamenisch commented 7 months ago

THANK YOU @Sholofly !! 😀👍🏼