Closed bernesto closed 6 years ago
I have no idea why, after three versions, it is still done this way...
Open sensor_pod.js
in /usr/lib/node_modules/homebridge-wink3/dist/devices
and find replace the code for the Service.Door.
// service: Service.Door,
service: Service.ContactSensor,
supported: isDoor,
characteristics: [{
// characteristic: Characteristic.CurrentPosition,
characteristic: Characteristic.ContactSensorState,
// get: state => state.opened ? 100 : 0
get: state => {
if (state.opened)
return Characteristic.ContactSensorState.CONTACT_NOT_DETECTED;
else
return Characteristic.ContactSensorState.CONTACT_DETECTED;
}
// }, {
// characteristic: Characteristic.PositionState,
// value: Characteristic.PositionState.STOPPED
}]
Afterwards, delete the cachedAccessories
file in .homebridge/accessories
in order for the devices to be readied (thus ensuring no duplicates).
Once added, you can change the type - Window, Blinds, Door, ContactSensor, Garage Door Opener - all show different icons.
I submitted a fix for this, check #54, hopefully it will get merged soon!
I’ll be merging the fix soon, sorry for the delay.
Hmm, I need to learn how to do this fix and merge stuff... I have a few fixes....
@sibartlett No need to be sorry, we all appreciate your hard work on this!
The fix is merged.
Not sure if this is a HomeKit issue or a Wink3 issue. But all of my door sensors report as openable/closable. So if you tap one, it says "Opening..." until you actually open and close the door again.