ptz0n/homebridge-verisure

Exclude selected devices by name

Opened this issue · 1 comments

Use case

I use some of my smart plugs to support "mission critical" infrastructure, IT and techincal loads. I only want to disconnect these in case of an emergency, such as a fire. I cannot depend on HomeKit being available during a fire. As such, I have set up an automation in the Verisure app, that in case of a fire alarm, will turn off these loads. This has the potential to stop the source of the fire (smoke) before it spreads. I believe that this is a sensible use-case.

I also use homebridge-verisure to expose devices to HomeKit, to control other non-critical smart plugs, monitor temperatures, doors and windows etc.. This is very useful to our family.

Feature suggestion

Siri and HomeKit sometimes makes mistakes, and simple commands such as "Siri, turn off all lights" from time to time ends up turning off all sockets, or other similar misunderstandings. For simple devices such as lamps and speakers, this has little consequence, but I want to prevent HomeKit from accidentally turning off the critical IT loads that should only ever be turned off in the case of a fire.

Because of this, I would very much appreciate the possibility to prevent certain named Verisure devices from being exposed to HomeKit. Unfortunately, my JS skill is limited, and my git skills are basically non-existed. I have managed to cobble together this simple code that achieves what I want, but not in a beautiful way.

Notional implementation

After

deviceTypes[deviceType].forEach((deviceConfig) => {
, I have added a new line 101:

if (deviceConfig.device.area.includes("Emergency")) {
    this.logger.error('Skipping device: ' + deviceConfig.device.area);
    return;
}

This achieves what I want. It would probably be better if this didn't use a hard-coded string, but rather referenced an array specified in the config file. Unfortunately, I don't know how to code this, and I don't know how to make pull requests on github. I assume that this is a simple case for a skilled developer.

Any takers for this feature suggestion? Thank you for putting in the time and effort to make this homebridge plugin 🙂

Great use case and addition to the plugin. I would argue that using the Verusire identifier/serial is more robust than using its name. The latter is mutable.

I'll keep this issue open until implemented. Please consider sponsoring the project: https://www.paypal.com/paypalme/ptz0n