I have 6 hubs in my environment at the moment and I am a heavy user of hubmesh. I find myself doing the same tedious task over and over again though when I'm removing hubmeshed devices and that is browsing to every hub's device list and searching for the device to see if it is in use on that hub.
Example using LightA as the device to be removed:
- Checking LightA's device page on the hub it is installed on and check "in use by" and I find that "Hub mesh" is using the device. (There is no indication from here as to what other hubs are using the device.)
- Browse to the next hub's device page, do a search to see if LightA is installed here (and if so perform required steps to remove LightA from apps and then remove it from hub).
- Repeat above step for every hub in the environment.
- Back to the first hub, turn off hub mesh sharing for LightA and then remove the device from the hub
What I would like to be able to do is to use a PowerShell script to search for a device by name across the installed devices of all hubs. I would have to be able to somehow get a device list from each hub first though that I could search through. Is there such an endpoint available? Worst case scenario, I can screen scrape the device list, but I'd rather it didn't get to that
Alternatively, is there a way to do this creating a Groovy app that could periodically spit out a list of all installed devices on that hub to a csv file in file manager? I've never written any apps, so it will be a learning curve for me, but I have written some drivers.
Edit: Or even better would be if the hub would be able to list what other hubs are using the device and show that in the In Use By list. For example:
In use by:
Room Lighting
Hub mesh
Hub mesh - HE hub Upstairs
Hub mesh - HE hub Garage