This is the forum archive of Homey. For more information about Homey, visit the Official Homey website.

The Homey Community has been moved to https://community.athom.com.

This forum is now read-only for archive purposes.
Closed Official CommunityApp SDK2

[APP] Heimdall - Let Homey watch over your home.

DaneeDeKruyffDaneeDeKruyff Member
edited August 2018 in Apps

Heimdall - Let Homey watch over your home.

This app enables you to use your Homey as a surveillance system. 

App store page: https://apps.athom.com/app/com.uc.heimdall
Github: https://github.com/daneedk/com.uc.heimdall

How does it work?

All detected motion and open/closed doors/windows on the sensors you select will be seen by Heimdall. All these events will be logged and when Heimdall is in a Surveillance Mode the alarm will be triggered. 

Instructions

  • Select the devices to monitor on the settings page.
  • Add a Surveillance Mode Switch.
  • Add flows to activate and deactivate the desired Surveillance Mode.
  • Add a flow with the desired actions when the alarm is triggered.
  • Add a flow to deactivate the alarm.
  • Add an Alarm Off Button.

More information

Selecting devices to monitor

There are three possible Surveillance Modes these are: Disarmed, Armed and Partially Armed. Per sensor you can decide if it will be monitored while Armed, Partially Armed or in both modes. To give you the opportunity to leave the house after setting an Armed or Partially Armed mode or to Disarm when entering your house you can add a Delayed Trigger to the desired sensor.


Surveillance Mode

There are several methods to change the Surveillance Mode, either by a flow and/or by using the Surveillance Mode Device you can add from the app. 

 
If you have the Homeykit app installed you can also use the Homekit app on your iPhone or iPad to set the Surveillance Mode.

Heimdall can do a 'Pre-arming' check, you can choose what sensor types to include:  

When using an Arming Delay the Pre-Arming check will be done when the delay countdown ends, you can let the Pre-Arming check be performed before the Arming Delay by checking the Perform Pre-Arming check before Arming Delay setting.

When a sensor is not in the desired state it will be logged to the history:



At the same time the flowcard Sensor active at arming will be triggered with the token Warning containing the text "Warning, sensor active...."


There is also the option to let Homey tell You when a sensor is active, see the possible speech options below.

Alarm State

When a sensor is tripped and the Surveillance Mode is in any of the Armed states the Alarm State will be set to activated immediately when no Delayed Trigger is configured. If the Delayed Trigger is configured a countdown will start for the duration of the Trigger Delay setting. If the Surveillance Mode is not set to Disarmed during the countdown on the end of it the Alarm State will be activated.

(More information about the Trigger delay can be found below)

To set the action Homey should take when the Alarm State is activated you need to make a flow with the The alarm is activated flow card as the trigger. That flow card has the Zone and Reason token which will show what sensor was the tripped and which zone it belongs in.



Deactivating the alarm can be done in either of two ways. The first is by using the Deactivate Alarm flow action card, the second by using the Alarm Off Button you can add from the app.

 

Log

If you do not want a device to activate an Alarm State but do want to log if for example motion is detected you can select the Log option for that device.


When a device with the Log option changes state the A logline was written flow card will be triggered.


Trigger Delay


The Trigger Delay can be used to give you enough time to set the Surveillance Mode to Disarm after entering the house through a door that has a door sensor. The trigger flow card The delay is activated can be used to inform you the countdown has started. The card has two tags, Duration and Reason which you can use in for example a spoken or a push message. The trigger flow card The time until alarm changed is called every second during the countdown and the tag Seconds holds the number off seconds until the Alarm State is activated.

 

When the option Use delay when enabling Armed mode or Use delay when enabling Partially Armed mode is checked you will have enough time to leave your house after activating. During the countdown the The time until armed changed trigger flow card is called every second holding a tag Seconds which is again the seconds until the Surveillance Mode is activated.


Speech

Heimdall supports speech output for certain actions


Other flow cards

Triggers: when...





Conditions: ...and...





Actions: ..then







If you have any questions and or remarks please post them here.

«13456713

Comments

  • DaneeDeKruyffDaneeDeKruyff Member
    edited July 2018

    Current version 1.0.16

    • Support for non-sensor devices with Contact, Motion and Tamper capabilities

    Previous version 1.0.15

    • Added 'Alarm State' condition flow card

    Previous version 1.0.14

    • Minor translation fixes

    Previous version 1.0.13

    • Added flowcard that triggers when a logline is written

    Previous version 1.0.12

    • Minor translation fixes

    Previous version 1.0.11

    • Added battery indicator to devices

    Previous version 1.0.10

    Previous version 1.0.9

    • Code cleanup, removed lodash dependency
    • Minor translation fixes
    • Added interpunction to Speech output to make it sound more natural

    Previous version 1.0.8

    Previous version 1.0.7

    Previous version 1.0.6

    • Added support for tampering detection

    Previous version 1.0.5

    Previous version 1.0.4

    • Arming delay selectable per Surveillance Mode

    Previous version 1.0.3

    Previous version 1.0.2 β

    • Added pre-arming check

    Previous version 1.0.0

    • No functional changes, previous beta promoted to stable

    Previous version 0.1.11 Beta

    • Automatic history cleanup, 20% at 3000 lines

    Previous version 0.1.10 Beta

    Previous version 0.1.9 Beta

    • Added saving Auto refresh and Use colors settings on Dashboard tab in settings
    • Code cleanup, preparing for release

    Previous version 0.1.8 Beta

    Previous version 0.1.7 Beta


    *Heimdall is prepared, it is not yet implemented in the Homeykit app.

    Previous version 0.1.6 Beta

    Previous version: 0.1.5 Alpha

    Previous version: 0.1.4 Beta

    • Added colors to History view
    • Added 'The alarm is deactivated' flow card
    • More translations

    Previous version: 0.1.3 Beta

    • Improved History view
    • Improved translations

    Previous version: 0.1.2 Beta

    Previous version: 0.1.1 Beta

    • Code cleanup

    Previous version: 0.1.0 Beta

    • Initial release

    Planned features:

    - Redesign dashboard Implemented in 0.1.4 Beta
  • great Job!!!!
  • Good stuff!
    Very nice app to make a watchdog out of homey. Still needs several extra flows to make it complete, this makes it super versatile so you can tailor it to your own needs.
  • Thanks, that was indeed my goal to accomplish.
  • larsmachielslarsmachiels Member
    edited January 2018
    Super app! I am using it for a couple of weeks now and it does exactly what it is supposed to do. It would be even better if smoke and heat alarms could be added to the device list. But overall: Perfect job!
  • +1 for the heat and fire option
    +2 for the app
  • is it possible to activate the state of surveillance from disarmed to armed in a flow at a certain time
  • leave it found it

  • Thanks, that was indeed my goal to accomplish.
    And you did !
  • Thanks guys.

    @larsmachiels @ThijsDeJong
    Adding more sensors is possible, there are enough alarm types exposed by Homey like alarm_smoke, alarm_fire and alarm_heat. But also others like alarm_co, alarm_co2 etc.
    How would you see the addition of those sensors? How would it be an added value? I imagine devices that have those capabilities will have flow trigger cards of their own you can use. I don't think you'd want to tie such sensors to any sort of arm/disarmed mode. 
    Don't get me wrong, I like the idea of adding more functionality, I just need to understand how it would benefit you and others. (I only have old skool smoke sensors that are dumb and make a lot of noise)
  • For me they would be a good addition.
    If Homey is to watch over your home, should it not also monitor it for fire, flood and gas etc ?
    Flow cards to allow either an alarm or mail, or mixture of both, would allow flexible use.

    Would be good to know that if you are away you would still get notification via mail or text, something old school smoke and gas detectors can't do.

    So for me, a big yes vote !

    Andrew

  • I'll put it on the list, adding the code would not be to hard, but I can't test it myself as I don't own such devices.
  • For me they would be a good addition.
    If Homey is to watch over your home, should it not also monitor it for fire, flood and gas etc ?
    Flow cards to allow either an alarm or mail, or mixture of both, would allow flexible use.

    Would be good to know that if you are away you would still get notification via mail or text, something old school smoke and gas detectors can't do.

    So for me, a big yes vote !

    Andrew

    There are already a couple of good triggers when the smoke, flood, etc. alarm goes off so why implement this in the heimdall app?
  • Count_B said:
    For me they would be a good addition.
    If Homey is to watch over your home, should it not also monitor it for fire, flood and gas etc ?
    Flow cards to allow either an alarm or mail, or mixture of both, would allow flexible use.

    Would be good to know that if you are away you would still get notification via mail or text, something old school smoke and gas detectors can't do.

    So for me, a big yes vote !

    Andrew

    There are already a couple of good triggers when the smoke, flood, etc. alarm goes off so why implement this in the heimdall app?
    One app to watch over your whole home.... fire, flood, gas, intruder

    A
  • Count_BCount_B Member
    edited January 2018
    Count_B said:
    For me they would be a good addition.
    If Homey is to watch over your home, should it not also monitor it for fire, flood and gas etc ?
    Flow cards to allow either an alarm or mail, or mixture of both, would allow flexible use.

    Would be good to know that if you are away you would still get notification via mail or text, something old school smoke and gas detectors can't do.

    So for me, a big yes vote !

    Andrew

    There are already a couple of good triggers when the smoke, flood, etc. alarm goes off so why implement this in the heimdall app?
    One app to watch over your whole home.... fire, flood, gas, intruder

    A
    With fire, flood, gas etc. you don't need a schedule because when the alarm get's off you must be notifed at all times. 3 simple flows that does the job so in my opinion useless to integrate this in de Heimdall app.
  • Hi Guy's, and @DaneeDeKruyff THX for this great app!!!

    I have an coolcam pir in my kitchen, this one gives a lot of false positives, there is no one at home and i get alarms...
    Before this graet app i never noticed this.
    Are others having this experience?
    THX!
  • I had that also. So i adjusted the sensitivity.

    Really nice app. Had the thought of making this to but never learned programming so gave up because it was to hard.

    Just to make it easier i'd like to just klik on a kind of noise making device just like we can with the sensors. I do get that its just as easy to make a flow but it would me nice to have it in the app
  • Is there a keypad which will communicate with Homey? I am assuming that the alarm is turned off by a button on the smartphone, which is fine untill you go out and leave the phone at home.......
  • @willows Just saw that POPP has one and that @mruiter added it to the beta version of the POPP app
  • I made the driver from the manual. It could/should work but i dont have the keypad so i cant test.

    So please contact me when you have such a keypad to let me know if it works or what doesnt so i can fix it. :)

  • Its way overpriced! there should be a device cheaper that does the same



  • Hi, the alarm status does not go to deactivated when i come home. Someone any idea what goes wrong? THX!!!
  • cautje said:


    Hi, the alarm status does not go to deactivated when i come home. Someone any idea what goes wrong? THX!!!
    What happens when you test?
    What happens when you remove the condition in the 'AND' column?
  • @cautje

    I think you're using the wrong card. The Deactiveer Alarm card is to well, deactivate the alarm state. It does not change anything in the Surveillance Mode state. For that you need to use the flow card Set Surveillance Mode (Stel Toezicht Modus in) from the Surveillance Mode device.

    These are the cards I'm talking about:

  • uhm, that makes sense!
    but... i cant find that card? Not in the "then" (dan) colum.
    Can you make me an example?
    THX!
  • @DaneeDeKruyff
    Yes! i got it. From the device!!!
    THX!
    Now it works

    SUPER!!!
  • Thanks guys.

    @larsmachiels @ThijsDeJong
    Adding more sensors is possible, there are enough alarm types exposed by Homey like alarm_smoke, alarm_fire and alarm_heat. But also others like alarm_co, alarm_co2 etc.
    How would you see the addition of those sensors? How would it be an added value? I imagine devices that have those capabilities will have flow trigger cards of their own you can use. I don't think you'd want to tie such sensors to any sort of arm/disarmed mode. 
    Don't get me wrong, I like the idea of adding more functionality, I just need to understand how it would benefit you and others. (I only have old skool smoke sensors that are dumb and make a lot of noise)
    DaneeDeKruyff : You are absolutely right that smoke alerts etc. can be easily fetched by some simple flows. It however would be nice to manage them with your great app. But maybe it would be a lot of work because if you want to implement this in the right way an extra "Permanent" column should be added to the already existing Partially and Fully armed options so these types of alarms are always active, despite the surveillance mode.
  • @larsmachiels
    Being able to manage all sensors from one place is definitely a big plus and a nice addition to the app. Adding them in a usable way to the settings page isn't that hard. (In fact for as far as I can test it with only a flood sensor it is done)

    Because different devices (even the same type of devices by different manufacturers) can have or not have particular capabilities the next step, providing flow trigger cards with the available and desired information, will be the tricky part.

    I'll look further into it but can not be sure the functionality will be included as it could turn out I would have to write to much device specific code that would be the same as in the apps for those devices.

  • I can try with the Zipatoo keybad as soon as i get my Homey (been waiting for 5 weeks now).
    I will also try with 2 different MQTT keypads.

    About smor alarm i dont really see any reason to have them in the app. But maybe it would be nice.
This discussion has been closed.