Heimdall - Let Homey watch over your home

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

image

Supported languages

:netherlands: Dutch
:uk: English
:de: German
:fr: French
:it: Italian
:sweden: Swedish
:norway: Norwegian
:es: Spanish
:denmark: Danish

Links


If you want to support this app, please consider a donation

image
Donations are very welcome, though they come with no guarantees, warranties, or preferential treatment (just think of it that you’re donating for the work already done, not the work to be done).


How does it work?

All detected motion and opened/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 State will be activated.

Instructions

After you’ve completed the instructions above and feel comfortable with Heimdall you’re ready for the Advanced Functions in Heimdall

Select the devices to monitor on the settings page

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 enable a Delay on the desired sensor.

:arrow_up: Instructions overview

Add a Surveillance Mode Switch

Go to the devices and click the plus icon to add a device and select Heimdall from the presented brands.


Choose the Mode device in the devices overview screen…


and click Install followed by clicking Next to finish the installation.

:arrow_up: Instructions overview

Add methods to control the Surveillance Mode

There are several methods to change the Surveillance Mode , either by a flow and/or by using the Surveillance Mode Switch in the Homey app on your phone. If you have the Homekitty app installed you can even use the Homekit app on your iPhone or iPad to set the Surveillance Mode.
If you want to use a keypad to set the Surveilance Mode you can, check out the Ring Security App.

To change the Surveillance Mode from a flow you will have to use the Set Surveillance Mode card from the Surveillance Mode Switch as an action.

image

:arrow_up: Instructions overview

Add a flow with the desired actions when the alarm is triggered

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.

image

:arrow_up: Instructions overview

Add a flow to deactivate the alarm

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 Button you can add from the app.

image

:arrow_up: Instructions overview

Add an Alarm Off Button

Go to the devices and click the plus icon to add a device and select Heimdall from the presented brands.


Choose the Alarm device in the devices overview screen…


and click Install followed by clicking Next to finish the installation.

:arrow_up: Instructions overview

Advanced functions

Settings

The Arming Delay can be used for delaying the changing of the Surveillance Mode to give you time to leave the house when using for example an Alarm panel. You can select the delay when arming for each of the armed Surveillance Modes, see Delays for more information. The Alarm Delay can be used to give you time to set the Surveillance Mode to disarmed when entering the house. Both delays can be set to any value in the 0-300 seconds range.

For logging you can choose to always log any event from a sensor or only when a Surveillance Mode is active and you can decide to only log activating of sensors. The setting to also Listen to tampering reports from sensors will enable this for all sensors supporting this capability.

When the Surveillance Mode is set a Pre Arming Check is preformed, you can select what type of sensors should be checked during the Pre Arming Check. If you use an Arming Delay you can also decide to perform the Pre Arming Check when the Arming Delay starts instead of when the Surveillance Mode is actually set. See Pre Arming Check for more information.

Heimdall can write important events to your Timeline, you can select which events should be written to it.

And it supports speech output for certain actions.

:arrow_up: Advanced functions overview

Delays

The Alarm 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.

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 on the triggered device.
If the Delayed Trigger is configured on the triggered device a countdown will start for the duration of the Alarm 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.

When the countdown starts the trigger flow card The alarm 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.

image
image

When the option Use delay when enabling Armed mode or Use delay when enabling Partially Armed mode is checked the The arming delay is activated card will is activated. The card has one tag; Duration. 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.

image
image

:arrow_up: Advanced functions overview

Last Door Functionality

The Last Door Functionality can be used to shorten the Arming Delay to 10 seconds after leaving the house. This function is automatically enabled on a Door Sensor that has the Delayed Trigger set to yes. To use it, just make sure the door is closed when the Surveillance Mode is set. When the Surveillance Mode is set the normal Arming Delay will start, after opening and closing a door which has the Delayed Trigger set the Arming Delay will be lowered to 10 seconds.

:arrow_up: Advanced functions overview

Pre Arming check

When setting the Surveillance Mode to either Armed or Partially Armed 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 actual Surveillance Mode is set, so when the delay countdown ends, you can let the Pre Arming check be performed before the Arming Delay by enabling the Perform check before Arming Delay setting.

When a sensor is not in the desired state during the Pre Arming check the flowcard Sensor active at arming will be triggered with the token Warning containing the text “Warning, sensor active…”

image

and it will be logged to the history:

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

:arrow_up: Advanced functions overview

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. This card has the tags Zone, Device and State.

image

:arrow_up: Advanced functions overview

All Flow Cards

Triggers: when…

surveillancechanged
sensoractive
alarmactivated
alarmdeactivated
delayactivated
timeuntilalarm
timeuntilarmed
logwritten
sensortripped
noinformation

Conditions: …and…

surveillancemode
armingcountdown
alarmcountdown
alarm

Actions: …then

sendtolog
deactivatealarm
activatealarm
clearlog

:arrow_up: Advanced functions overview

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

14 Likes

FAQ

Q: Do I really need the add the Surveillance Mode Switch?
A: Yes, it is necessary to add the Surveillance Mode Switch. It is needed to set the Surveillance Mode from a flow and can also be used on your mobile device to set the desired Surveillance Mode.

Q: What devices can I use as sensors for Heimdall?
A: Any device that supports the alarm_motion or alarm_contact capability in Homey. Devices that support alarm_motion are for example motion sensors like the Fibaro Motion Sensor, Aeotec Multisensor or Xiaomi Human Body sensor but also smart doorbells like the Ring Video Doorbell’s or the Doorbird. Devices that support the alarm_contact capability are typical doorsensors like the Fibaro Door Sensor, Aeotec Recessed Door Sensor or Xiaomi Smart Door and Windows Sensor.

Q: I have a device that doesn’t have the alarm_motion capability, can I still use it with Heimdall?
A: Yes you can. Just install a Virtual Motion sensor from the Virtual Devices app and set’s it value in a flow triggered by your device. How to do that is explained here.

Q: There are only three Surveillande Modes, Disarmed, Partially Armed and Fully Armed. I think I need more, can I add some?
A: No, three Surveillance Modes will be enough. You are are able to add and remove devices to/from a Surveillance Mode from a flow, making the combination of Armed zones unlimited. See this post how to do that.

Go to opening post

2 Likes

Change Log

Current version 2.10.13

  • Updated homey-api to 3.0.6

Previous version 2.10.12

  • Improved retrieving zone names

Previous test version 2.10.11

  • Updated homey-api to 3.0.0-rc.18
  • Improved retrieving zone names

Previous version 2.10.6

  • Lowered minimum required firmware version

Previous version 2.10.4

  • Updated homey-api to 3.0.0-rc.10

Previous test version 2.10.3

  • Small fix for keypads

Previous test version 2.10.2

  • Updated homey-api to 3.0.0-rc.6
  • Workaround for Homey Pro before 2023 compatibility

Previous version 2.3.15

  • Last version for Homey Pro pre 2023 (for now)

Unannounced test version 2.3.14

  • Code clean up
  • Added code comments

Previous test version 2.3.13

  • Updated Homey API to 1.10.8

Previous test version 2.3.12

  • Updated Homey API to 1.10.5
  • Code cleanup
  • Better workaround for homey-api bug

Unannounced test versions 2.3.9, 2.3.10, 2.3.11

  • Incremental updates leading to 2.3.12

Previous stable version 2.3.8

  • Fixed incorrect devicestatus in app settings

Previous version 2.3.7

  • Minor change in error handling

Previous version 2.3.6

  • Fixed a bug in the flowcards to add or remove a Surveillance Mode, Delay or logging to/from a device

Previous version 2.3.5

  • SDK3 support and conversion from athom-api to homey-api

Previous version 2.1.6

  • Fixed Last seen in devicesettings

Previous version 2.1.5

  • Extended functionality for 3rd party Keypanels

Previous version 2.1.4

  • Extended functionality for 3rd party Keypanels

Previous version 2.1.3

  • Extended functionality for 3rd party Keypanels

Previous version 2.1.1

  • Added Hints to flowcards

Previous version 2.1.0

  • Added User Management

Previous version 2.0.42

  • No functional changes, resubmission to enable App Store languages

Previous version 2.0.41

  • Skipped due to the workings of the submission process

Previous version 2.0.40

  • Fixed bug in Pre-Arming Check

Previous version 2.0.39

  • Updated Athom API to 3.1.20
  • Code cleanup

Previous version 2.0.38

  • Added Danish language
  • Added Zone tag to A logine was written flowcard

Previous version 2.0.37

  • Added Spanish language

Previous version 2.0.36

  • Added localised app description for the app store
  • Fixed some Dutch translations

Previous version 2.0.35

  • Added Swedish language
  • Added Norwegian language
  • Localised notification on Surveillance Mode change
  • Fixed some French translations

Unpublished versions 2.0.24, 2.0.25, 2.0.26, 2.0.27, 2.0.28, 2.0.29, 2.0.30, 2.0.31, 2.0.32, 2.0.33, 2.0.34

  • Adjustments for the new app store

Previous version 2.0.23

  • Added condition flowcard to check if a device is part of the Partial Surveillance Mode
  • Added action flowcard to add a device to the Partial Surveillance Mode
  • Added action flowcard to remove a device from the Partial Surveillance Mode
  • Added condition flowcard to check if a device is part of the Full Surveillance Mode
  • Added action flowcard to add a device to the Full Surveillance Mode
  • Added action flowcard to remove a device from the Full Surveillance Mode

Previous version 2.0.22

  • Fixed bug, introduced in 2.0.21, that caused devices to not log
  • Added condition flowcard to check if a device is logged
  • Added action flowcard to add logging to device
  • Added action flowcard to remove logging from device

Previous version 2.0.21

  • Added condition flowcard to check if a device is delayed
  • Added action flowcard to add delay to device
  • Added action flowcard to remove delay from device

Previous version 2.0.20

  • Added Italian translation
  • Added ‘Allow Alarm while in alarm delay

Previous version 2.0.19

  • Updated athom-api (2.1.179)

Previous Version 2.0.18

  • Code cleanup
  • Added French translation (Work in progress)
  • Changed compatibility to >=2.0.5

Previous version 2.0.17

  • Translation improvements

Previous version 2.0.16

  • Fixed tag value on The arming delay is started card (Github)
  • Added translators to App Store

Previous version 2.0.15

  • Added Alarm Off function to Surveillance Mode Switch

Previous version 2.0.14

  • Improved dutch translations

Previous version 2.0.13

  • Added Alarm indicator to Alarm Off Button
  • Added Alarm indicator to Surveillance Mode Switch

(Requires removing and re-adding of devices)

Previous version 2.0.12

  • Updated athom-api (2.1.166)

Previous version 2.0.11

  • Split Devices page into status- and settingspage

Previous version 2.0.10

  • Added new flow card: The arming delay is activated

Previous version 2.0.9

  • Improved device not ready handling

Previous version 2.0.8

  • Added Check status of all sensors function
  • Prevent starting a new Arming Delay when one is active
  • Minor translation improvements

Previous version 2.0.7

  • Improved device enumeration

Previous version 2.0.6

  • Settings tabs automatically adjust to screenwidth

Previous version 2.0.5

  • Improved settings user interface
  • Code cleanup

Previous version 2.0.4

  • Prevent creation of default flow cards for Surveillance Mode Switch
  • Added examples to flowcard tags
  • Code cleanup

Previous version 2.0.3

  • Small change in write to Timeline functionality

Previous version 2.0.2

  • Improved code for enumerating devices

Previous version 2.0.1

  • Fixed translations

Previous version 2.0.0

  • First version for Homey software 2.0

Heimdall 1.0.25 is the last version for Homey software 1.x

Previous version 1.0.25

  • Removed temporary code

Previous version 1.0.24

  • Improved sensor communication check
  • Code cleanup

Previous version 1.0.23

  • Check if sensors communicated with Homey in the last 24 hours

Previous version 1.0.22

  • Added Last Door functionality
  • Split Trigger Delay to 2 separate settings, Arming Delay and Alarm Delay
  • Changed Delay range to 0-300 seconds
  • Minor layout changes to settings pages

Previous version 1.0.21

  • Added support for Vibration sensors

Previous version 1.0.20

Previous version 1.0.19

Previous version 1.0.18

  • Updated Community ID

Previous version 1.0.17

  • Not released

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

Previous version 0.1.6 Beta

Previous version: 0.1.5 Alpha

  • Test version for Homeykit compatibility

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

Go to opening post

New version published:

Version 1.0.18

  • Updated Community ID

No new or changed functionality, the link in the app store is changed to this topic.

@Phuturist wrote a great tutorial how to setup a home automation dashboard on your Android home screen and explained, amongst others, how to display Heimdalls Surveillance Mode on it:

A huge thank you for your Heimdall App @DaneedeKruyff. works perfectly. I sent a “beer” your way today :grinning:

I guess you’re Brad from http://www.smarthome.com.au ? Great to see Heimdall also found its way down under next to Homey! Your donation is much appreciated! :+1:

Smart avatar btw!

@Arie_Laxed published a new version (v0.7.4) of his Virtual Devices app with a fix for the flow card Set a virtual sensor value so you can set the alarm_motion capability.

If you have a device that does not have the alarm_motion capability itself you can now use that device with Heimdall by using a Virtual Device and setting its value in a flow.
To do that you need to use the Set a virtual sensor value flow card form the Virtual Device and use it like this:

image
(enable motion)

image
(disable motion)

In order to use a Virtual Device like this it needs to be added with the Device Class Home Alarm or Sensor and at least the capability Motion needs to be selected.

1 Like

New version published to the beta channel

Version 1.0.19

The following API endpoints are available (from an authenticated session!):

  • GET /api/app/com.uc.heimdall/state/surveillance
  • GET /api/app/com.uc.heimdall/state/alarm

Version 1.0.19 has just been promoted to Stable

2 Likes

New version published

Version 1.0.20

Every sensor tripped during an Alarmstate will trigger this card, it can be used to ‘track’ movement.

Trying to get head round this use case… Can you give an example of how this might be used?

You can use this to be informed where a thief is moving after the alarm has been tripped as per feature request by @tweaqer on github.

1 Like

Hi,
when do you think you will add Firealarm functionallity in Heimdall app? (sorry if i post this questions in wrong discusison/topic)

Hi @Perran83

This is the right spot to ask questions about Heimdall. :+1:

Adding fire alarm functionality to Heimdall has been discussed on the old forum, I am not really sure how I can improve on a flow that responds on smoke/fire sensor and take an action like send messages and sound a sirene.
All functionality that Heimdall offers over building an alarm with regular flows have to do with the fact that Heimdall simplifies the arming with delays, pre-arming check, Partially arming, Full arming etc.
For a fire alarm all these extra’s don’t apply, it just has to function always.

Maybe you can tell me how you’d like to see it integrated? Maybe you can convince me to add it anyway because I’m overlooking something :smiley:

New version published

Version 1.0.21

  • Added support for Vibration sensors

@TedTolboom just released version 0.4.2 of his Xiaomi Aqara ZigBee app with support for the Vibration Sensor.

This sensor can now be used with Heimdall

For more information on the Xiaomi Aqara Zigbee app visit its topic.

5 Likes

Great work and collaboration again @DaneedeKruyff!
Looking forward to seeing the first user experiences…

2 Likes

:+1:
Me too, I’ve been running it for quite a while now and no false alarms in my testing. Sensitivity on my sensor looks ok to use it with Heimdall, but I have only on sensor to test with.

hi, sorry late reply. Yes you have a point. It was more to having all alarms connected together in one place but any way the user might want to have different flows triggering if its firealarm or burglar alarm.

Maybe it would be better to have the possibility to use Unifi cameras and / or other cameras that can be part of the input triggering sensors as well. But I dont have the knowledge if that would be possible or not. =)

Any camera that sends a message to Homey that results in an alarm_motion trigger in the app for that camera can be used as an input for Heimdall.

Like a Ring
image
Or Doorbird
image
for example.

If a camera sends some sort of message to Homey but not with the alarm_motion capability you can ask the app developer to integrate that into the app.

A workaround can be to create a flow that gets triggered by the camera and looks like this:
image
That way all other actions like logging and activating the alarm flow will be the same.