I tried to load the Hubitat Hub Controller from GitHub - dcmeglio/hubitat-hubcontroller with a "New driver" command from Drivers code. It is not found so I did a copy/paste from hubitat-hubcontroller/drivers/Hub_Controller.groovy. The code was not rejected and it shows on The Drivers Code section.
I then attempted to create a virtual driver but the "actuator" type does not show up.
I want to use the code to shut the hub down on a power failure.
The hub -s a C-8 with version 2.3.7.140.
It's not "actuator" that you look for when creating a virtual device. In the Type list, scroll to the very bottom and then scroll up to find "Hubitat Hub Controller"
I agree that the Hub Information Driver v3 is a better choice, since it's actively maintained. However, for SMALL, it's hard to beat Hubitat Hub Controller
Good call, I was not understanding what the problem was exactly. I think you are right though, they are having a hard time finding it in the Driver/Type list.
Thank you - I loaded the new driver and created a virtual device called 'HubShutdown'. The device contains, among others, the command 'shutdown'. I have a test app that will execute the shutdown command. I create the action type 'Set Variable, Mode or File, Run Custom Action' then select 'Run Custom Action'. I then select the capability as 'Actuator'. I then must 'Select Actuators to act on'. I want the command to act on the Hub to shut it down, but the selection list is just my lighting devices.
Sorry, I have a habit of calling RM rules apps. To long programming I suppose.
Your note is exactly what I needed. I am using the Hub information Driver v3. My hub has security set so I hacked the code to explicitly set the username and password. I suspect there are better ways to accomplish this but they aren't obvious in the driver.
Thanks - I did finally find the fields for username and password. I had looked for them earlier when I found the switches for 'Hub Security Enabled' and 'Allow Hub to be shutdown or rebooted' but missed the others. The code now works correctly for my application.
I have the HUB on a UPS and a Ring Alarm Range Extender. The Ring goes into battery mode when the power goes off and starts a timer in a RM rule. The UPS runs for ca. 50 minutes with its current load and the HUB is shutdown after ca. 30 minutes to be safe.