QR links to /location/show/{id} or filtered spool list
Template shows: location name, path (Office > Shelf A > Bin 1)
Scan to see all spools in that location
Implementation:
Add location label printing (similar to spool/filament labels)
Reuse existing QR label components
Location-specific template variables
4. Drybox Labels (Dynamic Content)
For single-spool locations like dryboxes:
Label on drybox shows CURRENT spool inside
Updates when spool is moved
Options:
A) QR links to location → shows current spool
B) E-ink display integration (future)
C) Print new label when spool changes
5. Exclusive Location Validation
Mark locations as "single spool only" (drybox mode)
Prevent assigning multiple spools to same exclusive location
Warning if spool already assigned elsewhere
Database Changes
classLocation(Base):id:intname:strparent_id:Optional[int]# NEW - for hierarchyis_exclusive:bool=False# NEW - single spool only# existing fields...classLocationField(Base):# NEWid:intlocation_id:intkey:strvalue:str
UI Changes
Location list: show as tree or flat with breadcrumbs
Location detail: show child locations, custom fields, current spool(s)
Print labels button on location pages
## Summary
Comprehensive improvements to the location system: hierarchical structure, custom fields, QR code labels, and drybox management.
## Upstream Issues
- https://github.com/Donkie/Spoolman/issues/763 - Custom fields for locations (temp/humidity sensors)
- https://github.com/Donkie/Spoolman/issues/90 (8 comments) - Location labels for dryboxes
## Features
### 1. Hierarchical Locations (Room → Shelf → Bin)
Allow nested location structure:
```
Office
└── Shelf A
├── Bin 1
└── Bin 2
└── Shelf B
Garage
└── Dry Box 1
└── Dry Box 2
```
**Implementation:**
- Add `parent_id` foreign key to Location model
- UI: tree view or breadcrumb navigation
- Spool can be assigned to any level (room, shelf, or bin)
### 2. Custom Fields for Locations
Track environmental data at location level (not per-spool):
- Temperature
- Humidity
- Custom fields (like spools/filaments already have)
**Use case:** Sync Home Assistant sensors to dryer box locations.
**Implementation:**
- Add LocationField table (like SpoolField, FilamentField)
- API endpoints for custom field CRUD
### 3. QR Code Labels for Locations
Print QR labels for bins/shelves/dryboxes:
- QR links to `/location/show/{id}` or filtered spool list
- Template shows: location name, path (Office > Shelf A > Bin 1)
- Scan to see all spools in that location
**Implementation:**
- Add location label printing (similar to spool/filament labels)
- Reuse existing QR label components
- Location-specific template variables
### 4. Drybox Labels (Dynamic Content)
For single-spool locations like dryboxes:
- Label on drybox shows CURRENT spool inside
- Updates when spool is moved
- Options:
- A) QR links to location → shows current spool
- B) E-ink display integration (future)
- C) Print new label when spool changes
### 5. Exclusive Location Validation
- Mark locations as "single spool only" (drybox mode)
- Prevent assigning multiple spools to same exclusive location
- Warning if spool already assigned elsewhere
## Database Changes
```python
class Location(Base):
id: int
name: str
parent_id: Optional[int] # NEW - for hierarchy
is_exclusive: bool = False # NEW - single spool only
# existing fields...
class LocationField(Base): # NEW
id: int
location_id: int
key: str
value: str
```
## UI Changes
- Location list: show as tree or flat with breadcrumbs
- Location create/edit: parent selector dropdown, exclusive checkbox
- Location detail: show child locations, custom fields, current spool(s)
- Print labels button on location pages
tonym
changed title from Hierarchical Location Support (Room/Bin) to Enhanced Locations: Hierarchy, Custom Fields, QR Labels2026-01-16 04:28:49 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
Comprehensive improvements to the location system: hierarchical structure, custom fields, QR code labels, and drybox management.
Upstream Issues
Features
1. Hierarchical Locations (Room → Shelf → Bin)
Allow nested location structure:
Implementation:
parent_idforeign key to Location model2. Custom Fields for Locations
Track environmental data at location level (not per-spool):
Use case: Sync Home Assistant sensors to dryer box locations.
Implementation:
3. QR Code Labels for Locations
Print QR labels for bins/shelves/dryboxes:
/location/show/{id}or filtered spool listImplementation:
4. Drybox Labels (Dynamic Content)
For single-spool locations like dryboxes:
5. Exclusive Location Validation
Database Changes
UI Changes
Hierarchical Location Support (Room/Bin)to Enhanced Locations: Hierarchy, Custom Fields, QR Labels