Deconz: new REST endpoint for alarm system

I armed the HA alarm system using the HA virtual keypad (the top one on the picture attached).
The relevant timestamps are as follows:

  • 2021-08-31 15:01:16 → entered PIN and hit arm_away button (30 sec delay)
  • 2021-08-31 15:01:46 → armed away state was set
  • 2021-08-31 15:05:58 → entered PIN and disarmed the system

Before, during and after the HA alarm was armed, the deconz alarmsystems/1 had the following stable (e.g. it never changed) status:

{
  "config": {
    "armed_away_entry_delay": 120,
    "armed_away_exit_delay": 120,
    "armed_away_trigger_duration": 120,
    "armed_night_entry_delay": 120,
    "armed_night_exit_delay": 120,
    "armed_night_trigger_duration": 120,
    "armed_stay_entry_delay": 120,
    "armed_stay_exit_delay": 120,
    "armed_stay_trigger_duration": 120,
    "armmode": "disarmed",
    "configured": true,
    "disarmed_entry_delay": 0,
    "disarmed_exit_delay": 0
  },
  "devices": {
    "00:0d:6f:00:0f:4f:19:6f-01-0501": {
      "armmask": "AN"
    },
    "00:15:8d:00:03:4f:4e:43-01-0006": {
      "armmask": "AN"
    },
    "00:15:8d:00:04:28:74:c9-01-0406": {
      "armmask": "A"
    },
    "00:15:8d:00:04:62:e5:c6-01-0406": {
      "armmask": "A"
    },
    "00:15:8d:00:04:63:04:e0-01-0406": {
      "armmask": "A"
    },
    "00:15:8d:00:04:63:fc:f0-01-0406": {
      "armmask": "A"
    },
    "00:15:8d:00:04:ab:dd:32-01-0006": {
      "armmask": "AN"
    },
    "00:15:8d:00:05:3e:72:65-01-0006": {
      "armmask": "AN"
    },
    "00:15:8d:00:05:3e:79:16-01-0006": {
      "armmask": "AN"
    },
    "00:15:8d:00:05:3e:79:1f-01-0006": {
      "armmask": "AN"
    }
  },
  "name": "Alarm System",
  "state": {
    "armstate": "disarmed",
    "seconds_remaining": 0
  }
}


logs → search for comment:

  • Rock PI S board + Conbee II → “the hub”
  • Aqara window/door sensors
  • Aqara human detection sensors (or motion sensors - they are marketed under both names)
  • XFINITY-UEI-XHK1-UE alarm keypad
  • Heiman alarm siren
    I’ve got more but these will get you going.

The new logs seems to be filtered to not show the rest api commands to deconz nor the sensor or alarmsystem details. So unfortunately they’re useless

The logs were ok - i tried it a few more times. If i use the virtual keypad in HA then nothing happens in deconz as they are not connected at all.

I tried it the other way around - i armed the alarmsystems/1 in deconz using the physical keypad.

as you can see the “Alarm Keypad” entity shows its arming.

deconz is armed away while the “HA Alarm Control Panel” is disarmed → they are not in sync.

logs

edit: deconz_alarm_event is never fired. I subscribed to it and no action in deconz alarmsystems is reflected in here (arming, armed, triggered, disarmed, wrong code, etc.)

I haven’t updated the deconz_alarm_event description, it is only used for four custom events right now (EMERGENCY, FIRE, INVALID_CODE, PANIC). All normal state changes can be viewed from the keypad entity.

I was looking for log prints from deconz.gateway starting with "Sending ". Which there where none.

did you manage to take a look at the logs? do you need some more information/logs?

As I stated earlier the last logs you shared are unfortunately useless to me since they don’t show the deConz integration debug logs due to some log filtering.

hmmm, also the second batch of logs included with the screenshots?

I missed that you posted new ones. I’ll have a look tonight or tomorrow

The alarm keypad should be a keypad in hass not a sensor so you can use it for arming /disarming

Damn, now i got it! I guess we talked around each other…
So in HA i don’t need anything any more. issue solved, consider it closed.

Awesome! Everything works now?

Yes, all works great! Thanks a bunch.

1 Like

Now it makes sense why I didn’t see the rest api call in the logs :+1:t2:

Hello guys!

I follow this guide and it works great. Alarm Systems - deCONZ REST-API

My problem is, i wat to create a second alarmsystem. I have one for my house, and i try to make one more for my garage. I can´t figure out how i should do this.

Hope someone can help me.

/Johan

You need to share more information to get help, how have you set up the two alarmsystems and what devices are paired with them etc.

The Integration only creates an alarm system entity if a ancillary_control sensor is paired with it core/alarm_control_panel.py at 416aad32cc6607271b00e210360ae75ee339dc04 · home-assistant/core · GitHub

Hello!
My setup is verry simple. I have create a alarmsystem and add a keypad to it. I have no other sensors integrated, only the keypad. I can now make automations with the keypad together with Alarmo and this works verry good.
But as i say, i try to make a second alarmsystem but dont know how. I dont understand the code (described in the guide) how i should make it.

I make my first alarsystem with this code:
curl -X POST http://xxx.xxx.xxx.xxx:40850/api//alarmsystems

I set a name of the alarmsystem:
curl -H ‘Content-Type: application/json’ -X PUT -d ‘{“name”: “Huset”}’ http://xxx.xxx.xxx.xxx:40850/api//alarmsystems/1/

Then i add the keypad. (Xfinity XHK1-UE Keypad in Deconz)

curl -X PUT http://xxx.xxx.xxx.xxx:40850/api//alarmsystems/1/device/Device ID

I set a code to the keypad
curl -H ‘Content-Type: application/json’ -X PUT -d ‘{“code0”: xxxx"}’ http://xxx.xxx.xxx.xxx:40850/api//alarmsystems/1/config

Now i see the keypad in home assistant and i can make automations with it.

But how can i make a second alarmsystem? To my garage…

What is the output from listing the alarm systems?

Not sure what do you mean…
Can you explain to me.
Im not so sure on this… :frowning:

https://dresden-elektronik.github.io/deconz-rest-doc/endpoints/alarmsystems/#get-all-alarm-systems