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

Would it be possible to support trackers via API pooling? #57

Closed
igorsantos07 opened this issue Feb 10, 2024 · 5 comments
Closed

Would it be possible to support trackers via API pooling? #57

igorsantos07 opened this issue Feb 10, 2024 · 5 comments
Labels

Comments

@igorsantos07
Copy link

I used to run https://github.com/hasscc/petkit, but the stats support was very poor and today I realized the project got completely abandoned.

I was wondering if it would be possible to integrate collar tracker support to this project, using API pooling as that other project did - but of course, with the entries being proper statistical entities haha

Cheers!

@RobertD502
Copy link
Owner

I'm assuming you're referring to the PetKit Fit collar? I don't have any plans to support it in the near future as I haven't had much time lately and need to get the new YumShare feeders integrated first.

Out of curiosity...are you able to use the family share feature to share the collar with a second account? This is important since the primary account will need to be used with the integration - if you can't use the secondary account to connect to the collar via bluetooth (using the PetKit app), then the info pulled by the API will never be updated.

@igorsantos07
Copy link
Author

igorsantos07 commented Feb 11, 2024

Yep, correct, the collars!

Given the other integration was mostly useless, there's some time I don't use the collars again, but I can take them out of the wardrobe and put them to use, if you want a tester.

IIRC it was a frequently requested feature in the Petkit forums - no, there was no way to share the collars, and I doubt it changed in the last 12 months.
That said, as I mentioned earlier, the other integration was able to bring information onto HA without any extra configuration in regards to secondary accounts and all. The problems were:

  • it didn't create devices, only spreaded out some entities - so it was complex to edit them all
  • the update frequency was abismal and I'm not sure what triggered it. At some point I got to the API directly and noticed some info was missing, and the rest that's available is instant information, meaning it would need to pull from the API frequently to get accurate historical information.
  • it didn't create stat entries, so even when data was pulled, it was mostly useless

You can see in the aptly numbered issue 42 more details about missing features and a screenshot of actual data - I couldn't find a correlation between updated values and times/reasons for update.

I'm surprised they never deactivated those forums; it's a live testament to how terrible their products seem to be 😂

@RobertD502
Copy link
Owner

RobertD502 commented Feb 12, 2024

The old integration was able to do what it did because it used the old API - PETKIT has changed their system and that is why users of newer devices such as water fountains weren't able to get any info from the old integration since that API didn't support newer devices. The new API doesn't allow one account to be used on multiple devices (i.e., you can't use the same account with this integration and the PETKIT app).

If you were to use this integration, you will HAVE to use the primary account with the integration. This means that you will not be able to use the PETKIT app at the same time with the same account. As a result, once you use the account connected to the collar with this integration, the data from the API will reflect the data that was available the last time the account was used with their app and connected to the collar via Bluetooth. You will not be able to get updated data from the collar since it requires using their app to initiate a Bluetooth connection to the collar to then send updated info to their servers.

PETKIT has made some changes to their family share feature (devices that you previously couldn't share, such as water fountains, can now be shared). I'd download the app, create a secondary account, sign in with your primary account, add the secondary account to the "family", log into the app using the secondary account and see if the collar is accessible to the secondary account. If it isn't, then adding support for the collar doesn't make much sense on account the data being stale and never being updated once you start using the account with this integration.

Regarding the update frequency: the integration wouldn't have any control over that. All it does is poll the API at a set interval. If the collar can be shared with a secondary account, new data would only become available to the API when the collar connects to your phone (via Bluetooth using the PETKIT app) as your phone is what will send the new data from the collar to the PETKIT servers.

Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the stale label Mar 13, 2024
Copy link

This issue was closed because it has been stalled for 5 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants