Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Telenet refresh token expires / changes? #162

Closed
darkpainy opened this issue Nov 19, 2024 · 7 comments
Closed

Telenet refresh token expires / changes? #162

darkpainy opened this issue Nov 19, 2024 · 7 comments
Assignees
Labels
bug Something isn't working

Comments

@darkpainy
Copy link

Hi,

I set up the integration with the refresh token, after a reboot of HA i noticed that my integration stopped working.
I tried to set it up again using the refresh token I had saved from the first time, but with no success.
I then checked again with firefox and I now have a different refresh token, which works again.
But does this mean the token changes from time to time? Or is it only valid for one login?

Kind regards,
Jeroen

@darkpainy darkpainy added the bug Something isn't working label Nov 19, 2024
@ColinRobbins
Copy link
Contributor

The refresh token is regularly updated in the background.
The new token should be automatically stored in HA and used after a restart.
I’ve been running for over a month now, with no-need to re-supply the token.

Perhaps…. Once you have the token captured from Firefox, close the browser window (without logging out). It’s possible the session in Firefox is doing some kind of auto logout, which will affect the HA session (we are in effect performing a session hijack).

@darkpainy
Copy link
Author

I'll try that :)

@darkpainy
Copy link
Author

It seems after 1 day (or less?) my token expires and is not refreshed.
I closed the Firefox window without logging out as sugested, the next day my integration shows the same error.

@ColinRobbins
Copy link
Contributor

Thats odd. I'd maybe Telenet is behaving differently to VIrgin in the UK.
Can you turn the debug logs on.
Then look for messages along the lines of New JWT stored.
You should see one such message when you restart HA.
If you leave HA running, you should also see such messages when you box has been switch off for a few hours, and is switched back on.
This may give a clue as to what is happening.

@ColinRobbins
Copy link
Contributor

To turn the debug logs on you need the following added to your config:

logger:
  logs:
    lghorizon: debug
    custom_components.lghorizon: debug

@darkpainy
Copy link
Author

darkpainy commented Nov 20, 2024

I've enabled debug logging, restarted HA.
integration still working
Currently only seeing
2024-11-20 23:43:57.900 DEBUG (Thread-13 (_thread_main)) [lghorizon.models] Sending PINGREQ
2024-11-20 23:43:57.936 DEBUG (Thread-13 (_thread_main)) [lghorizon.models] Received PINGRESP

will let you know tomorrow if anything changes

@darkpainy
Copy link
Author

tried again, has not expired in the past 3 days... so hopeing it will keep on working :)

@Sholofly Sholofly closed this as completed Dec 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants