INSTAR Deutschland GmbHINSTAR Deutschland GmbH

Using MQTT to inform Homey that an Alarm was Triggered



Q: I found your guide to use the INSTAR (HTTP) Alarmserver. Wouldn't it make more sense to publish those events through the MQTT service that every Full HD cameras offers? This way I would be able to be sure that every alarm event is registered by my Homey.

A: All alarm events that published by the INSTAR HTTP Alarmserver can now also be accessed through the MQTT Service!

MQTT Alarmserver

The corresponding MQTT Topic is:

alarm/triggered

All you need to do is adding a subscription to the Status Topic and you will receive updates about alarm events as well as what service triggered the alarm:

Appended Alarm Trigger

  • Alarm Area 1 triggered: 1
  • Alarm Area 2 triggered: 2
  • Alarm Area 3 triggered: 3
  • Alarm Area 4 triggered: 4
  • Alarm-In / PIR triggered: 5
  • Audio Alarm triggered: 6
  • Motion Detection & triggered (Area 1): 7
  • Motion Detection & triggered (Area 2): 8
  • Motion Detection & triggered (Area 3): 9
  • Motion Detection & triggered (Area 4): 10

Setting up Homey

To keep it simple I will ignore the alarm trigger and have my Homey base station's LED ring flash in red whenever an alarm event happened. Let's start by creating a new Flow in the Homey smartphone app:

INSTAR MQTT Alarmserver for the Homey

Click on Add Card to add the event you want to trigger your flow:

INSTAR MQTT Alarmserver for the Homey

This event has to be an MQTT status update from our camera:

INSTAR MQTT Alarmserver for the Homey

Add the MQTT alarm server status topic:

INSTAR MQTT Alarmserver for the Homey

And save the flow trigger:

INSTAR MQTT Alarmserver for the Homey

Now we have to add an action we want to execute when our flow was triggered by the MQTT Alarmserver:

INSTAR MQTT Alarmserver for the Homey

To keep it simple I will just have Homey flash it's LED ring in red:

INSTAR MQTT Alarmserver for the Homey

Choose the Animation option:

INSTAR MQTT Alarmserver for the Homey

And select the colour and duration:

INSTAR MQTT Alarmserver for the Homey

You can now click on Test to test the animation and save your flow:

INSTAR MQTT Alarmserver for the Homey