Testing the MQTT and HTTP Alarmserver with MQTT

Q: I read this article showing how to test my IN-9408 2k+ WQHD cameras alarmserver. Is it possible to trigger this alarmserver test via the MQTT interface? I am especially interested in having a MQTT topic I can update to have my cameras contact an HTTP webhook provided by my home automation system.

A: Both - the HTTP and MQTT Alarmserver - can be tested via MQTT. The corresponding MQTT topics are:

Beachten Sie bitte

There is a new alarm server API for WQHD 2K+ cameras. The individual steps below are still valid. Only the URL query is now called &trigger instead of &active, the numerical values have changed and now allow the evaluation of multiple, simultaneous alarm triggers! You will find an example implementation of the MQTT and HTTP alarm server v2 API with Node-RED here.

This article is written for the deprecated version 1 of the alarmserver API. Please use the Alarm Server API v2 instead.

HTTP Alarmserver

Alarm Trigger

  • smarthome/alarmserver/test/http/trigger

Update the Trigger Topic with the payload value 1 - 10 (or 99), e.g. {"val":"1"}:

  • Alarm Area 1 triggered: &trigger=1
  • Alarm Area 2 triggered: &trigger=2
  • Alarm Area 3 triggered: &trigger=3
  • Alarm Area 4 triggered: &trigger=4
  • Alarm-In / PIR triggered: &trigger=5
  • Audio Alarm triggered: &trigger=6
  • PIR triggered & Alarm Area 1 triggered: &trigger=7
  • PIR triggered & Alarm Area 2 triggered: &trigger=8
  • PIR triggered & Alarm Area 3 triggered: &trigger=9
  • PIR triggered & Alarm Area 4 triggered: &trigger=10
  • Manual trigger (cmd=pushhostalarm): &trigger=99

And your camera will contact the configured alarmserver with the corresponding URL queries, &object=0&active=1 for the example chosen above.

Detected Object

  • smarthome/alarmserver/test/http/object

Update the Object Topic with the payload value 1 - 16, e.g. {"val":"1"}:

  • Person: &object=1
  • Vehicle: &object=2
  • Person + Vehicle: &object=3
  • Animal: &object=4
  • Person + Animal: &object=5
  • Animal + Vehicle: &object=6

And your camera will contact the configured alarmserver with the corresponding URL queries, &active=0&object=1 for the example chosen above.

MQTT Alarmserver

Alarm Trigger

  • smarthome/alarmserver/test/mqtt/trigger

Update the Trigger Topic with the payload value 1 - 10 (or 99), e.g. {"val":"1"}:

  • Alarm Area 1 triggered: -> {"val":"1"}
  • Alarm Area 2 triggered: -> {"val":"2"}
  • Alarm Area 3 triggered: -> {"val":"3"}
  • Alarm Area 4 triggered: -> {"val":"4"}
  • Alarm-In / PIR triggered: -> {"val":"5"}
  • Audio Alarm triggered: -> {"val":"6"}
  • PIR triggered & Alarm Area 1 triggered: -> {"val":"7"}
  • PIR triggered & Alarm Area 2 triggered: -> {"val":"8"}
  • PIR triggered & Alarm Area 3 triggered: -> {"val":"9"}
  • PIR triggered & Alarm Area 4 triggered: -> {"val":"10"}
  • Manual trigger (cmd=pushhostalarm): -> {"val":"99"}

And your camera will update the MQTT alarmserver topic status/alarm/triggered with the corresponding payload - {"val":"1"} for the example above.

Testing the MQTT and HTTP Alarmserver with MQTT

Detected Object

  • smarthome/alarmserver/test/mqtt/object

Update the Object Topic with the payload value 1 - 16, e.g. {"val":"1"}:

  • Person: -> {"val":"1"}
  • Vehicle: -> {"val":"2"}
  • Person + Vehicle: -> {"val":"3"}
  • Animal: -> {"val":"4"}
  • Person + Animal: -> {"val":"5"}
  • Animal + Vehicle: -> {"val":"6"}

And your camera will update the MQTT alarmserver topic status/alarm/triggered/object with the corresponding payload - {"val":"1"} for the example above.

Testing the MQTT and HTTP Alarmserver with MQTT