speedport icon indicating copy to clipboard operation
speedport copied to clipboard

automatic logout from web interface - make "plugin read interval" changeable?

Open DFS-90 opened this issue 2 years ago • 7 comments

Hey,

I have another Issue I want to report: Whenever I try to access the speedport's web interface, I'm automatically logged out after a few seconds. I assume that this happens every time the HACS plugin logs itself in in order to read the router's parameters.

Maybe it might help to add an option to set the "plugin read interval" (e. g. to every five or ten minutes) manually and / or to pause reading in order to be able to manually change router settings?

Thanks and best regards, David

DFS-90 avatar Oct 16 '23 16:10 DFS-90

Just thought about this problem again. In the past, I used the script provided by aaronk6 (see here and here) that reads the router's encrypted JSON file, decrypts it and provides a decrypted version of the JSON file.

Maybe it's possible to combine this way of reading the router's values with your plugin?

DFS-90 avatar Oct 17 '23 07:10 DFS-90

Hey, that is a good idea. I introduced a configurable option, with which you can set for how many minutes the integration will not try to log in after an external login is registered. Try it out in v0.3.2 :slightly_smiling_face:

My integration uses the same decryption logic like aaronk6 (without knowing it :sweat_smile:) and reads in the same json data. The status.json is not the problem, but some data like the ip addresses are not included and require other json files for which a login is needed. btw the sensors that can be read from the status.json are not affected from the new pause

Andre0512 avatar Oct 17 '23 22:10 Andre0512

Another idea is create a binary sensor / toggle sensor to temporarily switch off the entire login from HA to the speedport. If you want to go to the Speeport.ip UI and do things directly on the router, you could simply set the toggle so that logins from HA no longer happen.

MelleD avatar Oct 18 '23 08:10 MelleD

Hey @MelleD, thanks for your feedback. But I think with the new configuration feature this is not really a problem anymore. If you really want to work for several hours in your router web interface and the logout every x minutes bothers you, you can disable the integration temporarily 😄

Andre0512 avatar Oct 18 '23 12:10 Andre0512

Hey @MelleD, thanks for your feedback. But I think with the new configuration feature this is not really a problem anymore. If you really want to work for several hours in your router web interface and the logout every x minutes bothers you, you can disable the integration temporarily 😄

I will test it and give feedback. I do a lot of things with a Overview Dashboard with the button template card and there would be toggle very easy and transparent :), but I will try the next version ;)

MelleD avatar Oct 18 '23 12:10 MelleD

e.g. Bildschirmfoto 2023-10-18 um 14 54 12

Ignore the icon, is currently missing, but here I could just add new button/toggle or just if I click on the main card.

MelleD avatar Oct 18 '23 12:10 MelleD

Thanks for your hard work! 🙂 Installed v0.3.2, no problems so far. Can't test thoroughly though as I'm on travel atm.

Toggling a switch is a nice idea, deactivating the integration is also okay.

Maybe mentioning this in README is a good idea ;)

DFS-90 avatar Oct 18 '23 13:10 DFS-90