kdietrich / homebridge-devolo

WARNING: this repo is not maintained anymore. Homebridge plugin for Devolo Home Control
16 stars 4 forks source link

Wish: Exclude Device #23

Closed KiboOst closed 7 years ago

KiboOst commented 7 years ago

Would it be possible to specify some device we do not want in HomeKit ? Something like in config.json:

"deviceBlacklist" : ["device1", "device2"],

We don't need every single device in HomeKit ;-) Nothing urgent but could help in some cases.

KiboOst commented 7 years ago

Not tested but should work: In HBDevoloCentralUnit.js:

line 63 after var d = null; if (self.config.deviceBlacklist && self._isInWhitelist(devices[i].constructor.name, self.config.deviceBlacklist)) continue;

ramsnerm commented 7 years ago

I had to modify slightly the above code to work for me:

if (self.config.deviceBlacklist && self._isInWhitelist(devices[i].name, self.config.deviceBlacklist)) continue;

With this change I can now filter devices by their Name (e.g Doorbell).

PS: For an easier follow-up myself I created an fork combining the modifications from KiBost and my one in one repo from which I can clone my local install.

KiboOst commented 7 years ago

Arg sorry for the error lol Being able to install from your own repo is nice, didn’t though about that lol !! I will let Kevin integrate them if he want in a next update anyway, too much forks isn’t so good for clarity ;-)

ramsnerm commented 7 years ago

... too much forks isn’t so good for clarity - I agree on that, normally I make it as private repos in gitlab but this time I thought is nice to share until a new official version is available.

kdietrich commented 7 years ago

Thank you guys! This is available in latest master.