MiguelRipoll23 / homebridge-securitysystem

Homebridge plugin that creates a security system accessory that can be triggered by HomeKit sensors.
https://www.npmjs.com/package/homebridge-securitysystem
MIT License
153 stars 13 forks source link

Noonlight integration #39

Closed johnnygeezz closed 4 years ago

johnnygeezz commented 4 years ago

I was recently looking at information on HomeAssistant and found this blog post below that you may find useful for new ideas. In particular, see the part about integrating with Noonlight via an IFTTT webhook. This could be game changing functionality.

https://dfederm.com/setting-up-a-security-system-with-home-assistant/

https://www.noonlight.com/

johnnygeezz commented 4 years ago

Some more info on Noonlight.

https://community.smartthings.com/t/release-professional-smart-home-monitoring-for-security-and-smoke-alarms-with-noonlight/134573

https://community.hubitat.com/t/noonlight-24-7-smart-home-monitoring-enables-hubitat-to-call-9-1-1-u-s-only/9141

MiguelRipoll23 commented 4 years ago

Thanks for creating an issue here.

We can do this the exact way it was described on the HomeAssistant blog post by using IFTTT. I had another way to implement it on my mind but it ends up being harder to configure as an user 🙃

Are you okay with this? Keep in mind that IFTTT probably prioritizes these kind of requests so they wouldn’t be delayed.

johnnygeezz commented 4 years ago

Cool. Let’s go! Seems like the only way.

MiguelRipoll23 commented 4 years ago

That's awesome.

What you need to do it's kinda similar, it looks quite long and complex on paper but it's actually easier on practice:

IFTTT

  1. Connect Noonlight to your IFTTT account.
  2. Connect Webhooks yo your IFTTT account.
  3. Go to the Webhook settings and copy the part after https://maker.ifttt.com/use/. This is your private key, you will use it on the plugin's configuration.
  4. Go to the IFFTT creation page.
  5. Click on the +This , write Webhooks on the Search services... text box. and select it.
  6. Click on the Receive a web request card.
  7. Write alarm_triggered as event name.
  8. Click on the +That, write Noonlight on the Search services... text box. and select it.
  9. There should be an option to create an alarm there, click it.
  10. Click finish once everything is set up.

homebridge-securitysystem

  1. Go to the settings UI (the one from Homebridge)
  2. Expand the Webhooks (Optional) category.
  3. On the Base URL option write: https://maker.ifttt.com
  4. On the Current Mode: Triggered option write: /trigger/alarm_triggered/with/key/PRIVATE_KEY_HERE
MiguelRipoll23 commented 4 years ago

Previous comment edited with some corrections.

johnnygeezz commented 4 years ago

I’ll put this together tomorrow.

johnnygeezz commented 4 years ago

Ok, I have it configured, but what should I expect when testing it? A fire truck showing up at my door or can it be canceled?

MiguelRipoll23 commented 4 years ago

I think this is configured on IFTTT, by default the police is called.

Use the Noonlight app to cancel it.

johnnygeezz commented 4 years ago

Tried it out. Worked perfectly. Using Noonlight free basic account.

Alarm triggered. Text message from Noonlight within 5 seconds. Call from them within 10 seconds. Provided PIN to stop sending emergency services.

johnnygeezz commented 4 years ago

Couple thoughts on the Noonlight:

1- it would be nice to be able to enable/disable with a checkbox the use of the webhook from the Homebridge UI or Home app somehow. That way you can leave your set up alone if you’re trying out automations or just don’t want it to call out to Noonlight while your testing things. Kind of like an override.

2- an interesting automation could be to have Siri activate the Siren and call out to Noonlight. In the case of a fall or other sudden emergency “on-demand” event. “Hey Siri, sound the Siren!”

3- another interesting automation could be to have my First Alert OneLink smoke detector (uses HomeKit now) to trigger the Siren to call out to Noonlight in the event of a fire. My current automation turns on the lights all over the house. This would make for a more complete implementation.

Thoughts?

MiguelRipoll23 commented 4 years ago

1- it would be nice to be able to enable/disable with a checkbox the use of the webhook from the Homebridge UI or Home app somehow. That way you can leave your set up alone if you’re trying out automations or just don’t want it to call out to Noonlight while your testing things. Kind of like an override.

You can disable the Noonlight call action temporarily by going to IFTTT and pressing on the Connected switch, this is far better due to two reasons:

2- an interesting automation could be to have Siri activate the Siren and call out to Noonlight. In the case of a fall or other sudden emergency “on-demand” event. “Hey Siri, sound the Siren!”

Enable the Trigger During Off Mode option and say Hey Siri, turn on Siren, if you want a custom phrase you can use create a Shortcut that turns on the Siren and then you name it Sound the siren, that should work.

3- another interesting automation could be to have my First Alert OneLink smoke detector (uses HomeKit now) to trigger the Siren to call out to Noonlight in the event of a fire. My current automation turns on the lights all over the house. This would make for a more complete implementation.

Unfortunately, HomeKit doesn't allow me to know the origin of the device that has made an action on my plugin to do this, hopefully this changes in the future.

johnnygeezz commented 4 years ago

Good answers to my use cases for 1 and 2.

For the 3rd one about the smoke detectors, couldnt I just include, IF smoke detected, “Turn on Siren Switch” as a step in my automation along with “Turn on Lights”? I think I could program that in the Eve app.

Are you saying this wouldn’t work to active the trigger event for the webhook?

MiguelRipoll23 commented 4 years ago

Sorry, I misunderstood what you were saying.

You’re correct, I thought you meant calling a different emergency service. By default it calls the police and the fire department can be called as well but I can’t tell if it was your smoke sensor the one that triggered the alarm due to HomeKit limitations.

johnnygeezz commented 4 years ago

Right. This sounds great!

How does the IFTTT app and the Noonlight app fit into the architecture? Are they needed to be installed on my phone or is this all cloud based?

MiguelRipoll23 commented 4 years ago

Both are cloud based.

You don’t need IFTTT installed but having Noonlight installed on your phone may be useful to update home or person details and cancelling an alarm.

johnnygeezz commented 4 years ago

Great thanks for the clarification. Probably good to have the IFTTT installed as well so that you can temporarily 'Disconnect' the service if you're trying new automations, etc. as mentioned earlier. I just wanted to make sure that if my phone is 100% shutdown, that this will still work.

cirrusflyer commented 9 months ago

Is this still working in 2024?