sbabcock23 / hass-tryfi

Home Assistant integration for TryFi Dog Collar GPS monitoring.
https://github.com/sbabcock23/hass-tryfi
Apache License 2.0
48 stars 16 forks source link

Homebridge integration (This isn't really an issue) #57

Open jcr- opened 1 year ago

jcr- commented 1 year ago

My question is, how hard would it be to create a Homebridge plugin that could access the TryFi unofficial API in a similar way to this Home Assistant version?

https://github.com/homebridge/homebridge

https://github.com/homebridge/homebridge-plugin-template

My use case for this is really limited to location / status: I'd like to be able to create HomeKit automations based on whether the dog is home or not. So for my purposes I could ignore things like dog step counts, collar lights, etc.

For example, in HomeKit it is trivial to have something happen (for example, turn the heat or AC way down to save energy) "when the last person leaves the house." I don't want that to happen if the dog is still home, but "person" really means "phone" to HomeKit, and the dog doesn't have a phone.

This plugin could be implemented as a Homebridge virtual switch, for example a "DogIsHome" HomeKit switch that is powered on when the dog is home and off when the dog is not home. This could also be used for escape alerts etc. i.e. When the DogIsHome switch changes to "off" and I am still home, send a HomeKit notification to my device and turn all the lights red.

I feel like all the hard API work has already been done via this project, and this likely would require "just" integrating it into the HomeBridge plugin architecture.

Although I can mess with JS/JSON enough to be dangerous, this is definitely beyond my capabilities. I'd be willing to pay for this functionality.

Any thoughts or suggestions appreciated!