Deconz: new REST endpoint for alarm system

Ok. Then I don’t know.

Ok.
Thx anyway.
I can try in DeConz forum…

Good luck!

Hi, sorry to bother and thanks for all the hard work!

I think this instruction is exactly what I need to do to get my Frient Keypad up and running. I just don’t understand how the keypad can be made a keypad in hass instead of a sensor.

The keypad is paired with deconz and I see the sensors for battery/tampering/motion. But the keypad device itself does not show up.

the deconz diagnostic log shows the correct state for the keypad, see below. But the alarm panel in HA is not updated when the keypad changes state. Could you point me in the right direction?

 "sensors": {
      "2": {
        "config": {
          "battery": 0,
          "on": true,
          "pending": [],
          "reachable": true
        },
        "ep": 44,
        "etag": "daa3a61f722f54eaf90488cad42b6a91",
        "lastannounced": null,
        "lastseen": "2023-10-16T16:51Z",
        "manufacturername": "frient A/S",
        "modelid": "KEPZB-110",
        "name": "AncillaryControl 2",
        "state": {
          "action": "disarmed",
          "lastupdated": "2023-10-17T21:28:45.093",
          "lowbattery": false,
          "panel": "disarmed",
          "seconds_remaining": 0,
          "tampered": false
        },
        "type": "ZHAAncillaryControl",
        "uniqueid": "00:15:bc:00:43:00:0d:20-2c-0501"
      },

If you don’t see the keypad in home assistant that means that you haven’t configured the alarm system to use the keypad device.

Thanks for the help! I tried that but it doesn’t seem to work.

Here is the current alarmsystem in deconz. The armmode was just set to armed_away via the keypad with the code that was set in deconz. I added the current device manually a few days ago since no device was added automatically. the conbee 2 firmware was updated a week ago or so.

[core-ssh ~]$ curl -X GET http://172.30.33.x:xxx/api/xxx/alarmsystems | jq
{
  "1": {
    "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": "armed_away",
      "configured": true,
      "disarmed_entry_delay": 0,
      "disarmed_exit_delay": 0
    },
    "devices": {
      "00:15:bc:00:43:00:0d:20-2c-0501": {
        "armmask": "none"
      }
    },
    "name": "xxx",
    "state": {
      "armstate": "exit_delay",
      "seconds_remaining": 117
    }
  }
}

the frient keypad looks like this:

{                                                                                                                                                                                                                                                                     
  "lastannounced": null,                                                                                                                                                                                                                                              
  "lastseen": "2023-10-17T21:21Z",                                                                                                                                                                                                                                    
  "manufacturername": "frient A/S",                                                                                                                                                                                                                                   
  "modelid": "KEPZB-110",                                                                                                                                                                                                                                             
  "name": "Presence 3",                                                                                                                                                                                                                                               
  "productid": "KEPZB-110 Keypad",                                                                                                                                                                                                                                    
  "subdevices": [                                                                                                                                                                                                                                                     
    {                                                                                                                                                                                                                                                                 
      "config": {                                                                                                                                                                                                                                                     
        "duration": {                                                                                                                                                                                                                                                 
          "lastupdated": null,                                                                                                                                                                                                                                        
          "value": null                                                                                                                                                                                                                                               
        },                                                                                                                                                                                                                                                            
        "on": {                                                                                                                                                                                                                                                       
          "lastupdated": "2023-10-02T23:57:01Z",                                                                                                                                                                                                                      
          "value": true                                                                                                                                                                                                                                               
        },                                                                                                                                                                                                                                                            
        "reachable": {                                                                                                                                                                                                                                                
          "lastupdated": "2023-10-17T08:01:11Z",                                                                                                                                                                                                                      
          "value": true                                                                                                                                                                                                                                               
        }                                                                                                                                                                                                                                                             
      },                                                                                                                                                                                                                                                              
      "state": {                                                                                                                                                                                                                                                      
        "presence": {                                                                                                                                                                                                                                                 
          "lastupdated": "2023-10-03T00:06:31Z",                                                                                                                                                                                                                      
          "value": false                                                                                                                                                                                                                                              
        }                                                                                                                                                                                                                                                             
      },                                                                                                                                                                                                                                                              
      "type": "ZHAPresence",                                                                                                                                                                                                                                          
      "uniqueid": "00:15:bc:00:43:00:0d:20-01-0406"                                                                                                                                                                                                                   
    },                                                                                                                                                                                                                                                                
    {                                                                                                                                                                                                                                                                 
      "config": {                                                                                                                                                                                                                                                     
        "battery": {                                                                                                                                                                                                                                                  
          "lastupdated": "2023-10-03T00:06:31Z",                                                                                                                                                                                                                      
          "value": 0                                                                                                                                                                                                                                                  
        },                                                                                                                                                                                                                                                            
        "on": {                                                                                                                                                                                                                                                       
          "lastupdated": "2023-10-02T23:57:01Z",                                                                                                                                                                                                                      
          "value": true                                                                                                                                                                                                                                               
        },                                                                                                                                                                                                                                                            
        "pending": {                                                                                                                                                                                                                                                  
          "lastupdated": "2023-10-10T22:27:15Z",                                                                                                                                                                                                                      
          "value": 0                                                                                                                                                                                                                                                  
        },                                                                                                                                                                                                                                                            
        "reachable": {                                                                                                                                                                                                                                                
          "lastupdated": "2023-10-17T08:01:11Z",                                                                                                                                                                                                                      
          "value": true                                                                                                                                                                                                                                               
        }                                                                                                                                                                                                                                                             
      },
      "state": {                                                                                                                                                                                                                                                      
        "action": {                                                                                                                                                                                                                                                   
          "lastupdated": "2023-10-17T23:15:38Z",                                                                                                                                                                                                                      
          "value": "armed_away"                                                                                                                                                                                                                                       
        },                                                                                                                                                                                                                                                            
        "lowbattery": {                                                                                                                                                                                                                                               
          "lastupdated": "2023-10-16T18:46:26Z",                                                                                                                                                                                                                      
          "value": false                                                                                                                                                                                                                                              
        },                                                                                                                                                                                                                                                            
        "panel": {                                                                                                                                                                                                                                                    
          "lastupdated": "2023-10-17T23:17:40Z",                                                                                                                                                                                                                      
          "value": "armed_away"                                                                                                                                                                                                                                       
        },                                                                                                                                                                                                                                                            
        "seconds_remaining": {                                                                                                                                                                                                                                        
          "lastupdated": "2023-10-17T23:17:38Z",                                                                                                                                                                                                                      
          "value": 0                                                                                                                                                                                                                                                  
        },                                                                                                                                                                                                                                                            
        "tampered": {                                                                                                                                                                                                                                                 
          "lastupdated": "2023-10-16T18:46:26Z",                                                                                   
          "value": false                                                                                                           
        }                                                                                                                          
      },                                                                                                                           
      "type": "ZHAAncillaryControl",
      "uniqueid": "00:15:bc:00:43:00:0d:20-2c-0501"                                                                                
    }                                                                                                                              
  ],                                                                                                                               
  "swversion": null,                                                                                                               
  "uniqueid": "00:15:bc:00:43:00:0d:20"                                                                                            
}                 

I tried adding the other subdevice and the device itself but that didn’t work:

[core-ssh ~]$ curl -X PUT http://172.30.33.x:xxx/api/xxx/alarmsystems/1/device/00:15:bc:00:43:00:0d:20-01-406 | jq                                                                                                                                          
[                                                                                                                                  
  {                                                                                                                                
    "error": {                                                                                                                     
      "address": "/alarmsystems/1",                                                                                                
      "description": "resource, /alarmsystems/1/device/00:15:bc:00:43:00:0d:20-01-406, not available",                                                                                                                                                                
      "type": 3                                                                                                                    
    }                                                                                                                              
  }                                                                                                                                
]                                                                                                                                  
[core-ssh ~]$ curl -X PUT http://172.30.33.x:xxx/api/xxx/alarmsystems/1/device/00:15:bc:00:43:00:0d:20 | jq                                                                                                                                                 
100   138  100   138    0     0   6266      0 --:--:-- --:--:-- --:--:--  6571                                                                                                                                                                                        
[                                                                                                                                  
  {                                                                                                                                
    "error": {                                                                                                                     
      "address": "/alarmsystems/1",                                                                                                
      "description": "resource, /alarmsystems/1/device/00:15:bc:00:43:00:0d:20, not available",                                                                                                                                                                       
      "type": 3                                                                                                                    
    }                                                                                                                              
  }                                                                                                                                
]

I guess I’m missing something, but what :slight_smile:

So you have a keypad entity in home assistant?

So your issue is no state update?

I am not sure to be honest. I see four entities, see image, but the keypad doesn’t seem to be among them. the armed_away state is reported by the deconz rest api in response to a GET /alarmsystems.

Doesn’t look like it. Can you share a debug log see instructions on integration documentation

Sorry it took so long to reply. After an HA restart the IP changed so I had to find your other post on the Phoscon forum to figure that out first :slight_smile:

Anyway I see this entity now! :

And i see this:

image

That should be good right? I just have to figure out how to connect the keypad state to the alarm system in HA. this panel does not update when I change the keypad state. Can you point me in the right direction?

image

It should update automatically… I know there was some issue reported on alarm systems on deconz GitHub, take a google there or on phoscon forums. I think you might be experiencing an issue on deconz side.