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

A device is permanently "not_home" - but the integration writes same records into DB #105

Closed
ildar170975 opened this issue Feb 26, 2024 · 4 comments

Comments

@ildar170975
Copy link

Here is a "states" table for some "device_tracker".
It is always not_home.
Check the "attributes_id" column - these are same attributes.

изображение

Believe these attributes are these:

изображение

Why the integration is writing smth into DB when it is not needed?

@ildar170975 ildar170975 changed the title A device is permanetly "not_home" - but the integration writes records into DB A device is permanently "not_home" - but the integration writes records into DB Feb 26, 2024
@ildar170975 ildar170975 changed the title A device is permanently "not_home" - but the integration writes records into DB A device is permanently "not_home" - but the integration writes same records into DB Feb 26, 2024
@mudape
Copy link
Owner

mudape commented Mar 22, 2024

Don't know about the records
Note that apple watch can't be tracked by wifi as its not directly connected to your network

In version 2.2.0 a coordinator is used, did that change anyting?

@ildar170975
Copy link
Author

@mudape
Thanks for the feedback!
I will start monitoring & report then.

@ildar170975
Copy link
Author

ildar170975 commented Mar 25, 2024

@mudape
Test with some iPhone which can be home / not_home:

изображение

These records have same attributes_id (i.e. same attributes).
The last column is a converted last_updated.
HA was restarted 3 times - yellow rows correspond to these moments.
Seems that the entity was marked as "updated" on HA startup - even with same content (state & attributes); probably this is how HA works.

Result: I do not see a behaviour described in the 1st post.
In the 1st post there were same records with different last_updated and HA was NOT restarted during a period with many repeated consecutive records.
Closing the issue.
But will keep monitoring anyway.

Data from DB were taken by DBBrowser for SQLite.

@ildar170975
Copy link
Author

ildar170975 commented Mar 25, 2024

@mudape

Note that apple watch can't be tracked by wifi as its not directly connected to your network

Strange, when I installed iPhoneDetect 1st time (2021?) - noticed that it reported home for apple watch.

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

2 participants