asednev / homebridge-plugin-govee

Govee H-series Thermometer Hygrometer plugin for Homebrige.
Apache License 2.0
53 stars 9 forks source link

Add in a threshold in the config to trigger output binary "Sensor detects something" #7

Closed joshspicer closed 3 years ago

joshspicer commented 3 years ago

I would love to be able to use my HomeKit hub's "Sensor detects something" feature to automatically trigger based on the temp/humidity getting too low.

Homekit doesn't let you observe readings of a device and make automation decisions that way, the output needs to be binary (temperature IS or ISN'T too low). The idea is to augment this plugins with optional fields in the config like:

{
   "minimum_temp_f" : 65,
  "minimum_humidity": 35
}

When the plugin checks the bluetooth device status, it can output a "true" or "false" based on the condition. Perhaps it can mimic a motion sensor and act that way to trigger the automation.

Have you thought about adding this/hit any roadblocks. I'm new to the homekit/homebridge api, so perhaps i'm missing something that makes this not feasible. Happy to implement it myself once I get some time.

joshspicer commented 3 years ago

(for anyone that stumbles upon this wanting the same ting) For the time being i've found that the Controller iOS app allows you to trigger automations based on sensor data.

asednev commented 3 years ago

@joshspicer thank you for submitting this request and following up with an app to control automations. I've also tried Eve for HomeKit app. It works with mixed success. Look forward to try the other app that you suggested.

If these apps don't help accomplishing the goal of creating automation based on sensor data, I am certainly open to expose motion sensor for binary conditions. This feels like a hack, though sometimes hacks are inevitable.

asednev commented 3 years ago

@joshspicer I wrote up how to use Controller app (thanks for your suggestion!) to set up automation based on specific value for temperature or humidity. Hope this helps.

https://github.com/asednev/homebridge-plugin-govee/wiki/Homekit-Automations-based-on-Temperature-and-Humidity

joshspicer commented 3 years ago

very cool - thank you!