Adapting Caddx Panel to work with HomeKitLink Siri

Posted on
Thu Sep 08, 2022 1:01 pm
donhoffman offline
Posts: 51
Joined: May 26, 2011
Location: Portland, OR and Livingston, MT

Adapting Caddx Panel to work with HomeKitLink Siri

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

Posted on
Thu Sep 08, 2022 10:37 pm
GlennNZ offline
User avatar
Posts: 1556
Joined: Dec 07, 2014
Location: Central Coast, Australia

Re: Adapting Caddx Panel to work with HomeKitLink Siri

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

Posted on
Fri Sep 09, 2022 8:37 am
donhoffman offline
Posts: 51
Joined: May 26, 2011
Location: Portland, OR and Livingston, MT

Re: Adapting Caddx Panel to work with HomeKitLink Siri

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

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 2 guests