howanghk / homebridge-ewelink

Homebridge plugin to control Sonoff relays with OEM firmware
MIT License
81 stars 46 forks source link

HomeKit type of accesory #46

Closed mladjan closed 4 years ago

mladjan commented 4 years ago

Im using sonoff SV in inching mode to open garage door, and this works fine. Issue is that I need to say siri "turn on garage door" which is stupid :) Is there any way to represent a switch as garage door accessory? After that I will be able to tell "Open garage door". Note: I don't use a sensor for garage door and its not important to me to know if its closed or not (at least for now).

mladjan commented 4 years ago

Or is there any way of "overriding" type of accessory?

howanghk commented 4 years ago

Hi @mladjan, different type of accessory have quite different implementation in HomeKit, it's not as simple as changing the type.

In the homebridge-ewelink-max plugin we emulate a switch in HomeKit, as most ewelink accessories only have on and off state. In HomeKit a GarageDoorOpener is quite different from a Switch. A switch only have a on/off toggle. A GarageDoorOpener have a CurrentDoorState, TargetDoorState and ObstructionDetected characteristics.

As a workaround, you may want to create a custom Siri shortcut "Open garage door" for the purpose.

Duplicate of https://github.com/howanghk/homebridge-ewelink/issues/23