jxwolstenholme / btsmarthub_devicelist

Retrieve a list of devices from a bt smarthub or bt smarthub 2 on a local network
MIT License
12 stars 4 forks source link

IPV6 addresses can lock a device in an active state #25

Open typhoon2099 opened 2 years ago

typhoon2099 commented 2 years ago

I've noticed this with a Mac Book Pro and a USB-C Dock where an IPV6 address is assigned by my Mac Book Pro, and for some reason the Smart hub thinks this is still active after the device has been switched off.

There's a question here around how to handle this. The default for this library should be to use the Active value returned by the SmartHub, but there are also individual values for IPV4/6 which could be optionally turned on/off. This is really a big in the SmartHub, but there's no way of fixing that so we should add some sort of optional mitigation (mostly because I want my office lights to turn on/off when the dock is in use 😜).

typhoon2099 commented 1 year ago

Having another look at this. It looks like it's regarded as active because a Link Local address is still present on the device in the smart hub. I'm not sure why it's classed as active when it's not connected. I need to do some reading on Link Local addresses...