I just pushed out another update. There was a bug in the hub discovery code introduced when I merged my code to the repository. Sorry about that. I also updated the main app so that you do not have to unlink and relink the hub. If the hub is linked, selecting the hub will initiate a metadata refresh that will re-discover and once discovered, it will refresh all metadata to ensure the hub has all the latest v1 and v2 data to support the new v2 logic from the last update.
So now, if you change the IP address of your Hue hub, as long as it resides on the same LAN, simply selecting the hub in the app will find the hub at its new IP address, update the app with the new IP address, and then initiate a full sync with the hub.
Sorry guys. One more update. I think this version is better designed, and solves the most recent issue discovered. Hub re-linking and auto-discovery has been re-worked some more.
Okay, sorry if anyone needed to add or update their hub in that past few days. I finally broke out my developer hub (a C-7, so a good platform), and updated it. I installed just the AHB code, and repetitively installed the driver from scratch until I could consistently install, link and configure the hub. I then unlinked and relinked numerous times, and finally I went through the process of refreshing metadata (link relinking, without the linking step) until I could feel comfortable that this version should now work for everyone. In my experimentation, I discovered that I needed to update to a newer version of Hubitat software or I would see weird errors when connecting to the hub, so please make sure you are up to date.
Aside from fixing the hub linking that I broke, I added additional code so that the hub device, when newly created, does not throw exceptions before the metadata refresh process has completed. This change eliminates all erroneous errors in my logs that I was seeing during the hub linking process. I also update the logic for pausing the hub device activity to disable the refresh scheduler, and watchdog timers until the hub is fully operational again.
If you are updating from a much older version, after the update, be sure to launch the AHB app, and click on the hub device in the menu to force-refresh the hub's metadata. This is a required step to prepare the app for the new V2 API related behaviors.
@armand Do you see any problem adding capability "Sensor" to the Advanced Hue Light Sensor type? I use Sharptools and it doesn't pick them up unless this is included. I tried it manually on the device and it doesn't seem to impact anything else?
Done. I never needed this, because the capabilities I added are already sensor types, and it works in sharp tools for me, but it doesn’t hurt to add it.
I rolled it back you can restore functionality until I can loo closer at the issue. For some reason, I seem to remember there was something about sensor capability and that I removed it, but I could be remembering wrong. I’m not around a computer, I a doing all this on my phone today, so it’s safest to just roll back until I’m in front of a computer.
okay, it's back with motion, temp, and illuminance sensors support capability 'Sensor'. The problem with the last attempt is that while I am able to edit on a phone, sometimes I should not, because one of the three files had the capability defined as 'sensor' instead of 'Sensor'. this prevents the driver from compiling, that is the source of your issue.