Device State Monitor Multi-Hub - UPDATED 2026-07-02

The built-in "Lights" button in Hubitat's Home page has these drawbacks:

  • It lists lights, switches, and outlets with no control over which of those get shown; many times I don't care about the ON state of certain switches which I know will stay ON (e.g., my porch light at night).
  • It only lists devices in the hub on which it is running.
  • It does not check for the OFF state of selected devices, such as a fireplace.
  • It cannot turn devices OFF (or ON).

I wasn't finding any apps that worked across multple hubs, so I spent some time with Claude AI and ChatGPT and came up with the attached app. It can monitor devices on up to 3 hubs (it could be expanded to more, but I only have 3 hubs at present) and has these features:

  • Hub #1 devices are queried locally (and optionally via Maker API if you want to expose an ON or OFF toggle).
  • Hubs #2 & #3 are queried via Maker API. Connection credentials are collapsible once configured.
  • All hubs have separate ON-monitor and OFF-monitor device pickers.
  • Only switch-capable devices appear in device picker selection lists and reports.
  • Toggle buttons in each table row: "Turn OFF" in the ON table, "Turn ON" in the OFF table, and both "β†’ ON" / "β†’ OFF" in the optional Unknown table (catches devices reporting neither ON nor OFF).
  • Toggle commands for Hub #1 use a separate optional Maker API credential block.
  • Toggle commands for Hubs #2 & #3 reuse their existing Maker API credentials.
  • All three tables are independently sortable (click headers or Sort Options).
  • Device names link to their hub's Devices page.
  • A Refresh Table button re-queries all hubs on demand.
  • Graceful (hopefully) error handling if a remote hub is offline or unreachable.
  • Optional toggle to exclude virtual devices from all reports.

The remote hub UI is a bit clunky because of limitation's in Hubitat's UI features, and I could not get the collapse/expand behavior to be well-behaved, but it works (for me at least).

UPDATE 2026-04-30: When a device is selected for both the ON and OFF reports, the device name is in bold orange with a star. I use this feature primarily to prominently show when a device that should be OFF at night is still ON (e.g., a fireplace).

2026-07-02 - v. 1.59: Now provides 6 live tables:

  • ON Devices β€” switch-capable devices currently reporting ON

  • OFF Devices β€” switch-capable devices currently reporting OFF

  • Unknown State β€” switch-capable devices reporting neither ON nor OFF

  • Lock State β€” explicitly selected lock devices showing their current lock state (locked/unlocked) and battery level

  • Contact Sensors β€” explicitly selected contact sensors; by default only sensors currently open are listed ("N open of M monitored"), with an option to show every selected sensor and its state

  • Health / Activity Monitor β€” any device (switch or otherwise) that is OFFLINE, INACTIVE, NOT PRESENT, DISCONNECTED, or whose last activity exceeds a configurable time threshold

Above the tables, a Hubitat Safety Monitor (HSM) status badge shows the current intrusion arm state and any active alert. The alert display is verified against the hub itself on every Refresh (not just driven by events), and HSM on Hubs #2 and #3 can optionally be shown as well.

Device names are clickable links to their hub's device edit page. When Maker API credentials are configured, the State cell in the ON and OFF tables is clickable to toggle the device without leaving the page.

This is beta software (and likely always will be).

Example output:

The code is now too large to post in this Forum, but you can fetch it (along with a User Guide document) from here:
https://raw.githubusercontent.com/JohnFLand/Device-State-Monitor-Multi-Hub/refs/heads/main/Device_State_Monitor_Multi-Hub.groovy

4 Likes