Closed giase82 closed 7 years ago
Have to look up the characteristics. Reverse does only work with Boolean and Percentage types. First guess is that LockTargetState is an integer type with discrete values for states.
As I assumed, LockCurrentState
https://github.com/KhaosT/HAP-NodeJS/blob/master/lib/gen/HomeKitTypes.js#L900
is a UINT8 with values 0,1,2,3
LockTargetState
https://github.com/KhaosT/HAP-NodeJS/blob/master/lib/gen/HomeKitTypes.js#L972
is a UINT8 with values 0 or 1
So no Boolean value, even if it looks as if it was.
And Christof, could you read #61 for pasting code samples here? Thanks
If you need other values than the ones defined by homekit, you need to write another add-in. Like I needed for my ContactSensor, because the characteristic is a UINT8, too.
Ah makes sense! I was thinking the "old stuff" was working as before still... So in the time before addins, which code did the mapping? (I am asking as I would probably copy this one)
I recommend using ContactSensor add-in as an example, because the old code worked completely different - and I forced it to be Boolean in 0.2.
Ok, agree. We can close this then.
Hi,
I recognised that the "reverse" keyword does not change the behaviour of my LockMechanism. The door shows open when closed and the other way around. I tried both of the following configurations. What am I doing wrong?
and this
The Lock did not change its status.