Skip to content

Models

Django model domains, managers, and querysets. Import each model from its defining domain module; the micboard.models package intentionally does not re-export model classes.

micboard.models.hardware

Source

Hardware model domain.

micboard.models.hardware.charger

Source

Charger and charger slot models for wireless equipment charging and storage.

Charger

Bases: models.Model

Source

Charger unit for field wireless devices (bodypacks, handheld, IEM receivers).

save(*args: Any, **kwargs: Any) -> None

Source

Keep the IP-ownership check and row write in one transaction.

ChargerSlot

Bases: models.Model

Source

Individual charging slot on a charger unit.

Decoupled from WirelessUnit to allow multiple different devices to dock over time without link rot.

micboard.models.hardware.display_wall

Source

Display wall and kiosk models for stage/monitor display management.

DisplayWall

Bases: models.Model

Source

Physical display kiosk/screen showing stage/charger status.

Represents a single physical display (monitor/TV/kiosk) positioned in a venue showing real-time performer status, RF channel info, and battery levels. Multiple walls can exist in the same location (e.g., stage monitor, backstage display, FOH position).

clean() -> None

Source

Reject refresh rates that can storm clients or overflow browser timers.

WallSection

Bases: models.Model

Source

Section of a display wall assigned to show charger performers.

A display wall can be divided into sections, each showing a different charger’s docked devices and their performers. Sections define layout and positioning (grid cells, carousel, etc.).

micboard.models.hardware.wireless_chassis

Source

WirelessChassis model: Base station/rack unit for wireless audio systems.

Represents the PHYSICAL CHASSIS/RACK UNIT (stationary, rack-mounted hardware with IP/location). NOT the field devices (wireless units) — those are represented by the WirelessUnit model.

This chassis supports polymorphic RF roles:

  • receiver: Chassis receives RF signals from field wireless units (traditional wireless mics) Example: Shure AD4Q receives from 4 field wireless microphones
  • transmitter: Chassis sends IEM mixes to field wireless units (in-ear monitoring) Example: Shure PSM sends monitor mixes to performers
  • transceiver: Chassis both receives mic signals AND sends IEM mixes (hybrid bidirectional) Example: Sennheiser Spectera Base (64 ch total: 32-in + 32-out)

Each chassis is tied to a manufacturer and model, looked up in device_specifications.yaml for RFChannel capacity, Dante support, and device capabilities.

Field devices (wireless units: bodypacks, handhelds, IEM receivers) are represented by the WirelessUnit model and link back to their host chassis via base_chassis FK.

Architecture & Future-Proofing Notes: *** Bidirectional Systems (Sennheiser Spectera model): Spectera Base uses WMAS technology to duplexer 64 total channels: 32 RF channels receiving mic signals FROM field SEK bodypacks + 32 RF channels sending IEM mixes TO the SAME field units (or others). Each SEK is a transceiver simultaneously capturing mic audio and playing back IEM. The model handles this via transceiver role + bidirectional RF channels with separate metrics for RX/TX.

*** Multi-Protocol/License-Pool Systems (Shure Axient ANX4 model): ANX4 is a receiver that can simultaneously host both Axient Digital AND ULX-D wireless units on the same 4 channels. This is handled as a receiver role with 4 RF channels, where each channel can accept either protocol family at runtime. Floating channel licensing (multiple wireless units per RF channel) is tracked via WirelessUnit.active statuses and channel_link references.

*** Future-Proofing: New wireless systems should map to existing roles (receiver/transmitter/transceiver) and channel directions (receive/send/bidirectional) without requiring code changes. Role and direction enums are intentionally manufacturer-agnostic. When adding new vendors or models, ask: Is this receiving, transmitting, or both? Does each channel have a single direction or multiple? If patterns don’t fit, it’s a signal to revisit the architecture rather than patch with new roles.

WirelessChassis

Bases: models.Model

Source

BASE STATION/RACK UNIT for wireless audio systems (receiver/transmitter/transceiver).

This model represents the STATIONARY, RACK-MOUNTED chassis hardware. NOT the field-side wireless units (which are WirelessUnit model instances).

The chassis’ RF role determines its function:

  • receiver role: Receives RF from field wireless units (traditional wireless mics)
  • transmitter role: Sends IEM mixes to field wireless units
  • transceiver role: Both receive and send (hybrid systems like Sennheiser Spectera)

Field wireless units link to their host chassis via WirelessUnit.base_chassis FK. RFChannel represents RF communication channels/slots on this chassis.

save(*args: Any, **kwargs: Any) -> None

Source

Keep the IP-ownership check and row write in one transaction.

delete(*args: Any, **kwargs: Any) -> tuple[int, dict[str, int]]

Source

Keep delete receivers and the row deletion in one transaction.

get_expected_channel_count() -> int

Source

Get expected number of channels based on device model.

micboard.models.hardware.wireless_unit

Source

WirelessUnit model for field wireless audio devices.

Represents field-side wireless devices (bodypacks, handheld, IEM receivers, etc.) with awareness of device type:

  • mic_transmitter: Sends mic audio to chassis (traditional wireless mics)
  • iem_receiver: Receives IEM mix from chassis (in-ear monitoring)
  • transceiver: Both send mic and receive IEM (e.g., Sennheiser Spectera SEK)

Tracks battery levels, RF quality, link quality, and device state. Links to WirelessChassis base unit and RFChannel for RF path tracking.

WirelessUnitQuerySet

Bases: TenantOptimizedQuerySet

Source

Enhanced queryset for WirelessUnit model with tenant filtering.

for_user(user: Any) -> WirelessUnitQuerySet

Source

Return units reachable through the user’s monitoring-group scope.

WirelessUnit

Bases: models.Model

Source

Field-side wireless audio device (bodypack, handheld, IEM receiver, etc.).

micboard.models.monitoring

Source

Monitoring model domain.

micboard.models.monitoring.alert

Source

UserAlertPreference

Bases: models.Model

Source

Global alert preferences per user.

Device-specific preferences override these defaults.

is_quiet_hours(current_time: time | None = None) -> bool

Source

Check if current time is within quiet hours.

Alert

Bases: models.Model

Source

Stores alert history for auditing and tracking.

micboard.models.monitoring.group

Source

Group models for logical organization of devices, channels, and users.

Contains:

  • MonitoringGroup: Robust team/permission grouping.

MonitoringGroup

Bases: models.Model

Source

Represents a group of users who monitor specific devices together.

Useful for organizing teams (e.g., “Theater Tech Team”, “Conference Room A Staff”).

MonitoringGroupLocation

Bases: models.Model

Source

Intermediary model for MonitoringGroup and Location, specifying access scope.

micboard.models.monitoring.performer

Source

Performer model for device users assigned to wireless units.

PerformerQuerySet

Bases: TenantOptimizedQuerySet

Source

Query helpers for performers with tenant awareness.

for_user(user: Any) -> PerformerQuerySet

Source

Return performers managed by one of the user’s active monitoring groups.

In single-tenant mode, unassigned performers remain available so an operator can create their first assignment. MSP mode cannot safely expose a tenantless performer, so it only returns performers already linked through a tenant-scoped assignment.

Performer

Bases: models.Model

Source

Represents a performer/talent with assigned wireless devices.

Performers are device users (musicians, actors, speakers, etc.) who use WirelessUnits. They are separate from Users (technicians/admins) who monitor and manage the devices.

get_assigned_units() -> QuerySet[Any]

Source

Get all wireless units assigned to this performer.

get_monitoring_groups() -> QuerySet[Any]

Source

Get all monitoring groups that manage this performer.

micboard.models.monitoring.performer_assignment

Source

Performer assignment model linking performers to wireless units.

PerformerAssignmentQuerySet

Bases: TenantOptimizedQuerySet

Source

Query helpers for performer assignments with tenant awareness.

for_user(user: Any) -> PerformerAssignmentQuerySet

Source

Return assignments in the user’s active monitoring groups.

active() -> PerformerAssignmentQuerySet

Source

Get all active assignments.

PerformerAssignment

Bases: models.Model

Source

Assignment of a performer to a wireless unit.

Represents the link between a performer (talent) and the wireless device they will use. Allows multiple performers to share units across different events/sessions, and tracks metadata about each assignment.

micboard.models.locations

Source

Location hierarchy model domain.

micboard.models.locations.structure

Source

Location hierarchy models for physical device placement tracking.

Provides three-tier location structure: Building > Room > Location. Used for device assignment, movement tracking, and spatial organization.

Optional multi-tenancy support:

  • MICBOARD_MULTI_SITE_MODE: Adds site FK to Building
  • MICBOARD_MSP_ENABLED: Uses indexed organization and campus identifiers on Building

Building

Bases: models.Model

Source

Represents a physical building.

Multi-tenancy support:

  • site: Optional Django Site FK (when MICBOARD_MULTI_SITE_MODE=True)
  • organization_id: Optional Organization identifier (when MICBOARD_MSP_ENABLED=True)
  • campus_id: Optional Campus identifier (when MICBOARD_MSP_ENABLED=True)

clean() -> None

Source

Require a campus to belong to the selected organization.

Room

Bases: models.Model

Source

Represents a room within a building.

Location

Bases: models.Model

Source

Represents a specific point of interest within a building and room.

This model links to Building and Room for structured location management.

micboard.models.settings

Source

Database-backed settings model domain.

micboard.models.settings.registry

Source

Settings registry models for database-backed configuration.

SettingDefinition

Bases: models.Model

Source

Defines a setting that can be configured by admins.

clean() -> None

Source

Validate defaults and preserve the contract of stored overrides.

parse_value(raw_value: str) -> Any

Source

Parse raw string value according to setting type.

serialize_value(value: Any) -> str

Source

Serialize value to string for storage.

Setting

Bases: models.Model

Source

Actual setting values, scoped by organization/site/manufacturer.

get_parsed_value() -> Any

Source

Get the parsed value according to definition type.

clean() -> None

Source

Require one target matching the definition’s declared scope.

set_value(value: Any) -> None

Source

Set value and automatically serialize.

micboard.models.telemetry

Source

Telemetry model domain.

micboard.models.telemetry.health

Source

API health monitoring and logging models.

APIHealthLog

Bases: models.Model

Source

Logs API availability and health status for manufacturers.

micboard.models.telemetry.sessions

Source

Wireless unit session and sample models for telemetry tracking.

WirelessUnitSession

Bases: models.Model

Source

Represents a period where a wireless unit is considered active.

WirelessUnitSample

Bases: models.Model

Source

A single data point captured during a wireless unit session.

micboard.models.discovery

Source

Discovery model domain.

micboard.models.discovery.configuration

Source

Configuration models for managing manufacturer service configurations.

Allows admin to:

  • Enable/disable services
  • Override configuration values
  • Validate configuration
  • Track configuration changes

ManufacturerConfiguration

Bases: models.Model

Source

Configuration for a manufacturer service.

Allows admin-level configuration overrides and validation. Replaces environment variables and settings.py configuration.

clean() -> None

Source

Validate before saving.

micboard.models.discovery.discovery_queue

Source

Discovery queue and device movement tracking.

DiscoveryQueue

Bases: models.Model

Source

Staging area for discovered devices awaiting admin approval before import.

Implements the “Do you want to import these discovered items?” workflow.

DeviceMovementLog

Bases: models.Model

Source

Tracks when devices change IP addresses or physical locations.

Used for auditing and alerting when devices move in the network.

micboard.models.discovery.manufacturer

Source

Manufacturer model for device vendor registry.

Manufacturer

Bases: models.Model

Source

Represents a device manufacturer with audit logging.

micboard.models.discovery.registry

Source

Discovery job and configuration models.

MicboardConfig

Bases: models.Model

Source

Global configuration settings.

DiscoveryCIDR

Bases: models.Model

Source

CIDR ranges to be used for discovery scans.

DiscoveryFQDN

Bases: models.Model

Source

FQDN patterns or hostnames to resolve for discovery.

DiscoveryJob

Bases: models.Model

Source

Records an on-demand or automatic discovery job run.

DiscoveredDevice

Bases: models.Model

Source

Represents a device discovered on the network but not yet configured.

This model is manufacturer-agnostic and stores device discovery information from any manufacturer API (Shure, Sennheiser, Audio-Technica, etc.). Manufacturer-specific fields are stored in the metadata JSONField.

micboard.models.realtime

Source

Real-time connection model domain.

micboard.models.realtime.connection

Source

Models for tracking real-time connections and subscriptions.

RealTimeConnectionQuerySet

Bases: models.QuerySet['RealTimeConnection']

Source

Every state a realtime connection can be moved into, defined once.

Each transition is a bulk update, so a single row held by the subscription runner and a changelist selection made in the admin go through the same definition and cannot drift into different spellings of the same state.

mark_connecting() -> int

Source

Record that a connection attempt is in progress.

The error history is deliberately preserved: a reconnect is not yet a success.

mark_connected() -> int

Source

Record an established connection and clear every trace of the last failure.

record_message() -> int

Source

Record message activity, establishing a connection that was still pending.

Live rows are moved first. Establishing pending rows first would leave them matching the status="connected" filter as well, counting one row twice.

mark_error(error_message: str) -> int

Source

Record one redacted transport error, counting consecutive failures.

mark_disconnected() -> int

Source

Record an unintentional loss of the connection.

mark_stopped() -> int

Source

Record an intentional connection stop.

reset_errors() -> int

Source

Clear a stale error count without claiming the connection is back.

RealTimeConnection

Bases: models.Model

Source

Tracks real-time connections (SSE/WebSocket) for wireless chassis.

micboard.models.rf_coordination

Source

RF coordination model domain.

micboard.models.rf_coordination.compliance

Source

Regulatory compliance models for RF coordination.

Provides models to track regulatory domains (FCC, ETSI), excluded frequency ranges, and compliance rules for specific locations.

RegulatoryDomain

Bases: models.Model

Source

Regulatory body or region governing RF spectrum usage (e.g., FCC, ETSI).

FrequencyBand

Bases: models.Model

Source

Specific frequency band within a regulatory domain.

ExclusionZone

Bases: models.Model

Source

Geo-fenced area with specific frequency exclusions (e.g., near TV towers).

micboard.models.rf_coordination.rf_channel

Source

RFChannel model for directional RF communication channels on a wireless chassis.

Each RF channel represents an RF communication path with direction awareness:

  • receive: Field devices send to chassis (traditional wireless mics)
  • send: Chassis sends to field devices (IEM systems)
  • bidirectional: Both directions (hybrid systems like Sennheiser Spectera)

RFChannelQuerySet

Bases: TenantOptimizedQuerySet

Source

Enhanced queryset for RFChannel model with tenant and direction filtering.

for_user(user: User) -> RFChannelQuerySet

Source

Filter RF channels accessible to user via monitoring groups.

RFChannel

Bases: models.Model

Source

Represents a directional RF communication channel on a wireless chassis.

micboard.models.users

Source

User model domain.

micboard.models.users.user_profile

Source

User profile extensions for technicians and administrators.

Extends standard User with role and monitoring preferences. Performers (talent/device users) are represented by the Performer model.

UserProfile

Bases: models.Model

Source

Profile extending standard User for technicians and administrators.

Technicians and admins monitor and manage performer assignments and wireless devices within their assigned MonitoringGroups.

get_monitoring_groups() -> models.QuerySet

Source

Get all monitoring groups this user is a member of.

get_accessible_performers() -> models.QuerySet

Source

Get all performers accessible through user’s monitoring groups.

get_accessible_devices() -> models.QuerySet

Source

Get all wireless units accessible through user’s monitoring groups.

micboard.models.users.user_views

Source

User-specific view configurations and layout preferences.

Stores per-user dashboard configurations including selected views, filter preferences, and display settings. Enables personalized monitoring experiences for different operators and administrators.

UserView

Bases: models.Model

Source

Persist a user’s saved dashboard view configuration.

micboard.models.audit

Source

Audit and activity logging model domain.

micboard.models.audit.activity_log

Source

Activity logging models for comprehensive audit trail.

Tracks all CRUD operations, service syncs, and system events.

ActivityLog

Bases: models.Model

Source

Comprehensive activity log for all system operations.

Tracks CRUD operations, service sync events, and system activities.

ServiceSyncLog

Bases: models.Model

Source

Detailed log of service synchronization events.

duration_seconds() -> int

Source

Get sync duration in seconds.

micboard.models.audit.configuration_log

Source

Audit log for configuration changes.

ConfigurationAuditLog

Bases: models.Model

Source

Audit log for configuration changes.

micboard.models.band_plans

Source

Band plan specifications: frequency ranges and regional allocations.

Loads band plan specifications from fixtures/band_plans.yaml. Each band plan defines a frequency range, region, and name for wireless microphone systems.

get_band_plan(manufacturer: str | None, band_plan_key: str | None) -> dict | None

Source

Look up band plan specifications by manufacturer and band plan key.

Parameters:

  • manufacturer (str | None) — Manufacturer code (e.g., “shure”, “sennheiser”)
  • band_plan_key (str | None) — Band plan identifier (e.g., “g50”, “aw_plus”)

Returns:

  • dict | None — Band plan dict with keys: name, min_mhz, max_mhz, region
  • dict | None — None if not found

get_available_band_plans(manufacturer: str | None) -> list[tuple[str, str]]

Source

Get list of available band plans for a manufacturer.

Parameters:

  • manufacturer (str | None) — Manufacturer code (e.g., “shure”, “sennheiser”)

Returns:

  • list[tuple[str, str]] — List of (key, name) tuples for all available band plans
  • list[tuple[str, str]] — Empty list if manufacturer not found

parse_band_plan_from_name(name: str) -> dict | None

Source

Parse frequency range from a band plan name string.

Attempts to extract min/max frequencies from common name patterns like:

  • “G50 (470-534 MHz)”
  • “Aw+ (470-558 MHz)”
  • “Block 470 (470-537 MHz)”

Parameters:

  • name (str) — Band plan name string

Returns:

  • dict | None — Dict with ‘min_mhz’ and ‘max_mhz’ if parsing successful
  • dict | None — None if unable to parse

detect_band_plan_from_api_string(api_band_value: str | None, manufacturer: str | None = 'shure') -> str | None

Source

Detect and return band plan name from API frequencyBand string.

Uses module-level helpers to keep this function concise and easier to maintain; strategies include exact key match, code-prefix match, exact frequency-range match, and partial string match.

get_band_plan_from_model_code(manufacturer: str | None, model: str | None) -> str | None

Source

Get default band plan for a device model based on manufacturer specs.

Some device models have a default/standard band plan. For example:

  • Shure ULX-D G5 variant is typically G50 band
  • Sennheiser ew 100 G3 might be A band

Parameters:

  • manufacturer (str | None) — Manufacturer code
  • model (str | None) — Device model string

Returns:

  • str | None — Band plan name if model has a standard band plan, None otherwise

micboard.models.device_specs

Source

Device specifications: channel capabilities, roles, and features.

Loads specifications for wireless audio devices from fixtures/device_specifications.yaml. Each device is characterized by:

  • Role: receiver (receives from field), transmitter (sends to field), or transceiver (both)
  • Channels: number of RF channels
  • Dante: whether it supports Dante audio networking
  • Bodypack capability: what types of field devices it can work with

Supported Manufacturers: Shure, Sennheiser, Wisycom, ULBACO, etc.

get_device_spec(manufacturer: str | None, model: str | None) -> dict | None

Source

Look up device specifications by manufacturer and model.

Parameters:

  • manufacturer (str | None) — Manufacturer code (e.g., “shure”, “sennheiser”, “wisycom”)
  • model (str | None) — Device model string (e.g., “AD4Q”, “Spectera Base”)

Returns:

  • dict | None — Spec dict with keys: channels, role, dante, name, models
  • dict | None — None if not found

get_channel_count(manufacturer: str | None, model: str | None) -> int

Source

Get channel count for a device.

Parameters:

  • manufacturer (str | None) — Manufacturer code (e.g., “shure”, “sennheiser”)
  • model (str | None) — Device model string

Returns:

  • int — Number of channels (defaults to 4 if unknown)

get_device_role(manufacturer: str | None, model: str | None) -> str

Source

Get device role/type.

Parameters:

  • manufacturer (str | None) — Manufacturer code
  • model (str | None) — Device model string

Returns:

  • Role (str) — “receiver”, “transmitter”, or “transceiver”
  • str — Defaults to “receiver” if unknown

get_dante_support(manufacturer: str | None, model: str | None) -> bool

Source

Check if device supports Dante audio networking.

Parameters:

  • manufacturer (str | None) — Manufacturer code
  • model (str | None) — Device model string

Returns:

  • bool — True if device has Dante support

micboard.models.integrations

Source

Integration models for managing external manufacturer API connections.

ManufacturerAPIServer

Bases: models.Model

Source

Manage multiple API servers per manufacturer across different locations.

clean() -> None

Source

Validate API server configuration.

to_config_dict() -> dict

Source

Convert to configuration dict format for API client initialization.

Accessory

Bases: models.Model

Source

Track field unit accessories like lav mics, packs, IEM earbuds, etc.

micboard.models.base_managers

Source

Enhanced model managers with tenant support and optimizations.

Base classes for all models to support:

  • Multi-tenancy (organization, campus, site)
  • Optimization hints (select_related, prefetch_related)
  • Common filtering patterns

OrganizationLike

Bases: Protocol

Source

Structural tenant identifier accepted by queryset filters.

TenantOptimizedQuerySet

Bases: models.QuerySet[_ModelT]

Source

Base QuerySet with tenant filtering and optimization methods.

Provides the canonical tenant filters and common ORM optimizations.

supports_membership_scope() -> bool

Source

Return whether this model has an explicit tenant ownership path.

for_site(site_id: int | None = None) -> TenantOptimizedQuerySet[_ModelT]

Source

Filter by Django Site (multi-site mode).

for_memberships(memberships: Sequence[tuple[int, int | None]]) -> TenantOptimizedQuerySet[_ModelT]

Source

Filter through explicit organization/campus membership identifiers.

for_user(user: Any) -> TenantOptimizedQuerySet[_ModelT]

Source

Filter based on user permissions and tenant context.

Respects MSP, multi-site, and single-site modes.

micboard.models.mixins

Source

Migration-stable model mixins.

DiscoveryTriggerMixin

Source

Migration-stable marker retained for historical model state loading.