Auto Room Sorter
For a long time I didn’t see much point in organizing devices by Hubitat rooms. Hubitat was never an interface for me — it was a programming backend. I used Google Home or SmartThings to actually control the devices sitting on the hub.
That changed with Modern Dashboard (mDash). mDash lays devices out from your Hubitat room assignments — pick devices, and the rooms and names come from the hub. Easy Dashboards use rooms too, though differently: Hubitat can generate an Easy Dashboard per room (Rooms → Generate dashboards) that stays in sync as you add or remove devices from that room, and the device picker can filter by room. Rooms suddenly matter.
The catch: organizing hundreds of devices by hand is a pain. I tried browser automation. It’s slow, cumbersome, and AI usually quits halfway through, misunderstands labels, and takes forever. Auto Room Sorter does the same job in a couple of minutes.
It reads device labels, detects room names already in them, creates any missing rooms, and assigns unassigned devices into those rooms. Already-assigned devices are never moved.
How it works
- Scan — Reads devices (including children) and existing rooms. Every hub room is already a match target, so
Saadya's Room LightmatchesSaadya's Roomwith no setup. Catalog aliases are merged in (Outdoor …→ your existingOutsideroom,LR→ Living Room, and so on). - Step 1 — Rooms — Review detected rooms. Existing rooms are reused (never duplicated, never renamed). New rooms can be created. Edit aliases; rename new rooms if you want.
- Step 2 — Preview & sort — Matches are grouped by suggested room. Override the target, skip a room, exclude individual devices, or bulk-assign leftovers that didn’t auto-match. Then Sort Devices.
There’s a one-level undo that restores each device’s previous room from the last sort (and can delete empty rooms created in that run). Unmatched child devices can inherit their parent’s room (on by default).
Matching
- Uses the device display label, not the driver type name.
- Longest / most-specific alias wins. Ties are flagged ambiguous in the preview so you can exclude or fix them before sorting.
- Short aliases like
LR/DRonly match as capitalized tokens with a trailing space (LR Light), so they don’t fire on random letters.
Install (HPM — recommended)
- Hubitat Package Manager → Install → search Auto Room Sorter.
- Apps → Add User App → Auto Room Sorter.
- If your hub requires login, enter those credentials in the app.
- Check the safety acknowledgment before creating rooms or sorting.
Prefer a hub backup before a large sort.
Manual install
Apps Code → New App → paste AutoRoomSorter.groovy (or Import from that URL) → Save. Then Apps → Add User App → Auto Room Sorter.
Caveats
Room create/assign is not in Hubitat’s public Groovy API. This app uses hub-local undocumented endpoints (verified on C-8 Pro firmware 2.5.1.143). Those can change with firmware. The app probes reads on open and runs a no-op write probe before the first write of a run.
This is a convenience tool for getting rooms in place so mDash has rooms to lay out, and Easy Dashboards can generate a dashboard per room. It is not a replacement for either.
Links
- Source & docs: github.com/evdev/Hubitat_auto_device-room_sorter
- mDash thread: Modern Dashboard (mDash)
Feedback welcome. If something matches wrong, the preview and exclusions are there so you can fix it before you sort.
If you feel like supporting my work buy me a coffee.