truth()One semantic source
Final Athan, Iqama, Jumuah, Ramadan, event stage and operator policy belong to Core — not scattered helpers, pages or device automations.
visitor@sultaning:~/work$ open masjid-platform-v2
A mosque should keep working even when the internet does not. Masjid Platform V2 is a local operating layer for prayer truth, schedules, devices, displays and trusted operator control — built to outlive the hardware beneath it.
The first mosque system proved that prayer-aware automation could run a real building. But as HVAC, microphones, displays, presence sensors, Ramadan behavior and more were added, one question became more important than another automation: where should mosque truth live so the system still makes sense five years later?
truth()Final Athan, Iqama, Jumuah, Ramadan, event stage and operator policy belong to Core — not scattered helpers, pages or device automations.
replace(device)Policy references logical identities. Replacing a Gree unit with another vendor changes the mapping, not every prayer schedule that used it.
offline()Cloud services can add distribution, but local prayer operations, device control and signage do not depend on the public internet.
The architectural rule is intentionally simple: Core knows what the mosque wants, when it should happen and why. Home Assistant knows how a real device does it. The Display renders truth; it does not invent it.
Prayer preparation, Athan, waiting for Iqama, the prayer itself and the post-prayer period are distinct semantic states. Device preparation can start earlier without inventing a fake religious stage.
Core begins with an authoritative Home Assistant state sync, then consumes live state changes over WebSocket. Commands are event-confirmed when possible and reconciled with REST when needed. Display clients use the same principle: snapshot first, ordered realtime after.
HA → CoreRelevant device, microphone, presence, temperature and availability state arrives as normalized Home Assistant events.
Core → HACore issues physical service requests through a single integration boundary, then observes the result instead of assuming success.
Core → DisplayDisplay receives an authoritative snapshot followed by ordered state updates; a version gap causes reconciliation, not guesswork.
An Imam, Muezzin, facilities operator or volunteer can use the same operator contract while receiving different effective permissions. The server remains authoritative, explicit deny wins, and device scopes reference logical mosque resources rather than Home Assistant entity IDs.
The platform was deliberately tested across backup, restore, host reboot, candidate upgrade, rollback, authorization recovery, realtime compatibility and interrupted restore. A valid request still cannot bypass the physical execution gate or a post-restore safety lock.
The current system keeps what the first installation taught us, but changes the unit of customization. A new mosque should mostly be configuration, logical device mapping and policy — not a copied forest of automations.
This project is not only an interface or an automation set. The work spans product boundaries, domain modeling, physical-device orchestration, Home Assistant integration, reliability, authorization, release safety, responsive management UX and the discipline required to keep a live mosque safe while the system evolves.