I called up Schlage to ask for their API documentation
They told me to go pound sand.
Well, my Schlage Sense locks are controlled by Homekit, so maybe I can hack something
In Paper UI
I setup a generic MQTT Thing with a Switch channel and a Number channel.
I then linked channels to an appropriate Item.
They show up and in Paper UI control… I can toggle the switch and set the number
I then created the Homekit Items file
Group SchlageShadow "Schlage Shadow" <lock> {homekit = "Lock"}
Number SchlageShadow_LockedState "Locked" (SchlageShadow) {homekit = "Lock.LockCurrentState"}
Switch SchlageShadow_LockCommand "Command" (SchlageShadow) {homekit = "Lock.LockTargetState"}
I can now see a Lock in my iPhone Home App
Toggling the lock in the Home app toggles the Lock command in the Paper UI
So my problem is I can never see the lock state in the iPhone Home app. It always just shows “unknown”
When I set the lock state in the Paper UI, in the OH log I see
2020-08-29 11:16:43.123 [ome.event.ItemCommandEvent] - Item 'SchlageShadow_LockState' received command 0
2020-08-29 11:16:43.124 [nt.ItemStatePredictedEvent] - SchlageShadow_LockState predicted to become 0
2020-08-29 11:16:43.128 [vent.ItemStateChangedEvent] - SchlageShadow_LockState changed from 1.0 to 0.0
So I don’t know why the iPhone Home app is not showing the intended state.
I’m guessing that OH is not sending Homekit an Integer 0, but a floating 0.0
Any suggestions?
My first intention is to set up Homekit automations that cause the Homekit Schlage Shadow device state to follow the real Schlage device state.
The OH MQTT Thing was just a convenient way to create the Schlage Shadow device. I am not trying to use MQTT for anything.