I’ve created a new integration for HA. For those who like to track their dogs or have a GPS collar, I’ve released an integration for TryFi. If you aren’t familiar with their products its a simple GPS collar.
Right now you will have to clone my repository and copy the integration into your custom_components folder for the time being. Complete installation instructions can be found here. Once my changes are approved by the HACS community it will be in the store which will make the installation process much easier .
The integration consists of the following features right now.
Device Tracker - your pet will show up in HA using the GPS coordinates from the collar
Step Counter - it will report your pets daily, weekly, and monthly steps
Distance Counter - it will report your pets daily, weekly and monthly distance
Battery Level - it will report your Pet’s collar battery level
Collar Light - you can control the light on the collar by turning it on and off (color selection coming soon!)
Lost Dog Mode - allows you to “unlock” your dog if it is lost and “lock” it when it is found
Bases - reports the status of the base (online/offline)
Of course once you have these entities setup you will be able to create automations such as when the dog leaves the house at night turn on the light, etc.
Feedback is welcomed an encouraged! This integration is in its early stages. Please report any issues/bugs here.
Thank you very much for your work on this. I’m excited to get my dogs Fi collar into HA. When installing the integration I only get an error “Cannot Connect” after submitting my TryFi username and password. I know the username and password as I’ve verified they are what the App is using on my phone.
@bigL - I’m glad you are excited. I have noticed stability issues with TryFi’s API service and I had the same issue myself. You can try to go to https://api.tryfi.com/auth/login and login with your username and password. If it works it should work in HA. If you cannot login to that website then I would give it a try later. If for some reason the website works but the integration doesn’t please let me know.
Here are the only log entries that show up every time I attempt to add TryFi integration.
020-11-23 23:12:38 WARNING (MainThread) [homeassistant.util.async_] Detected I/O inside the event loop. This is causing stability issues. Please report issue to the custom component author for tryfi doing I/O at custom_components/tryfi/config_flow.py, line 39: tryfi = PyTryFi(username=data[CONF_USERNAME],password=data[CONF_PASSWORD])
2020-11-23 23:12:39 WARNING (MainThread) [pytryfi.fiPet] Cannot find photo of your pet. Defaulting to empty string.
Version 0.0.2
HA 0.118.2
Same issue happened with HA 0.0.117 also.
My dog does have a photo that shows in the Fi App if that helps any.
This looks really great. I’m curious if you, or others that find this thread, have found other low power LTE/GPS dog trackers and pedometers that don’t require a subscription service?
I would love to add this device to my Google FI LTE network as a data only device and have it phone home to home assistant directly… i’m guessing that’s not an option for Fi Smart Dog Collar… thus i’m wondering if there’s anything else on the market out there
I’m not sure ro be honest. At one point I was even thinking of something like a cellular smart watch but battery life and other things came into question. TryFi says it works on LTE-M. If you come across anything I would be interested myself.
Same logging in debug as I’ve posted above other than one addition line showing the username returned from the api. I’ve replaced with *
No other log entries from tryfi after the photo entry
2020-11-30 09:38:58 DEBUG (MainThread) [pytryfi] Logging into TryFi
2020-11-30 09:38:59 WARNING (MainThread) [homeassistant.util.async_] Detected I/O inside the event loop. This is causing stability issues. Please report issue to the custom component author for tryfi doing I/O at custom_components/tryfi/config_flow.py, line 39: tryfi = PyTryFi(username=data[CONF_USERNAME],password=data[CONF_PASSWORD])
2020-11-30 09:38:59 DEBUG (MainThread) [pytryfi] Successfully logged in. UserId: *******************
2020-11-30 09:38:59 WARNING (MainThread) [homeassistant.util.async_] Detected I/O inside the event loop. This is causing stability issues. Please report issue to the custom component author for tryfi doing I/O at custom_components/tryfi/config_flow.py, line 39: tryfi = PyTryFi(username=data[CONF_USERNAME],password=data[CONF_PASSWORD])
2020-11-30 09:38:59 WARNING (MainThread) [homeassistant.util.async_] Detected I/O inside the event loop. This is causing stability issues. Please report issue to the custom component author for tryfi doing I/O at custom_components/tryfi/config_flow.py, line 39: tryfi = PyTryFi(username=data[CONF_USERNAME],password=data[CONF_PASSWORD])
2020-11-30 09:38:59 WARNING (MainThread) [pytryfi.fiPet] Cannot find photo of your pet. Defaulting to empty string.
I found the problem. The “Cannot Connect” is not the best description of the problem. I installed PyTryFi and a separate linux install and did some more debugging. The API connection to TryFi works fine. The process would die when attempting setPetDetailsJSON. The issue was I have two collars in my TryFi account. One is active (tryFi v2) , one is not active (TryFi v1). The inactive collar was causing PyTryFi to die and I assume because there is no tryfi device attached to the 2nd collar in the app.
The next issue is that you cannot delete an inactive collar from your account in the app. Luckily, I still had the old device and was able to reactivate the device and attach it to the inactive collar. At that point I could delete the collar in the app. No only my dogs main collar is in the app and the HA TryFi integration is working. I did notice the weekly steps count is higher than the monthly weekly steps counts.
Thanks for troubleshooting. I will take a look at how I determine in-service vs out of service collars. I saw the see what you mean about the weekly steps being higher then the monthly. I had the same issue and this is because the weekly includes last month, November, and the monthly is only calculating steps in December. I believe it is accurate.
THANK YOU! I happen to already have Fi collars for my dogs so when I finally saw this today I was beyond excited! Being able to integrate their home/away status into my automations is the final piece of the puzzle for me. Glad I ordered the upgraded series 2 units on black Friday now.
Have you talked to Fi at all about this project? Have they given you indication if they intend to officially support API access?
I’m not a programer but if there is any other ways I can contribute to help keep this going let me know.
Thanks for creating this.
Did anyone succeed in adding the HACS integration ? I can install the HACS repository/integration. However, as the next step, I cannot find the “TryFi” in Configuration -> Integrations on hass. What am I missing ?
You will need to use the HACS integration directly to install any HACS integration. These are separate from the HA integrations that you see under Configuration -> Integration… Try your HA URL /hacs
The Official Readme says we need to add it as a regular integration after installing HACS integration. If I am reading it wrong, can you explain what these steps mean ? On HACS, I see options just to Reinstall/Remove/ReportIssue. There’s no such configuration.
OK, so you do have the HACS integration installed. Did you restart HA after installing? Then under the regular HA configuration -> integration all I had to do was click the + add integration in the bottom right corner and search for TryFi