Adapting Caddx Panel to work with HomeKitLink Siri

A plugin to integration Indigo devices into HomeKit (and Siri)
donhoffman
Posts: 51
Joined: Thu May 26, 2011 5:25 pm
Location: Portland, OR and Livingston, MT

Adapting Caddx Panel to work with HomeKitLink Siri

Post by donhoffman »

So am actively working on the Caddx security panel plugin (...just finished the SDK v3 / Python 3 work). Now that the hood is up and all the tool laid out, would now like it to show up as a HomeKit Security Systems. Not sure what that entails. Could someone give me some hints as to where to start my understanding of what I need to do? Pointing me at some relevant source code would probably do it.

Thx,
Don
User avatar
GlennNZ
Posts: 1873
Joined: Sun Dec 07, 2014 3:33 pm
Location: Central Coast, Australia

Re: Adapting Caddx Panel to work with HomeKitLink Siri

Post by GlennNZ »

Hi

Ideally:

2 Plugin -> HomeKitLink issues:
1.
Ideally your plugin will need to report the state of the alarm, or alarm partition in homekit security format - and as a device state within your plugin.

Eg.

Joe had started with Simplisafe plugin - although we haven’t finished integration as yet.

https://github.com/FlyingDiver/Indigo-S ... evices.xml

& state conversion here:

Code: Select all

 
HK_ALARM_STAY_ARMED = 0
HK_ALARM_AWAY_ARMED = 1
HK_ALARM_NIGHT_ARMED = 2
HK_ALARM_DISARMED = 3
HK_ALARM_TRIGGERED = 4
HOMEKIT_STATE = {
    simplipy.system.SystemStates.ALARM:         HK_ALARM_TRIGGERED,
    simplipy.system.SystemStates.ALARM_COUNT:   HK_ALARM_TRIGGERED,
    simplipy.system.SystemStates.AWAY:          HK_ALARM_AWAY_ARMED,
    simplipy.system.SystemStates.AWAY_COUNT:    HK_ALARM_AWAY_ARMED,
    simplipy.system.SystemStates.ENTRY_DELAY:   HK_ALARM_AWAY_ARMED,
    simplipy.system.SystemStates.ERROR:         HK_ALARM_DISARMED,
    simplipy.system.SystemStates.HOME:          HK_ALARM_STAY_ARMED,
    simplipy.system.SystemStates.HOME_COUNT:    HK_ALARM_STAY_ARMED,
    simplipy.system.SystemStates.OFF:           HK_ALARM_DISARMED,
    simplipy.system.SystemStates.TEST:          HK_ALARM_DISARMED,
    simplipy.system.SystemStates.UNKNOWN:       HK_ALARM_DISARMED,
}

Code: Select all

<State id="homekit_state" defaultValue="">
                <ValueType>Number</ValueType>
                <TriggerLabel>HomeKit State</TriggerLabel>
                <ControlPageLabel>HomeKit State</ControlPageLabel>
            </State>

2.
You will within your plugin a ActionGroup that ideally responses to homekit states for HK plugin to change states.

https://github.com/FlyingDiver/Indigo-S ... ctions.xml

Code: Select all

    <Action id="homekit_set_mode" uiPath="hidden">
        <CallbackMethod>homekit_set_mode</CallbackMethod>
    </Action>
    <Action id="set_mode" deviceFilter="self.system">
        <Name>Set Mode</Name>
        <CallbackMethod>action_set_mode</CallbackMethod>
        <ConfigUI>
            <Field id="mode" type="menu" defaultValue="away">
                <Label>Mode:</Label>
                <List>
                    <Option value="off">Off</Option>
                    <Option value="home">Home</Option>
                    <Option value="away">Away</Option>
                </List>
            </Field>
        </ConfigUI>
    </Action>

3/
I’ll need to add support to HomeKitLink to recognise and support your security device type, running the above action when off, home or away selected.

Hopefully makes sense.



Glenn


Sent from my iPad using Tapatalk
donhoffman
Posts: 51
Joined: Thu May 26, 2011 5:25 pm
Location: Portland, OR and Livingston, MT

Re: Adapting Caddx Panel to work with HomeKitLink Siri

Post by donhoffman »

Thanks. Extremely helpful. Will be starting on it next week when I am at location with panel.
Post Reply

Return to “HomeKitLink Siri”