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:

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: &active=1
  • Alarm Area 2 triggered: &active=2
  • Alarm Area 3 triggered: &active=3
  • Alarm Area 4 triggered: &active=4
  • Alarm-In / PIR triggered: &active=5
  • Audio Alarm triggered: &active=6
  • PIR triggered & Alarm Area 1 triggered: &active=7
  • PIR triggered & Alarm Area 2 triggered: &active=8
  • PIR triggered & Alarm Area 3 triggered: &active=9
  • PIR triggered & Alarm Area 4 triggered: &active=10
  • Manual trigger (cmd=pushhostalarm): &active=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