snowdd1 / homebridge-knx

KNX platform shim for homebridge
https://github.com/nfarina/homebridge
GNU General Public License v2.0
97 stars 56 forks source link

Security Alarm #100

Open migabc opened 7 years ago

migabc commented 7 years ago

Hi, Does anyone here know how to set up the security alarm? I'm trying to use this config but I cannot get these 2 characteristics to work with each other.

    {
        "DeviceName": "Security System",
        "Services": [
            {
                "ServiceType": "SecuritySystem",
                "ServiceName": "Intruder Alarm",
                "Characteristics": [
                    {
                        "Type": "SecuritySystemCurrentState",
                        "Listen": [
                            "8/3/1"
                        ]
                    },
                    {
                        "Type": "SecuritySystemTargetState",
                        "Set": [
                            "8/3/11"
                        ],
                        "Listen": [
                            "8/3/11"
                        ]
                    }
                ]
            },

Characteristic.SecuritySystemCurrentState.UUID = '00000066-0000-1000-8000-0026BB765291';

// The value property of SecuritySystemCurrentState must be one of the following: Characteristic.SecuritySystemCurrentState.STAY_ARM = 0; Characteristic.SecuritySystemCurrentState.AWAY_ARM = 1; Characteristic.SecuritySystemCurrentState.NIGHT_ARM = 2; Characteristic.SecuritySystemCurrentState.DISARMED = 3; Characteristic.SecuritySystemCurrentState.ALARM_TRIGGERED = 4;

/**

Characteristic.SecuritySystemTargetState = function() { Characteristic.call(this, 'Security System Target State', '00000067-0000-1000-8000-0026BB765291'); this.setProps({ format: Characteristic.Formats.UINT8, perms: [Characteristic.Perms.READ, Characteristic.Perms.WRITE, Characteristic.Perms.NOTIFY] }); this.value = this.getDefaultValue(); };

inherits(Characteristic.SecuritySystemTargetState, Characteristic);

Characteristic.SecuritySystemTargetState.UUID = '00000067-0000-1000-8000-0026BB765291';

// The value property of SecuritySystemTargetState must be one of the following: Characteristic.SecuritySystemTargetState.STAY_ARM = 0; Characteristic.SecuritySystemTargetState.AWAY_ARM = 1; Characteristic.SecuritySystemTargetState.NIGHT_ARM = 2; Characteristic.SecuritySystemTargetState.DISARM = 3;

ctschach commented 7 years ago

What exactly is the problem? I just set up a test with your config (just with different Addresses).

Whenever I click on a state in the SecuritySystem, it's writing it to the Address defined in "SecuritySystemTargetState".

The symbol in the Home App still shows busy until you set the "SecuritySystemCurrentState" to the target state.