Smart Mosque (sound desk)
Connect your mosque's Behringer X32 to moschee.io through the Smart-Mosque-Box, mute live, set up automations at Adhan and Iqama and link Home Assistant.
With Smart Mosque, moschee.io controls your mosque's sound desk: mute channels from the dashboard, the app and remote links, run automations at Adhan and Iqama, and switch Home Assistant entities such as the desk's power. The Smart-Mosque-Box, a small computer on the desk's network, makes this possible.
Beta
Smart Mosque is in beta. Only desks of the Behringer X32 family are supported for now (X32, X32 Compact, X32 Producer, X32 Rack, X32 Core).
Plan
Smart Mosque is included in the Gemeinde Plus and Reichweite plans.
What is the Smart-Mosque-Box?
The box runs as a Docker container on a Raspberry Pi, a mini PC or next to the camera box. It talks to the desk on the local network and keeps the connection to moschee.io. Through it you:
- mute or unmute channels live, set levels and recall scenes, from the dashboard, the moschee.io app and links for helpers;
- run automations at the prayer times, for example "turn on the imam's microphone at the Iqama" or "mute the microphones after the prayer";
- keep protective rules active during the prayer: a person always wins, and protected channels such as the imam's microphone are never muted during the prayer.
The box keeps the prayer timetable of the next days on its own disk, so the automations keep running when the internet is down.
What you need
- A Behringer X32 with a network connection on the mosque's local network. A network cable and a fixed IP address (or a reservation in the router) for the desk are the most reliable.
- A Linux computer with Docker on the same network: a Raspberry Pi 4 or 5, a mini PC or the computer that already runs the camera box. The box is available for x86-64 and ARM.
- A moschee.io account with owner or admin rights for your mosque.
- Your mosque's prayer timetable in moschee.io, because the automations follow it.
Set up the box
Start the box
Start the box on the computer with this command:
docker run -d --name moscheeio-smart-mosque \
--restart unless-stopped --network host \
-v smart-data:/app/data \
moscheeio/moscheeio-smart-mosque-agent:stable--network host is needed so the box can find the desk on the network. The smart-data volume keeps the box's connection to moschee.io, the chosen desk and the timetable, also across updates.
The dashboard shows the same command under Smart Mosque → Mixer while no box is connected yet.
Open the box's page
On a computer or phone on the same network, open https://<IP address of the box>:8080. The page uses its own certificate, so the browser warns the first time; accept the exception.
Click Connect to moschee.io. The box shows a code.
Confirm the code
Open https://app.moschee.io/device, sign in and enter the code. Check that the device type says Smart-Mosque-Box, choose your mosque and click Connect. If a code expires, the box shows a new one by itself.
Choose the desk
Back on the box's page, search for the desk on the network or enter its IP address. The box shows the desk's model and firmware. The box then appears in the dashboard under Smart Mosque → Mixer.
Set up the channels
In the dashboard, open Smart Mosque → Mixer → Setup and choose the channels moschee.io may see: input channels, aux ins, buses, matrices, DCAs, mute groups or main. The names from the desk are suggested; you can give each channel its own name and a role (imam, muezzin, minbar, women's area, stream, music, …).
Mark the imam's microphone as Protected in prayer. Only the channels chosen here appear in moschee.io, and only they are switched by the box.
Under Setup, also give the box a name, for example after the room. There you also see whether the box is online, when it last reported and which version it runs.
Live control
The Live tab shows the configured channels with their state. Per channel you mute or unmute, set the level on faders and see the signal. At the top you recall a scene by its number on the desk. Each channel shows who changed it last: a person, a remote link, an automation, Home Assistant or someone at the desk itself.
Pause stops all automations: for an hour, three hours, until tonight or until you turn them back on, for example during an event.
Owners, admins and streamers may switch channels and pause. Only owners and admins edit the setup, the automations and the remote links.
moschee.io app
The same channels, automations and remote links are in the moschee.io app's admin area under Mixer.
Automations
Automations run on the box, also without internet. A rule consists of a moment, conditions and actions.
Moments and triggers
| Moment | Description |
|---|---|
| Adhan | At the call to prayer |
| End of Adhan | When the call to prayer is over |
| Iqama | At the Iqama |
| After the prayer | When the prayer has ended |
Each moment has an offset in minutes (negative means before) and a trigger:
- Schedule: by the mosque's prayer timetable.
- Detected: only when the live translation actually hears the Adhan or the Iqama. This needs a running translation.
- Detected, else schedule: immediately when the translation hears the moment; otherwise by the timetable, after the box has waited an adjustable time.
As conditions you choose prayers and weekdays (nothing selected means all) and whether the rule should only run during a livestream.
Actions
| Action | Description |
|---|---|
| Mute | Mute the channel; with Only after 5 s of quiet the box waits for a pause in speech |
| Unmute | Turn the channel on, optionally with a fade in seconds |
| Level | Move the fader to a value in dB, over a duration |
| Recall scene / Recall snippet | Load a scene or a snippet by its number on the desk |
| Wait | A pause between two actions |
Templates help you start: Unmute the imam's microphone at the Iqama, Mute music before the Adhan and Mute the microphones after the prayer.
Watch first, then switch
A new rule is set to Log only: it writes to the History what it would have done without touching the desk. Watch it for a few days, then turn on Switches the desk. For every run, the history shows whether it was executed, only logged, skipped or paused, and why.
Protective rules during the prayer
These rules always apply, regardless of the automation:
- A person always wins. If someone changed a channel shortly before, at the desk, in the dashboard or through a remote link, the box leaves it alone. You set the time span per rule.
- Protected channels stay on. A channel marked "Protected in prayer" is never muted by an automation between the Iqama and the end of the prayer, not even from Home Assistant.
- Muting waits for silence when you chose that for the action. If it does not get quiet, the channel stays on.
- Late runs are skipped. If the box was off or offline at the time, it does not catch up on the run, and after a restart it switches nothing by itself.
Remote links
A remote link is a link for the imam or a helper: without an account, only with the channels you choose. Under Remotes → New remote, you set:
- a name, shown at the desk and in the history as "who changed it";
- the channels and, per channel, the right Mute / on only or Mute / on and level;
- optionally the scenes the link may recall;
- whether the link may pause the automations;
- its validity: 1 day, 30 days or until revoked.
The link and its QR code are shown only once. Pass them on or print the QR code, for example for the minbar. Revoke makes a link stop working at once. A link only reaches configured channels, and protected channels stay on during the prayer through it as well.
Home Assistant
If your mosque uses Home Assistant, the moschee.io integration connects both sides:
- Switches next to the desk. Switches from Home Assistant, such as the socket the desk is plugged into, appear in the Live tab and in the app and can be switched from there.
- Switch rules by the timetable. Rules like "turn the desk on 15 minutes before Fajr" or "turn it off 30 minutes after Isha" are set up in moschee.io; they run in Home Assistant and need no internet.
- The desk's channels in Home Assistant. The configured channels appear as entities, switchable if you allow it.
Home Assistant also works without a box, for example only for the switch rules.
Connect Home Assistant
Install the integration
In HACS, under Custom repositories, add https://github.com/ihsandigital/moscheeio-home-assistant as an integration. Download moschee.io in HACS and restart Home Assistant.
Add the integration
Under Settings → Devices & services → Add integration, pick moschee.io. Home Assistant shows a code.
Confirm the code
Confirm the code at https://app.moschee.io/device as an owner or admin of your mosque. Home Assistant then continues on its own.
Share switches
In Home Assistant, open Configure on the integration and choose the switches moschee.io may see, and which of them should ask before switching off.
Home Assistant in moschee.io
- In the Live tab, the Switches card shows the shared switches. A switch that asks before switching off also warns when a translation is live.
- The Automations tab holds the rules for Home Assistant. They only run by the timetable, because Home Assistant does not hear the Adhan, start in log-only mode and never switch anything off while a translation is live.
- Under Setup → Home Assistant, you set what Home Assistant may do with the desk: Off, View only (default) or Control. There you also rename the shared switches and remove the connection.
Emergency mode without internet
The box's page on the mosque's network has an emergency mode: pause the automations and mute channels, even when the internet is down. For that, set a PIN with 4 to 8 digits under Setup → Emergency PIN. The box receives the PIN on its next sync.
Update the box
Pull the new image and recreate the container. The connection, the desk and the timetable stay in the volume; channels, automations and remote links are fetched from moschee.io.
docker pull moscheeio/moscheeio-smart-mosque-agent:stable
docker stop moscheeio-smart-mosque
docker rm moscheeio-smart-mosqueThen start the box with the same docker run command as above. Plan updates outside the prayer times, because the box switches nothing while it restarts.
Remove the box
Under Setup → Remove box, you sign a box out. Its automations and remote links are deleted. The box then shows a code on its page again and can be connected anew, also to another mosque.