Locations & Areas
RIoT organizes physical infrastructure through a four-tier hierarchy: Tenant > Location > Area > Device. Locations represent discrete sites or facilities. Areas subdivide locations into operational zones. Devices are assigned to areas, anchoring every sensor reading to a specific place in your organization's topology. All data is isolated by tenant -- cross-tenant access is impossible by design.
Hierarchy Overview
Every entity in the platform belongs to exactly one path through this tree:
Tenant
└── Location
└── Area
└── Device
└── Sensor Reading
Tenant -- The top-level isolation boundary. A tenant maps to an organization or business unit. All locations, areas, devices, users, and data belong to a single tenant.
Location -- A physical or logical site: a factory, warehouse, well pad, greenhouse, or office building. Locations carry a name, optional description, and geospatial metadata (coordinates stored via PostGIS). Each tenant can have many locations.
Area -- A subdivision within a location. Areas represent zones, floors, production lines, rooms, or any other meaningful partition. Each location can have many areas.
Device -- A registered ESP32 data logger deployed in the field. Each device is assigned to exactly one area. Sensor readings inherit the device's placement in the hierarchy, enabling queries scoped to any level -- from an entire tenant down to a single zone.
This structure drives access control, data partitioning, and query scoping throughout the platform. Backend queries always filter by tenant first, then narrow through the tree.
Managing Locations
Navigate to Locations (/locations) to view all locations registered to your tenant. The page displays each location's name, description, area count, and device count.
Creating a Location
- Select Add Location.
- Enter a name (e.g.,
Main Warehouse,North Field Site). Names must be unique within the tenant. - Optionally add a description to provide context for operators.
- Optionally set coordinates (latitude and longitude) to place the location on the map view.
- Confirm to create the location.
The new location appears in the list immediately. It contains no areas until you add them.
Editing a Location
- Click a location row to open its detail page.
- Select Edit to modify the name, description, or coordinates.
- Save changes.
Renaming a location does not affect devices or data already associated with it. References are maintained by internal ID, not by name.
Deleting a Location
- Open the location detail page.
- Select Delete.
- Confirm the action.
A location can only be deleted if it contains no areas. Remove or reassign all areas first.
Managing Areas
Areas are managed from within a location's detail page. Navigate to Locations (/locations) and click a location to view its areas.
Creating an Area
- From the location detail page, select Add Area.
- Enter an area name (e.g.,
Zone 4,Floor 2,Assembly Line B). Names must be unique within the parent location. - Optionally add a description.
- Confirm to create the area.
Editing an Area
- Click an area row to open its detail view.
- Select Edit to modify the name or description.
- Save changes.
Deleting an Area
- Open the area detail view.
- Select Delete.
- Confirm the action.
An area can only be deleted if it contains no assigned devices. Reassign or remove all devices first.
Assigning Devices
Devices are placed into the hierarchy by assigning them to a specific area within a location. Assignment can happen at registration time or afterward.
During Registration
When registering a new device on the Devices page (/devices), select a location and area in the registration form. This is optional -- devices can be registered without placement and assigned later.
After Registration
- Navigate to Devices (
/devices) and click the target device. - On the device detail page, select Edit.
- Choose a location from the dropdown. The area dropdown populates with areas belonging to that location.
- Select an area and save.
The device's sensor readings are now scoped to the selected location and area. Historical readings retain their original placement -- reassigning a device does not retroactively change past data.
From the Area Detail View
- Navigate to a location, then click into an area.
- The area detail view lists all devices currently assigned to it.
- Select Assign Device to add an existing device to this area.
- Choose a device from the list of unassigned or differently-assigned devices.
Bulk Reassignment
To move multiple devices between areas, use the Devices page filters to select devices by their current location and area. Select multiple devices and use the Reassign action to move them to a new area in a single operation.
Use Cases
Factory with Production Lines
A manufacturing facility creates a single location (Plant A), then defines areas for each production line (Line 1, Line 2, Line 3). Temperature, vibration, and humidity sensors on each line are assigned to the corresponding area. Operators filter dashboards by area to monitor conditions on a specific line without noise from adjacent equipment.
Greenhouse with Climate Zones
A commercial greenhouse operation uses one location per greenhouse (Greenhouse North, Greenhouse South). Each greenhouse is divided into areas by climate zone (Zone A - Tropical, Zone B - Arid, Zone C - Temperate). Soil moisture and air temperature devices in each zone report independently, enabling per-zone irrigation and HVAC control.
Office Building with Floors
A facilities management team models a multi-story building as a single location (HQ - Downtown). Each floor becomes an area (Floor 1, Floor 2, Floor 3). Air quality and occupancy sensors on each floor feed into floor-level dashboards. Building-wide aggregations roll up from the location level, while floor-specific views isolate data for targeted maintenance decisions.