Skip to main content

Transmitter

:::info Status Implemented (core registry, claim, config, commands, health) — reflects docs/device-management-architecture-summary.md's "transmitter half mature" assessment. Hardware/broker-scale decisions below are explicitly Planned/Proposed. :::

A transmitter is a mosque-installed, Azan360-owned device that drives the mosque's amplifier — it plays received broadcasts through the mosque's PA system, and (optionally) can capture live audio itself and push it into a broadcast. It has no owner — see Ownership — so its authorization chain is simpler than a stream player's: registry + ACTIVE + inventory + mosque assignment is sufficient, with no membership check.

What it does

CapabilityDetail
Plays broadcastsReceives play commands over MQTT, streams the Icecast mount through the mosque's PA
Captures live audio (opt-in, per unit)A dedicated authenticated WebSocket uplink — not MQTT — feeds the same FFmpeg → Icecast pipeline any live broadcast uses. See MQTT — Transmitter Audio Uplink
Reports presence/healthLWT + heartbeat + stale detection via core/device_status.py, core/device_alerts.py

Registry (transmitter-facing) API

mosque_devices.py, reused as-is per the architecture summary's "Reuse" verdict — identity, provisioning flows, setup codes, retained config, and versioning all shipped:

MethodPathPurpose
GET/POST/api/v1/mosque-devices/mosque/{mosque_id}List / register transmitters for a mosque
GET/api/v1/mosque-devices/pendingApproval queue
GET/PATCH/api/v1/mosque-devices/{device_id}Detail / edit
DELETE/api/v1/mosque-devices/{device_id}Remove
POST/api/v1/mosque-devices/{device_id}/cmdSend a device command
POST/api/v1/mosque-devices/{device_id}/force-claimSuperadmin override of a stuck claim
POST/api/v1/mosque-devices/{device_id}/regenerate-setup-codeNew pairing code
POST/api/v1/mosque-devices/{device_id}/regenerate-broadcast-secretNew audio-uplink credential (see Audio Uplink)
POST/api/v1/mosque-devices/{device_id}/maintenanceMaintenance mode
POST/api/v1/mosque-devices/{device_id}/factory-resetReset
POST/api/v1/mosque-devices/claimField claim
POST/api/v1/mosque-devices/announceField announce
GET/api/v1/mosque-devices/{device_id}/eventsEvent history
GET/api/v1/mosque-devices/{device_id}/healthUptime, heartbeat, last azaan, errors
GET/PUT/api/v1/mosque-devices/recommended-firmwareFleet-wide recommended firmware pointer

Lifecycle, binding, and authorization behavior is the shared model — see Device Lifecycle and Device Authorization. Full endpoints for inventory/transitions/approval live under the unified registry: see Device Management module.

Wire protocol

Topic structure, commands, events, and retained config: MQTT Protocol.

Planned / Proposed — not yet decided

Per docs/device-management-architecture-summary.md's "Needs a Decision" table, these are open, not implemented behavior:

ItemStatusNote
BOM freeze — receiver part (A2DP + network audio concurrently, secure boot, anti-rollback, A/B OTA)ProposedBlocks all firmware work once frozen; cannot be retrofitted
Entitlement lease length (7 days proposed)Proposed defaultMust be tied to broker recovery time, not a standalone number — see Playback Entitlement
Broker deployment sizing / HA planProposedA single EMQX node suffices for the pilot; a named trigger (~2,000 units) needed for HA migration
Stream-token TTL (120s proposed)ProposedNeeds confirmation against weak-link retry behavior

Full sequencing: Roadmap — Transmitter.