-
-
Notifications
You must be signed in to change notification settings - Fork 93
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
DoorBell trigger the "IDENTIFY" of a lamp (go bright -> dark -> back to last brightness) possible? #219
Comments
When you select Identify in the Hue app, it sends a PUT of Apple's Home app doesn't display the Assuming the motion sensor is connected to HomeKit directly (not through the Hue bridge), you need to create a CLIPGenericFlag sensor on the Hue bridge (exposed as a switch to HomeKit by homebridge-hue) to bridge both worlds. You then create a HomeKit automation to set the flag when the motion sensor is triggered, and a Hue bridge rule to send the alert when the flag is set. |
Yes, the "Motion Sensor" is connected via homebridge-hc-sr501 plugin and is just a simulated one. It uses an relay and an input of an RPI3 to get triggered. Works perfectly fine. BUT after that i use an IFTTT script to "blink" a few lights in the apartment. The problem now is... it blinks 15 times. 1 to 5 time would be perfect. So if i understand u correctly, i have to create this... lets call it "action" in the homebridge-hue plugin to make the blink. The CLIPGenericFlag? |
A CLIP sensor is like a variable on the Hue bridge, that can be set (and read) from the outside, and used in bridge rules. homebridge-hue exposes these to HomeKit, so they’re perfect to link HomeKit automations to Hue bridge rules. For example, I use my Hue motion sensor to set a flag that some-one is in the room, then, based on that flag, I switch on the lights (when it’s dark) using Hue bridge rules, and I switch on my Sonos speakers (through homebridge-zp) using HomeKit automation.
You create the CLIP sensor and the bridge rule throught the Hue API, see https://developers.meethue.com/documentation/getting-started. All homebridge-hue does is expose the CLIPGenericFlag sensor on the Hue bridge to HomeKit. |
Ok, i think i got it now... or the first part of it. I have to create an CLIPGenericFlag in the hue bridge over web interface: then i expose all the sensors (including the new created CLIPGenericFlag) to HomeKit with homebridge-hue. BUT: So i can trigger the CLIPGenericFlag with an automation when my doorbell rings. But whats the next step? I have to create an rule i a thrid party app like eve to make my lights blinking when sensor is triggered? Or can i include the the part directly inside the CLIPGenericFlag?
|
You need to do a POST to {
"manufacturername": "homebridge-hue",
"modelid": "CLIPGenericFlag",
"name": "Motion Sensor Flag",
"swversion": "1",
"type": "CLIPGenericFlag",
"uniqueid": "Motion Sensor Flag"
} This will create a Next, create a rule to flash the light and reset the sensor when the sensor is set, i.e. POST to {
"name": "Alert on motion",
"conditions": [
{
"address": "/sensors/xx/state/flag",
"operator": "eq",
"value": "true"
}
],
"actions": [
{
"address": "/lights/1/state",
"body": {
"alert": "select"
},
"method": "PUT"
},
{
"address": "/sensors/xx/state",
"body": {
"flag": false
},
"method": "PUT"
}
]
} Note that the value in the condition always is a string, whereas the body in the action is the actual json value. Test that the rules works as indented by a PUT to { "flag": true } The light should flash, and the sensor (If by now, you're as annoyed by the CLIP API debugger as I am, check out https://github.com/ebaauw/ph.sh) Next, you add You might get (a lot) more new accessories than you bargained for, depending on how many sensor resources the Hue bridge already has (many apps create companion CLIP sensors for routines and sensor/switch rules). Use Next, you can create a HomeKit scene which sets the switch and create a HomeKit automation to recall this scene when your motion sensor detects motion. |
Thank u so much! Now i understand the system. Very powerfull! I tried some things and all work very nicely. If u ring now on my doorbell, it triggers the homebridge motion sensor and this will trigger an "alert:select" on a few lights. You have an idea how to trigger it twice? |
Just leave the HomeKit bit. On the bridge, create a second rule with an added ddx condition on the flag sensor’s state.lastupdated and only reset the flag in the second rule. See ph_rules.sh in the ph.sh repository for some examples how to use ddx. |
I am searching for a possibility to visualize my doorbell.
I installed an homebridge input as an motion sensor to create a trigger when my doorbell rings... works perfect. Now i want to let my lights go bright to 100% and go back to brightness before.
If i push on "identify" in the original HUE app, the light goes to 100%->0-> and back to the brightness like before.
The "identify" command would be perfect for this! Is there any possibility to trigger this event?
The text was updated successfully, but these errors were encountered: