Deconz: new REST endpoint for alarm system

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

Sorry…

{
“1”:{
“config”:{
“armed_away_entry_delay”:0,
“armed_away_exit_delay”:0,
“armed_away_trigger_duration”:0,
“armed_night_entry_delay”:0,
“armed_night_exit_delay”:0,
“armed_night_trigger_duration”:0,
“armed_stay_entry_delay”:0,
“armed_stay_exit_delay”:0,
“armed_stay_trigger_duration”:0,
“armmode”:“disarmed”,
“configured”:true,
“disarmed_entry_delay”:0,
“disarmed_exit_delay”:0
},
“devices”:{
“00:0d:6f:00:13:4e:bf:8c-01-0501”:{
“armmask”:“none”
}
},
“name”:“Huset”,
“state”:{
“armstate”:“disarmed”,
“seconds_remaining”:0
}
}
}

I can´t figure out how my code should be to create a second alarmsystem…

https://dresden-elektronik.github.io/deconz-rest-doc/endpoints/alarmsystems/#create-alarm-system

you can use the deconz.configure service in home assistant, based on the first example in create-alarm-system it should be something like

{"field": "/alarmsystems", "data": {"name": "Guest house alarm system"}}

Ok, but were should i set this string?
Configuration payload?

I copy paste your example with wrongmessage…

Thanks for your help!!

But i dont understand how i should use it…
i´m a newbee on this…

Ok, lets take a step back. Do you not know how to use services or is it that you don’t understand to apply my suggestions on the service?

I´m not sure how to use service and how to think in deConz and REST API.

Newbee…

Ok. Then you need to look into how home assistant services work and then you can revisit what I wrote about the deConz configure service. :slight_smile:

You can find a lot on the home assistant web page and look in the forums.

Using the services aren’t more complicated than visiting the services page in your ha instance, selecting the deConz configure service and follow the instructions

Ok.
The only problem i have is how i should change this line, so i can made a second alarmsystem.

curl -X POST http://172.30.33.3:40850/api//alarmsystems

This line create a default alarmsystem with id 1.