#Schlage SENSE HomeKit reversing

1 messages · Page 1 of 1 (latest)

halcyon gust
#

a

#

At this point the biggest question i have is how would services to manage lock codes be added to the HomeKit controller lock class (assuming that's where they get added) if the way the Schlage lock manages them is proprietary (unless it isn't)

hidden sierra
#

Oh it is

#

The uuids aren’t like any other HomeKit uuid so they are definitely not standardized

#

I think I need to get home and to a monitor to work through the options

#

I’d prefer to not register a service at all if the characteristic doesn’t exist

#

I don’t know if that’s possible with the way services work

halcyon gust
#

😬

hidden sierra
#

Does hass have a normal service call it uses to manage codes or is this non standard on the hass side too?

halcyon gust
#

Yeah nope there's no services

#

No rush particularly, I'm gonna get to sleep soon but whenever I'm up I can probably dig out the yet to be used Schlage sense lock to help with this

hidden sierra
#

I think for now let’s get it working as a bog standard entity service

#

We might be able to do an attribute filter? But I don’t know if that’s only for standardized attributes.

#

If we have to raise because a device doesn’t support it that’s fine

halcyon gust
#

This is my first foray into developing for Home Assistant and those terms are flying over my head

hidden sierra
#

Tbh I haven’t had to deal with services that much so it’s a bit new to me too

halcyon gust
#

ooo okay i see

#

i understand these better now

#

So am I going to need code in aiohomekit and home assistant or just home assistant? based on my brief look at aiohomekit it's quite light and is moreso a way for home assistant to talk to homekit accessories, not full controls for them?

hidden sierra
#

Yeah

#

So when I came along there wasn’t really an api for controllers

#

The api in homekit_python came up with was a fairly low level wrapper around the http requests documented in the hap spec

#

The Integration was rebased on that api and then we kept it when we forked

halcyon gust
#

I see

hidden sierra
#

Ideally more of the logic from HKDevice would be be in aiohomekit

#

there are some slow refactors in flight

halcyon gust
#

ah

hidden sierra
#

But it’s a bit unwieldy in places

#

You probably only need to hack around in lock.py

#

Add a entity service there, get the accessories object and that should have helpers to find a char by its uuid

halcyon gust
#

in home assistant right?

#

cool

hidden sierra
#

Yes

halcyon gust
#

i'll look into that

hidden sierra
#

When you have the char object you can call the out method with its iid

#

Well, the accessory aid and the char iid

#

The only change to aiohomekit would be (imo) the consts

#

Oh

#

And maybe any custom serialisation

halcyon gust
#

Yeah I still need to figure out the format of the data