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
62 stars 15 forks source link

Can’t connect #7

Closed Kimvdp1988 closed 1 year ago

Kimvdp1988 commented 2 years ago

Unfortunately, the setup wizard is not able to login my Telenet account. error: can’t connect User name and password are correct Maybe api or Telenet service is down on this moment 40902B4F-63C7-4FCB-820C-55C83FB9AD5D

Kimvdp1988 commented 2 years ago

E61733B5-7301-42C9-8AF0-4D6E6828ACCC

Sholofly commented 2 years ago

I've heard that before. Is it true that when you try to login using the telenet.tv app, you are asked for some extra stuff? Like choosing an account or so e confirmation shizzle?

Kimvdp1988 commented 2 years ago

8E42A2A8-EA68-46FC-8628-2F71EBCA8CA4 Yes, indeed, the Telenet TV app ask me to choose one out of three options ( all on the same adress and all with basic subscriptions)

Sholofly commented 2 years ago

That's a pity, I can't cope with that situation yet. Problem is that, even when I have Telenet credentials, I need a Belgium hosted VPN server to connect to the internet, otherwise i'm presented with a recaptcha image :(

Kimvdp1988 commented 2 years ago

If you like, i can setup a vpn server from my place, and provide you with account, then you are on Telenet network.

Sholofly commented 2 years ago

That would be awesome. Please contact me on Discord if you like: Sholofly#4951

smolders33 commented 1 year ago

Hi did you find a way to get it back working?

ChrisThomas42 commented 1 year ago

I've just updated to latest version and getting the same unable to connect error on VirginMedia (GB). Here's what I see in the log,

`Logger: lghorizon.lghorizon_api Source: /usr/local/lib/python3.10/site-packages/backoff/_common.py:120 First occurred: 15:27:53 (4 occurrences) Last logged: 15:29:46

Giving up _do_api_call(...) after 3 tries (lghorizon.exceptions.LGHorizonApiConnectionError: Unable to call https://web-api-prod-obo.horizon.tv/oesp/v4/GB/eng/web/auth-service/v1/mqtt/token. Error:404 Client Error: Not Found for url: https://web-api-prod-obo.horizon.tv/oesp/v4/GB/eng/web/auth-service/v1/mqtt/token)`

Chris

ChrisThomas42 commented 1 year ago

Do I need to remove the other integration, Arris DCX960?

Sholofly commented 1 year ago

Yes, but that's not the reason.. looks like a wrong url. Can you send me the complete log? Please obfuscate login details and so on

Op do 17 nov. 2022 16:42 schreef ChrisThomas42 @.***>:

Do I need to remove the other integration, Arris DCX960?

— Reply to this email directly, view it on GitHub https://github.com/Sholofly/lghorizon/issues/7#issuecomment-1318825512, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAG4EAFXDK3NBEUL2J3JJXLWIZG5BANCNFSM6AAAAAARRKLPIA . You are receiving this because you commented.Message ID: @.***>

ChrisThomas42 commented 1 year ago

@Sholofly Could you be more specific which logs? I can't see anything else listed related, I'm probably not looking in the right place!

ChrisThomas42 commented 1 year ago

unless this is what you mean. I'm growing my Homeassistant knowledge daily!

2022-11-17 15:28:54.095 ERROR (SyncWorker_6) [lghorizon.lghorizon_api] Giving up _do_api_call(...) after 3 tries (lghorizon.exceptions.LGHorizonApiConnectionError: Unable to call https://web-api-prod-obo.horizon.tv/oesp/v4/GB/eng/web/auth-service/v1/mqtt/token. Error:404 Client Error: Not Found for url: https://web-api-prod-obo.horizon.tv/oesp/v4/GB/eng/web/auth-service/v1/mqtt/token) 2022-11-17 15:29:46.038 ERROR (SyncWorker_4) [lghorizon.lghorizon_api] Giving up _do_api_call(...) after 3 tries (lghorizon.exceptions.LGHorizonApiConnectionError: Unable to call https://web-api-prod-obo.horizon.tv/oesp/v4/GB/eng/web/auth-service/v1/mqtt/token. Error:404 Client Error: Not Found for url: https://web-api-prod-obo.horizon.tv/oesp/v4/GB/eng/web/auth-service/v1/mqtt/token)

JasperVanZeir commented 1 year ago

@Sholofly are there any updates?

Sholofly commented 1 year ago

Hi @JasperVanZeir Unfortunately i hadn't the time to check. I'll get back to this soon.

Hjem013 commented 1 year ago

Hi, I'm getting the attached 'logo' error when trying to setup the connection for Virgin Media (IE). Any idea what's causing this?

image

Sholofly commented 1 year ago

That's a strange one. Is there someon willing to share account details (temporary) so i can test my code locally? Please contact me on discord if you like: Sholofly#4951

Sholofly commented 1 year ago

Please @JasperVanZeir, @Hjem013 Try installing again

Hjem013 commented 1 year ago

Please @JasperVanZeir, @Hjem013 Try installing again

Thanks! That's working now, integration successfully added!

Sholofly commented 1 year ago

Ok can you tell me the brand and model of your settop box?

Hjem013 commented 1 year ago

Ok can you tell me the brand and model of your settop box?

The setup box is a HUMAX 1008R-HDD-VM/IE

ChrisThomas42 commented 1 year ago

@Sholofly I've upgraded to the ltest version and I've removed the Arris integration but I'm still getting the cannot connect error when I try and submit, the only log entry I can find;

`Logger: lghorizon.lghorizon_api Source: /usr/local/lib/python3.10/site-packages/backoff/_common.py:120 First occurred: 11:16:48 (2 occurrences) Last logged: 12:19:21

Giving up _authorize(...) after 3 tries (lghorizon.exceptions.LGHorizonApiConnectionError: Internal server error) `

I get this error if my box is on or off. I don't see a Virgin UK in the dialog but I've tried all the other options with the same result.

Chris

the-jeffski commented 1 year ago

I get the same as @ChrisThomas42 Virgin UK so selected the IE option assuming that is the one to use? Log just shows [lghorizon.lghorizon_api] Giving up _authorize(...) after 3 tries (lghorizon.exceptions.LGHorizonApiConnectionError: Internal server error)

ChrisThomas42 commented 1 year ago

@Sholofly Is there anything I can do to help diagnose the issue?

Sholofly commented 1 year ago

Please can you provide me a full debug log? Please add:

logger:
  default: warning
  logs:
    custom_components.lghorizon: debug
    lghorizon: debug

to your config

ChrisThomas42 commented 1 year ago

@Sholofly Is this what you're after?

2022-12-04 22:15:23.675 DEBUG (SyncWorker_6) [lghorizon.lghorizon_api] Connect to API 2022-12-04 22:15:23.676 DEBUG (SyncWorker_6) [lghorizon.lghorizon_api] Authorizing 2022-12-04 22:15:24.196 INFO (SyncWorker_6) [lghorizon.lghorizon_api] Backing off _authorize(...) for 0.2s (lghorizon.exceptions.LGHorizonApiConnectionError: Internal server error) 2022-12-04 22:15:24.402 DEBUG (SyncWorker_6) [lghorizon.lghorizon_api] Authorizing 2022-12-04 22:15:24.695 INFO (SyncWorker_6) [lghorizon.lghorizon_api] Backing off _authorize(...) for 0.4s (lghorizon.exceptions.LGHorizonApiConnectionError: Internal server error) 2022-12-04 22:15:25.120 DEBUG (SyncWorker_6) [lghorizon.lghorizon_api] Authorizing 2022-12-04 22:15:25.403 ERROR (SyncWorker_6) [lghorizon.lghorizon_api] Giving up _authorize(...) after 3 tries (lghorizon.exceptions.LGHorizonApiConnectionError: Internal server error)

Chris

ChrisThomas42 commented 1 year ago

After update to latest version I get this in the log

2022-12-06 10:43:16.700 DEBUG (SyncWorker_6) [lghorizon.lghorizon_api] Connect to API 2022-12-06 10:43:16.701 DEBUG (SyncWorker_6) [lghorizon.lghorizon_api] Step 1 - Get Authorization data 2022-12-06 10:43:16.886 DEBUG (SyncWorker_6) [lghorizon.lghorizon_api] Obtain mqtt token... 2022-12-06 10:43:16.887 INFO (SyncWorker_6) [lghorizon.lghorizon_api] Executing API call to https://prod.spark.virginmedia.com/auth-service/v1/mqtt/token 2022-12-06 10:43:17.027 DEBUG (SyncWorker_6) [lghorizon.lghorizon_api] Step 1 - Get Authorization data 2022-12-06 10:43:17.177 INFO (SyncWorker_6) [lghorizon.lghorizon_api] Backing off _do_api_call(...) for 1.0s (lghorizon.exceptions.LGHorizonApiConnectionError: Unable to call https://prod.spark.virginmedia.com/auth-service/v1/mqtt/token. Error:401 Client Error: Unauthorized for url: https://prod.spark.virginmedia.com/auth-service/v1/mqtt/token) 2022-12-06 10:43:18.150 INFO (SyncWorker_6) [lghorizon.lghorizon_api] Executing API call to https://prod.spark.virginmedia.com/auth-service/v1/mqtt/token 2022-12-06 10:43:18.202 DEBUG (SyncWorker_6) [lghorizon.lghorizon_api] Step 1 - Get Authorization data 2022-12-06 10:43:18.334 INFO (SyncWorker_6) [lghorizon.lghorizon_api] Backing off _do_api_call(...) for 1.8s (lghorizon.exceptions.LGHorizonApiConnectionError: Unable to call https://prod.spark.virginmedia.com/auth-service/v1/mqtt/token. Error:401 Client Error: Unauthorized for url: https://prod.spark.virginmedia.com/auth-service/v1/mqtt/token) 2022-12-06 10:43:20.178 INFO (SyncWorker_6) [lghorizon.lghorizon_api] Executing API call to https://prod.spark.virginmedia.com/auth-service/v1/mqtt/token 2022-12-06 10:43:20.234 DEBUG (SyncWorker_6) [lghorizon.lghorizon_api] Step 1 - Get Authorization data 2022-12-06 10:43:20.371 ERROR (SyncWorker_6) [lghorizon.lghorizon_api] Giving up _do_api_call(...) after 3 tries (lghorizon.exceptions.LGHorizonApiConnectionError: Unable to call https://prod.spark.virginmedia.com/auth-service/v1/mqtt/token. Error:401 Client Error: Unauthorized for url: https://prod.spark.virginmedia.com/auth-service/v1/mqtt/token)

and the same can't connect error. Is this helping?

Chris

Sholofly commented 1 year ago

A little, Are there more log lines before this part? This part is about setting up a real time connection between the component and the box. But I really would like to know if the default API calls works.

ChrisThomas42 commented 1 year ago

@Sholofly I've just tried to add again, and this is everything from Settings, System, Logs, Home Assistant Core, Load full Logs, 2022-12-06 15:08:28.310 DEBUG (SyncWorker_4) [lghorizon.lghorizon_api] Connect to API 2022-12-06 15:08:28.311 DEBUG (SyncWorker_4) [lghorizon.lghorizon_api] Step 1 - Get Authorization data 2022-12-06 15:08:28.537 DEBUG (SyncWorker_4) [lghorizon.lghorizon_api] Obtain mqtt token... 2022-12-06 15:08:28.538 INFO (SyncWorker_4) [lghorizon.lghorizon_api] Executing API call to https://prod.spark.virginmedia.com/auth-service/v1/mqtt/token 2022-12-06 15:08:28.693 DEBUG (SyncWorker_4) [lghorizon.lghorizon_api] Step 1 - Get Authorization data 2022-12-06 15:08:28.841 INFO (SyncWorker_4) [lghorizon.lghorizon_api] Backing off _do_api_call(...) for 0.8s (lghorizon.exceptions.LGHorizonApiConnectionError: Unable to call https://prod.spark.virginmedia.com/auth-service/v1/mqtt/token. Error:401 Client Error: Unauthorized for url: https://prod.spark.virginmedia.com/auth-service/v1/mqtt/token) 2022-12-06 15:08:29.683 INFO (SyncWorker_4) [lghorizon.lghorizon_api] Executing API call to https://prod.spark.virginmedia.com/auth-service/v1/mqtt/token 2022-12-06 15:08:29.832 DEBUG (SyncWorker_4) [lghorizon.lghorizon_api] Step 1 - Get Authorization data 2022-12-06 15:08:29.967 INFO (SyncWorker_4) [lghorizon.lghorizon_api] Backing off _do_api_call(...) for 0.8s (lghorizon.exceptions.LGHorizonApiConnectionError: Unable to call https://prod.spark.virginmedia.com/auth-service/v1/mqtt/token. Error:401 Client Error: Unauthorized for url: https://prod.spark.virginmedia.com/auth-service/v1/mqtt/token) 2022-12-06 15:08:30.785 INFO (SyncWorker_4) [lghorizon.lghorizon_api] Executing API call to https://prod.spark.virginmedia.com/auth-service/v1/mqtt/token 2022-12-06 15:08:30.834 DEBUG (SyncWorker_4) [lghorizon.lghorizon_api] Step 1 - Get Authorization data 2022-12-06 15:08:30.964 ERROR (SyncWorker_4) [lghorizon.lghorizon_api] Giving up _do_api_call(...) after 3 tries (lghorizon.exceptions.LGHorizonApiConnectionError: Unable to call https://prod.spark.virginmedia.com/auth-service/v1/mqtt/token. Error:401 Client Error: Unauthorized for url: https://prod.spark.virginmedia.com/auth-service/v1/mqtt/token)

There's nothing else LGHorizon related I can see either before or after in the log.

Chris

ChrisThomas42 commented 1 year ago

If I try and browse to ...prodspark... I get `

HTTP ERROR 401 Unauthorized

URI: | /public/v1/mqtt/token -- | -- 401 Unauthorized jersey

`

If I try and connect to this service, how do I pass my credentials?

ChrisThomas42 commented 1 year ago

Also to add, that if I try and connect with anything other than Virgin Media I get an Invalid Credentials error, not the Can't connect error.

Sholofly commented 1 year ago

Ok, thank you! Your efforts and patience are appreciated. It's for me a process of trial and error so I have to investigate a bit more. I'll get back to you!

ChrisThomas42 commented 1 year ago

Ok, let me know if I can help.

caraar12345 commented 1 year ago

:wave: As an extra data point, I'm also seeing the same.

Will do a bit more investigation but logs included just in case they help 👀

2022-12-07 00:39:36.408 DEBUG (SyncWorker_13) [lghorizon.lghorizon_api] Connect to API
2022-12-07 00:39:36.430 DEBUG (SyncWorker_13) [lghorizon.lghorizon_api] Step 1 - Get Authorization data
2022-12-07 00:39:36.722 DEBUG (SyncWorker_13) [lghorizon.lghorizon_api] Obtain mqtt token...
2022-12-07 00:39:36.723 INFO (SyncWorker_13) [lghorizon.lghorizon_api] Executing API call to https://prod.spark.virginmedia.com/auth-service/v1/mqtt/token
2022-12-07 00:39:36.947 DEBUG (SyncWorker_13) [lghorizon.lghorizon_api] Step 1 - Get Authorization data
2022-12-07 00:39:37.182 INFO (SyncWorker_13) [lghorizon.lghorizon_api] Backing off _do_api_call(...) for 0.2s (lghorizon.exceptions.LGHorizonApiConnectionError: Unable to call https://prod.spark.virginmedia.com/auth-service/v1/mqtt/token. Error:401 Client Error: Unauthorized for url: https://prod.spark.virginmedia.com/auth-service/v1/mqtt/token)
2022-12-07 00:39:37.398 INFO (SyncWorker_13) [lghorizon.lghorizon_api] Executing API call to https://prod.spark.virginmedia.com/auth-service/v1/mqtt/token
2022-12-07 00:39:37.463 DEBUG (SyncWorker_13) [lghorizon.lghorizon_api] Step 1 - Get Authorization data
2022-12-07 00:39:37.711 INFO (SyncWorker_13) [lghorizon.lghorizon_api] Backing off _do_api_call(...) for 0.9s (lghorizon.exceptions.LGHorizonApiConnectionError: Unable to call https://prod.spark.virginmedia.com/auth-service/v1/mqtt/token. Error:401 Client Error: Unauthorized for url: https://prod.spark.virginmedia.com/auth-service/v1/mqtt/token)
2022-12-07 00:39:38.647 INFO (SyncWorker_13) [lghorizon.lghorizon_api] Executing API call to https://prod.spark.virginmedia.com/auth-service/v1/mqtt/token
2022-12-07 00:39:38.715 DEBUG (SyncWorker_13) [lghorizon.lghorizon_api] Step 1 - Get Authorization data
2022-12-07 00:39:38.941 ERROR (SyncWorker_13) [lghorizon.lghorizon_api] Giving up _do_api_call(...) after 3 tries (lghorizon.exceptions.LGHorizonApiConnectionError: Unable to call https://prod.spark.virginmedia.com/auth-service/v1/mqtt/token. Error:401 Client Error: Unauthorized for url: https://prod.spark.virginmedia.com/auth-service/v1/mqtt/token)
wimvermoens commented 1 year ago

I have the same issue. When i logon to telenet.tv I have to choose which address in my account before I can watch TV. Is there anything possible to skip this?

ChrisThomas42 commented 1 year ago

@Sholofly I'm not sure if this info is helpful, but when I login on the Android or Windows app I don't get asked anymore info after login and I can control the settop box from either of those apps.

Chris

Sholofly commented 1 year ago

Without credentials I am unable to solve this issue, I am sorry. The login procedure is so much different in this case.

ChrisThomas42 commented 1 year ago

@Sholofly That is a shame, thank you for your hard work and for trying. Can I revert to the ArrisDCX960 integration?

Sholofly commented 1 year ago

Unfortunately not. It's not working anymore...

ChrisThomas42 commented 1 year ago

@Sholofly Just had a thought, could the issue be related to the Device Management and the Authorised devices?

Sholofly commented 1 year ago

I don't think so, but don't have this situation in my own account so can't tell for sure. It looks like some people have multiple accounts at Telenet (didn't see it at other providers yet). It looks like you have to set a default account once in your cookie and fromt hat moment on it's using that account.

smolders33 commented 1 year ago

I have multiple installations address on one account. I have to pick the subscription that I want to use.

Sholofly commented 1 year ago

@smolders33 Can you provide me with the URL sequences that are used for that one? using Chrome's dev tools? Or better, provide me with credentials so I can test it myself

smolders33 commented 1 year ago

If you want we can set up a call to check it out. I have some time today if it works for you?

Op di 20 dec. 2022 om 10:41 schreef Rudolf Offereins < @.***>:

@smolders33 https://github.com/smolders33 Can you provide me with the URL sequences that are used for that one? using Chrome's dev tools? Or better, provide me with credentials so I can test it myself

— Reply to this email directly, view it on GitHub https://github.com/Sholofly/lghorizon/issues/7#issuecomment-1359083220, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMDOFJREQ5DYUQBP757NV73WOF5L5ANCNFSM6AAAAAARRKLPIA . You are receiving this because you were mentioned.Message ID: @.***>

--

ChrisThomas42 commented 1 year ago

@Sholofly I'm happy to help and around (most of) today as well.

smolders33 commented 1 year ago

@smolders33 Can you provide me with the URL sequences that are used for that one? using Chrome's dev tools? Or better, provide me with credentials so I can test it myself

Can we setup a call for this. The login is going to multiple url's. I can then also share my credentials if needed

Sholofly commented 1 year ago

Thank you for your wilingness to coorporate. Its very much appreciated. Unfortunately i=I am at work ATM and not able to join now. Can we set a meeting for an evening?

davepearson1628 commented 1 year ago

HI, I'm still having problems logging in to Virgin Media UK - I always get the "Can't Connect" error.

Luckily I haven't yet removed the old Arris DCX960 integration, which is still working for me.

It would be good to be able to migrate the this newer version, though.

dnwlmz commented 1 year ago

I'm having the same issue as well with Virgin UK; I've also removed the Arris integration :(

mattlongman commented 1 year ago

Same issue with Virgin GB. I see there are a few offers of help above, but happy to configure a VPN for testing too if needed.

Sholofly commented 1 year ago

Hi UK users, thanks for offering help. I will get back to you soon.