-
Notifications
You must be signed in to change notification settings - Fork 17
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
[Feature Request] Time for reconnection #50
Comments
I sort of implemented this request by creating a timer thread when a disconnection occurs. After 5 seconds, the function id does a full scan and checks if the disconnected device is online. If it's not, then adds sets the device as away. I need more proper testing to know its reliability, but it works. I also think a single timer should exist per device so if multiple reconnections occur in the time window, the old timer should be cancelled prior to creating a new one. Also I need to add the timeout argument to the settings. What do you think? New method in PresenceDetector class:
Also modified UbusWatcher object creation argument:
|
Hi @Otamay , thanks for reporting this issue and providing a possible fix. Regarding this issue |
Hi,
I have some devices that loses connection due to power management or bad signal quality, and then reconnect almost immediately. Another reason is disconnecting from current AP and then connecting to alternative AP on the same router. So in HA I have multiple offline/online events breaking the device online time continuity.
Could some logic be implemented so that the device tracker publish a device as not seen, only if has been offline for at least X seconds?
I tried some basic stuff but as the program is event-driven, I think another thread must exist that handles the devices current status. I don't know yet if there is a simpler way.
Best regards, your program is so useful.
The text was updated successfully, but these errors were encountered: