Skip to Content
🚀 We just launched! Please star us on Github!

Spaces & Rooms

Spaces let you organize your devices by physical location — rooms, floors, and outdoor areas. This makes it easier to manage devices, build dashboards, and create scenes that target specific areas of your home.


How Spaces Work

Spaces use a two-level hierarchy:

  • Zones — larger groupings like floors or outdoor areas (e.g., “Ground Floor”, “Backyard”)
  • Rooms — individual spaces within zones (e.g., “Living Room”, “Kitchen”, “Bedroom”)

Rooms can optionally belong to a zone, but they can also exist independently.


Zone Categories

CategoryExamples
FloorsGround Floor, First Floor, Second Floor, Basement, Attic
OutdoorFront Yard, Backyard, Garden, Terrace, Balcony, Driveway
UtilityUtility areas, Security perimeter

Room Categories

CategoryExamples
Living areasLiving Room, Bedroom, Guest Room, Nursery
Kitchen & diningKitchen, Dining Room, Pantry
Service areasBathroom, Toilet, Laundry
UtilityGarage, Workshop, Office, Storage, Closet, Utility Room
EntertainmentMedia Room, Gym
AccessHallway, Entryway

Managing Spaces via the API

Create a zone

curl -X POST http://smart-panel.local:3000/api/spaces \ -H "Content-Type: application/json" \ -H "Authorization: Bearer <token>" \ -d '{ "data": { "name": "Ground Floor", "type": "zone", "category": "floor_ground", "icon": "mdi:home-floor-g" } }'

Create a room within a zone

curl -X POST http://smart-panel.local:3000/api/spaces \ -H "Content-Type: application/json" \ -H "Authorization: Bearer <token>" \ -d '{ "data": { "name": "Living Room", "type": "room", "category": "living_room", "parent_id": "<zone-uuid>", "icon": "mdi:sofa" } }'

Assign devices to a space

curl -X POST http://smart-panel.local:3000/api/spaces/<space-id>/assign \ -H "Content-Type: application/json" \ -H "Authorization: Bearer <token>" \ -d '{ "data": { "device_ids": ["<device-uuid-1>", "<device-uuid-2>"] } }'

List all spaces

curl http://smart-panel.local:3000/api/spaces \ -H "Authorization: Bearer <token>"

Get devices in a space

curl http://smart-panel.local:3000/api/spaces/<space-id>/devices \ -H "Authorization: Bearer <token>"

Space Properties

PropertyTypeRequiredDescription
namestringYesDisplay name
typestringYesroom or zone
categorystringYes (zones)Specific room/zone type
parent_idUUIDNoParent zone (rooms only)
iconstringNoMDI icon identifier (e.g., mdi:sofa)
display_ordernumberNoSort order in lists
suggestions_enabledbooleanNoEnable automation suggestions

Smart Suggestions

Smart Panel can analyze your device names and automatically suggest which spaces they belong to. Access this feature via:

curl http://smart-panel.local:3000/api/spaces/propose \ -H "Authorization: Bearer <token>"

This returns AI-powered suggestions based on device naming patterns — for example, a device named “Kitchen Light” would be suggested for a Kitchen room.

Space proposals are suggestions only. You still need to manually assign devices to confirm the placement.


Deleting a Space

When you delete a zone, its child rooms become orphaned (they still exist but lose their parent). When you delete a room, its assigned devices are unassigned.

curl -X DELETE http://smart-panel.local:3000/api/spaces/<space-id> \ -H "Authorization: Bearer <token>"

What’s Next?

  • Add devices to your spaces by following the Devices guide
  • Create room-specific Scenes that target devices in a space
  • Explore the API Reference for full endpoint documentation
Last updated on