Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing accessories/options #14

Open
weedgrease opened this issue Nov 2, 2016 · 8 comments
Open

Removing accessories/options #14

weedgrease opened this issue Nov 2, 2016 · 8 comments

Comments

@weedgrease
Copy link

Thanks for all of your work!
I see in the code the ability to delete accessories is supported but how does one actually do that? Does the deletion persist through reboots of Homebridge?

Also, is it possible to delete certain things like Ambient Light values and things? Occasionally, when asking Siri to change the color of the bulb, these options seem to confuse her.

@devbobo
Copy link
Owner

devbobo commented Nov 3, 2016

@kevingelion currently, removing Accessories or adding/removing Services and/or Characteristics is only supported using the app Hesperus (which is free from the App Store).

Device removal is persisted through reboot, but I haven't implemented a bulb ignore list, so if the bulb is still on the network, it will be re-added after the reboot.

@weedgrease
Copy link
Author

@devbobo gotcha, thanks! i implemented an array of serial numbers and it will ignore bulbs that arent in that list because i have some friends that have bulbs omn our network that i dont want to have access to. any suggestions around this or is this the best i can do?

@cakefornoreason
Copy link

@kevingelion Any chance you might be willing to share your version with the ignore list? Now that LIFX has implemented HomeKit in their newer bulbs, I’d find it super useful since I’ve got a mix of old and new.

@devbobo
Copy link
Owner

devbobo commented Sep 22, 2017

@cakefornoreason the current version supports an ignoreList

You can add to the config file like this...

    {
      "platform": "LifxLan",
      "name": "LIFX",
      "ignoredDevices": [
        "d073d50165c7",
        "d073d5018ce2",
        "d073d5018e42",
        "d073d5206894",
        "d073d520546e"
      ]
    }
  ]

@devbobo
Copy link
Owner

devbobo commented Sep 22, 2017

alternatively, if you use the Herperus app, there is a Configuration option which allows you to add/remove a bulb from the Ignore List, using this method doesn't require you to restart Homebridge to actively ignore a bulb. I may need to write a wiki article explaining how to do that.

@cakefornoreason
Copy link

@devbobo Thanks for this info! I didn’t realize you could modify the config file that way, but I’ve tried it and it works perfectly for what I need. That said, I’ve used Hesperus before, and actually tried using the Ignore function there, but can’t seem to get it to work. Tapping “Add accessory” in the ignore flow just looped back on itself without actually displaying a list, and after I modified the config file with the ignore list, using the “Remove accessory” option in Hesperus looped the same way.

Knowing about the ignore list solves my problem, but I figured that odd behavior might be worth mentioning. Thanks for the info and your work on this project!

@schwie
Copy link

schwie commented Jul 14, 2019

I'm chiming in a bit late to this conversation, but seems relevant. I am using the advice in this thread to ignore 4 of my LIFX devices from this project's wonderful plugin. I added the following lines to my config.json file:

    {
        "platform": "LifxLan",
        "name": "LiFx",
        "ignoredDevices": [
            "d073xxxxxed4",
            "d073xxxxx754",
            "d073xxxxx2dc",
            "d073xxxxx8d1"
        ]
    },

Doing this ignores the first device, ending in "ed4", but the remaining devices listed above are not ignored. Am I doing something wrong? Has anyone been able to ignore more than a single LIFX device?

@schwie
Copy link

schwie commented Jul 14, 2019

Figured it out! The "Remove" action is indeed activating on my Homebridge and it reports each activation to my Homebridge log when the "ignoredDevice" is turned on by other means, as seen in the log, below. Note, 2dc (north bulb) and 8d1 (south bulb) are LIFX BR30 bulbs that are usually off at the wall switch and only resume reporting to the Homebridge after they are turned on by the wall switch, which happened at 9:40am:

[7/14/2019, 12:25:07 AM] Homebridge is running on port 51826.
[7/14/2019, 12:25:08 AM] [LiFx] Remove: LIFX 2efed4
[7/14/2019, 12:25:08 AM] [LiFx] Online: Liam’s Bedroom [d073xxxxx834]
[7/14/2019, 12:25:09 AM] [Config] Console v4.5.1 is listening on :: port 8080
[7/14/2019, 12:25:20 AM] [LiFx] Liam’s Bedroom - Get power: 0
[7/14/2019, 12:26:23 AM] [LiFx] Liam’s Bedroom - Get power: 0
[7/14/2019, 12:35:12 AM] [LiFx] Liam’s Bedroom - Get power: 0
[7/14/2019, 12:35:54 AM] [LiFx] Liam’s Bedroom - Get power: 0
[7/14/2019, 12:43:05 AM] [LiFx] Liam’s Bedroom - Get power: 0
[7/14/2019, 12:43:07 AM] [LiFx] Liam’s Bedroom - Get power: 0
[7/14/2019, 12:43:14 AM] [LiFx] Liam’s Bedroom - Get power: 0
[7/14/2019, 12:49:10 AM] [LiFx] Liam’s Bedroom - Get power: 0
[7/14/2019, 12:49:41 AM] [LiFx] Liam’s Bedroom - Set power: 1
[7/14/2019, 12:49:50 AM] [LiFx] Liam’s Bedroom - Set power: 0
[7/14/2019, 12:49:51 AM] [LiFx] Liam’s Bedroom - Set power: 1
[7/14/2019, 12:50:20 AM] [LiFx] Liam’s Bedroom - Set power: 0
[7/14/2019, 1:02:54 AM] [LiFx] Liam’s Bedroom - Get power: 0
[7/14/2019, 2:03:36 AM] [LiFx] Liam’s Bedroom - Get power: 0
[7/14/2019, 3:08:26 AM] [LiFx] Liam’s Bedroom - Get power: 0
[7/14/2019, 3:37:37 AM] [LiFx] Liam’s Bedroom - Get power: 0
[7/14/2019, 4:08:33 AM] [LiFx] Liam’s Bedroom - Get power: 0
[7/14/2019, 5:08:41 AM] [LiFx] Liam’s Bedroom - Get power: 0
[7/14/2019, 6:17:39 AM] [LiFx] Liam’s Bedroom - Get power: 0
[7/14/2019, 7:22:06 AM] [LiFx] Liam’s Bedroom - Get power: 0
[7/14/2019, 8:23:23 AM] [LiFx] Liam’s Bedroom - Get power: 0
[7/14/2019, 9:40:16 AM] [LiFx] Remove: Liam’s South Bulb
[7/14/2019, 9:40:16 AM] [LiFx] Remove: Liam’s North Bulb
[7/14/2019, 10:52:19 AM] [LiFx] Liam’s Bedroom - Get power: 0
[7/14/2019, 10:52:26 AM] [LiFx] Liam’s Bedroom - Get power: 0
[7/14/2019, 10:52:38 AM] [LiFx] Liam’s Bedroom - Get power: 0
[7/14/2019, 10:55:18 AM] [LiFx] Liam’s Bedroom - Get power: 0
[7/14/2019, 10:56:30 AM] [LiFx] Remove: LIFX xxx754
[7/14/2019, 10:56:51 AM] [LiFx] Online: Ella’s Light Strip [d073xxxxx02e]
[7/14/2019, 10:57:19 AM] [LiFx] Ella’s Light Strip - Set power: 0
[7/14/2019, 10:57:21 AM] [LiFx] Ella’s Light Strip - Set power: 1

Also, 754 (a LIFX Z strip, first gen) was unplugged, when it was powered up at 10:56am, it was successfully removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants