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

Don't need to login and handshake every time? #12

Open
arrival-spring opened this issue Feb 18, 2021 · 4 comments
Open

Don't need to login and handshake every time? #12

arrival-spring opened this issue Feb 18, 2021 · 4 comments

Comments

@arrival-spring
Copy link

I don't know how long the cookies last, but certainly we don't need to do the handshake and login every time the bulb is turned on or off or the brightness is set.

I've commented out those lines for now in the turn_on function and it means I get much quicker response times (sub half second, rather than a second or two).

They are still called (and so the cookie is refreshed) in the setup_platform, init and update functions, but I'm not sure how often those happen.

@fishbigger
Copy link
Owner

Yes I know that it doesn't need to login every time but through ha I can't see any way to only do it every set amount of time and I don't think anyone knows how long the cookies last for.

@arrival-spring
Copy link
Author

Hmm, well I'll leave those bits commented out and see how long it is before it breaks.

@fishbigger
Copy link
Owner

That would be a good test :) On another thought update has to be called quite often to update the state of the bulb/plug when its changed outside of the app so leaving it in update should be fine.

@Nerd0o0
Copy link

Nerd0o0 commented Nov 28, 2021

It took 5 days after restarting HA and a handshake was required as the switch stopped responding. Had to reboot again to login

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants