Smart Souq Al-Mubarakiya
This is my dream for Al-Mubarakiya, and I wanted to share it with everyone: that the souq stays as we know and love it, with its soul and its history, and becomes safer through smart technology that works in silence.
Sensors nobody notices, a local unit that keeps the fire alarm working when the cloud does not, a digital twin built on the map, and trust zones around all of it. A personal vision, shared to read and discuss.
Part of an educational experience, shared to read. Ideas by Ali AlEnezi. The entities named are illustrative only and have no link to this work.
The map
LIFE SAFETY FIRST
The numbered map is the asset taxonomy. Every location becomes an ID, every ID carries sensors, and the digital twin is that registry kept alive. Hardware stays swappable because everything speaks LoRaWAN, MQTT, OPC UA, and BACnet.
The dream
A PERSONAL VISIONThis is my dream for Al-Mubarakiya, and I wanted to share it with everyone: that the souq stays as we know and love it, with its soul and its history, and becomes safer through smart technology that works in silence.
Souq Al-Mubarakiya is more than two centuries old. People walk it on foot, its alleys get crowded, and everyone loves it. So the smart souq begins by protecting what is already there: the safety of people first and the heritage of the place second, and only then the analytics.
The idea: small sensors spread through the souq without anyone noticing them, and send their readings to a local unit inside the souq, a small computer in a municipal room, which keeps the fire alarm and the public address working even if the internet is cut. From there the readings flow into a living digital copy of the souq built on the very map that numbers sixty locations, what we call the digital twin, so the system knows every spot by its name and its sensors. On top of all that sit the analytics that help the people who run the souq run it safely and help the merchants understand the flow of their customers, and around all of it a fence of protection that suits a place this sensitive.
The whole thing is here to read: the blueprint, the diagrams, the sensor catalog, the registry, the brief, and the deck, shared so that any conversation about the souq can start from something concrete.
How to explore this page
Everything on this page is meant to be touched. Say who you are in the strip below and it lays out a path for you; these are the main stops.
- The map at the top: every number on it is a marker; switch on the zones layer and tap a zone name for a printable zone profile. Tap one and the location's card appears with its sensors and a simulated reading. Search by name, switch on layers to see gateway coverage, crowd density, and zones, and switch to the street map to see the same places on a real map.
- The scenarios under the map, five ready to play: a fire, a gas leak, a crowd surge on a Ramadan night, a dust storm, and a cyber attack stopped at the OT conduit. Choose one and press play; you will hear the alarm and the announcement and watch the map react. Or build your own: pick any place and any sensor it carries, and the console writes a seven step drill around it.
- For a training room, host a room and share its code with the people present; every phone that joins follows your steps live with its own sounds, in its own language. During any drill its bar stays on the screen with a stop button, every step shows a notification, and once a drill has ended you can download its log.
- The roadmap: five phases; tap any of them to see what it ends with and the gate it has to pass.
- What it takes ends with a calculator: choose zones and the registry counts the places, sensors, gateways, and installation weeks.
- The sensors: fourteen classes you can filter by domain, each with a typical day drawn on its card, and under the thresholds an explorer that shows what moving an alert level does to the alerts a day, with the table that says when each sensor raises an alert and where its numbers come from, and a button on each card that starts a drill with that sensor.
- Dotted words are glossary terms: tap or hover one anywhere for its meaning.
- The registry: the souq in numbers first, places per zone, sensors per class, names verified, then all sixty seven places, searchable by name or number; tap any row to jump to its spot on the map, and the details button opens its full profile, every sensor with its threshold, its day's curve, and its recent events.
- Quick jump: press Ctrl K, or Cmd K on a Mac, and type a section or a place; press ? for the keyboard shortcuts.
- From any place to the nearest exit: every location card says how far the nearest exit is, and show the way draws it on the map.
- The roadmap with dates: choose a start month above the phases and each phase gets its months.
- Accessibility: the round button at the bottom corner opens text size, high contrast, a light theme, reduced motion, and underlined links, remembered on your device, and an arrow takes you back to the top.
- The operations view: this is what the screen of whoever runs the souq would look like; scrub the day with the slider to watch every zone through the hours, and if you switch its source to a real broker it shows real messages over MQTT.
- Two phones in the architecture section: switch the merchant portal's shop and period and tap a bar; on the visitor app, tap your location to move, ask where a place is, read a story, and start a drill above to see what both screens would show.
- The diagrams: on a phone you can swipe them sideways, and each has an interactive version on its own page.
What makes Mubarakiya different
Every decision in this design answers to five facts about this particular souq.
- Heritage: we drill nothing into an old facade. Sensors go on lamp posts, awnings, and municipal fixtures, and not a single screw goes in before the National Council for Culture, Arts and Letters agrees.
- Climate: our summers pass 50 C and our dust shows no mercy, so every device here is rated to 60 C or better, sealed against dust and water, and runs on solar where wiring is not allowed.
- Life safety first: narrow alleys, wooden roofs, restaurants wall to wall, and crowds on Ramadan nights and National Day. Fire and crowds are the first thing we care about; everything else comes after.
- Many owners: the Municipality, the Ministry of Interior, Kuwait Fire Force, NCCAL, CITRA, Electricity and Water, Commerce, and then the merchants themselves. Each has a say, which is why the agreement between them is half the project.
- Privacy: we count people and never identify them. No cameras that recognize faces, no reading of number plates, counting happens inside the device with no image kept, and signs in the souq tell people what we measure and why.
- A gift you already have: the sixty numbered locations on the map are the asset list, ready made. They became the IDs of the digital twin.
Architecture
3 DIAGRAMSSensing
- Fourteen classes on LoRaWAN, a few mains powered counters
- Fire, gas, footfall, noise, air, water, cold chain, humidity, waste, tamper, parking, traffic, heat, lighting
- Two vendors per class
Local unit
- Private LoRaWAN, 3 to 5 gateways with overlap
- Local unit: network server, MQTT bridge, store and forward
- Local alerting keeps the fire panel and PA working offline
- OT conduit passes only approved signed commands
Platform
- MQTT broker with a certificate per device
- Time series store, digital twin keyed to the map
- a device identity authority signs firmware
- Open source core, Azure path available
Applications
- Operations dashboard, safety view first
- Alert routing to security, municipality, Kuwait Fire Force
- Merchant portal by zone and hour, never by individual
- Public wayfinding, advisories, open data
Left to right: field sensing, the local unit, the data platform, information and analytics. The local unit triggers the fire panel locally within seconds, the platform raises the alert to the operations center in under thirty seconds, and a human confirms dispatch. Automation never dispatches on its own.
Network and the local unit
Five outdoor LoRaWAN gateways with overlapping coverage, four on the municipal fiber ring and one on NB-IoT where fiber does not reach, all landing on a redundant local firewall pair in a municipal room beside the souq. The local unit pair runs the LoRaWAN network server, the MQTT bridge, and the local rules engine, so join, decode, and life safety alerting never depend on the platform. The OT conduit firewall is the only path to lighting, fire panel, PA, and HVAC, and it accepts signed commands from an allow list, nothing else.
| Interface | Protocol | Notes |
|---|---|---|
| Sensors to gateways | LoRaWAN 1.0.4, EU868 band, subject to CITRA confirmation | each device has its own keys, and the sending rate adapts to signal strength |
| Gateways to the local unit | Packet forwarder over TLS on fiber, NB-IoT backup | Gateway certificates, SNMP health |
| Local unit to platform | MQTT 5 over TLS 1.3 | Per device certificates, publish only for sensors, store and forward |
| Local unit to OT | OPC UA, BACnet/IP, DALI, Modbus TCP read only | Signed commands through the conduit, read only telemetry back |
| Platform to partners | HTTPS APIs behind the WAF | Kuwait Fire Force dispatch handoff, open data |
| Everything to SOC | Syslog and CEF, MQTT security topics | Joins, rejections, command audits, gateway health |
The stack, open source core with an Azure path
| Role | Open source | Azure path |
|---|---|---|
| LoRaWAN network server | ChirpStack | ChirpStack on Azure IoT Edge |
| Message broker | EMQX | Azure IoT Hub |
| Local unit runtime and rules | Node-RED on the local unit | Azure IoT Edge modules |
| Time series | TimescaleDB | Azure Data Explorer |
| Digital twin and registry | Eclipse Ditto | Azure Digital Twins |
| Dashboards | Grafana | Azure Managed Grafana |
| Identity | Keycloak | Microsoft Entra ID |
| Device identity authority | step-ca with a hardware token | Device Provisioning Service and Key Vault |
| Security monitoring | Wazuh and Suricata | Microsoft Sentinel and Defender for IoT |
| Object storage for evidence | MinIO | Azure Blob Storage |
The design does not change between the two columns. The local unit is identical in both, which is what keeps the souq safe if the platform contract ever changes hands.
Sizing, why this is small
| Measure | Pilot | Full souq |
|---|---|---|
| Devices | about 60 plus 60 parking bays | about 400 plus 400 parking bays |
| Uplink rate | under 1 message per second | about 3 messages per second |
| Telemetry per year | about 2 GB | about 12 GB |
| Gateways | 3 | 5 |
| Local units | 2 in a redundant pair | 2 in a redundant pair |
The data here is small, under a message a second across the souq, and the effort in this design goes into reliability, security, and governance.
Alert severities and who is told
| Severity | Examples | Notified | Acknowledge within |
|---|---|---|---|
| Life safety | heat rise, smoke, LPG, crowd density above limit | fire panel and PA locally, souq security, operations center, Kuwait Fire Force on confirmation | 1 minute |
| Safety advisory | heat stress above threshold, water quality out of range | operations center, public advisory on signage and app | 15 minutes |
| Security | unknown device join, gateway tamper, command signature failure | SOC | 5 minutes |
| Operations | waste bin full, battery low, sensor silent, parking full | operations center, maintenance | next working shift |
The applications layer
What the merchant and the visitor would actually hold. Two screens from the fourth layer, both fed by the same anonymized counts and the same alerts, neither able to see a face.
Sensor catalog
14 CLASSESHeat, smoke and flame
Early fire detection in alleys, kitchens and textile stalls; local trigger to fire panel
Placement: One per stall cluster, under awnings
LPG and CO
Cylinder leaks and combustion gases in restaurant kitchens
Placement: Kitchens, low mount
Footfall counter
Anonymous crowd density and flow for safety and merchants
Placement: Alley entrances and squares
Noise level
Ambient noise for nuisance limits and event management
Placement: Restaurant street, squares
Air quality and dust
PM2.5, PM10, heat index during dust storms and summer
Placement: Open areas, roof lines
Water quality
Drainage and washdown water in fish and meat markets, fountains
Placement: Drainage points, fountains
Cold chain temperature
Display and storage temperature in meat and fish stalls
Placement: Chillers and counters
Humidity
Mould and fabric risk in carpet and bisht stores
Placement: Covered stores
Waste bin fill level
Collection routing, hygiene, pest control
Placement: Public bins
Tamper and vibration
After hours movement on gold market shutters
Placement: Shutters and kiosks
Parking occupancy
Free bay count for Gold Parking, Safat and property markets parking
Placement: Parking bays
Traffic count
Vehicle flow on the four boundary streets
Placement: Street entrances
Heat stress
Wet bulb globe temperature for visitor advisories
Placement: Squares
Lighting control node
Adaptive dimming and fault reporting
Placement: Lamp posts
Every device: 60 C or better, IP65 minimum, dust tolerant optics, 5 year battery or mains with backup, discreet neutral enclosures on non historic fixtures. Gateways: 3 for the pilot, 5 for the full souq, fiber or NB-IoT backhaul with battery backup.
Thresholds that raise an alert
Starting values for the pilot, tuned per zone during Phase 1 and reviewed with Kuwait Fire Force for the life safety rows.
| Class | Condition | Severity |
|---|---|---|
| FIRE | heat above 58 C, or a rise faster than 8 C per minute, or smoke obscuration above the detector's rated level | life safety |
| GAS | LPG above 10 percent of the lower explosive limit, or carbon monoxide above 35 parts per million sustained | life safety |
| FOOT | density above 3 people per square meter at an alley entrance, or flow reversal against the evacuation direction | life safety |
| HEAT | wet bulb globe temperature above 32 C for visitors, advisory on signage | safety advisory |
| AIR | PM10 above 350 or PM2.5 above 75, the KEPA daily limits micrograms per cubic meter, dust storm advisory | safety advisory |
| WATER | pH outside 6.5 to 8.5, or turbidity above 50 NTU at a drainage point | safety advisory |
| TEMP | chilled display above 5 C for 30 minutes | operations |
| NOISE | above 75 dB for 15 minutes in a zone with a nuisance limit | operations |
| WASTE | bin above 85 percent full | operations |
| TAMPER | shutter vibration or movement outside opening hours | security |
| PARK | Gold Parking above 95 percent full | operations |
| LIGHT | node unreachable or lamp fault reported | operations |
| Any | device silent for three expected intervals, or battery below 15 percent | operations |
Where the numbers come from
- Air: the Kuwait Environment Public Authority set the daily limits at PM10 350 and PM2.5 75 micrograms per cubic meter in 2017, and its Kuwait Air Quality Index counts PM10 up to 350 as acceptable. The advisory fires where Kuwait's own scale turns moderate.
- Heat and smoke: a fixed temperature of 58 C and a rise of 8 C per minute follow the standard heat detector classes of EN 54-5.
- Gas: alarms at ten percent of the lower explosive limit are the common industrial practice for combustible gas detection, and 35 parts per million is the NIOSH recommended exposure limit for carbon monoxide.
- Heat stress: a heat stress index (WBGT) above 32 C follows the ISO 7243 approach to heat stress in the workplace, applied here to visitors.
- Crowds: three people per square meter is the density at which crowd safety guidance describes movement as restricted and the risk of a surge rising.
- Cold chain: chilled display above 5 C follows common food safety practice for chilled food.
- Water, noise, waste, tamper, parking, lighting: operational settings for the pilot, to be tuned per zone in phase one.
Asset registry
67 ENTRIES, 9 ZONESKnow the souq? If a name here is wrong or has changed, send a correction and it goes into the registry with a verification date.
ID scheme MUB-<zone>-<map location>-<sensor class>-<n>, topics mubarakiya/Z1/051/FIRE/<device>/telemetry. Every device publishes a signed envelope, and the broker rejects unknown devices, which is where zero trust for sensors actually lives. Click a row to find it on the map.
| ID | Map | Location | Zone | Sensor classes |
|---|---|---|---|---|
| MUB-Z1-002 | 2 | Msayan Sweetsverified | Z1 Food and restaurants | FIREGASFOOTNOISEAIRWASTE |
| MUB-Z1-003 | 3 | Brothers Street Food Burgersunverified | Z1 Food and restaurants | FIREGASFOOTNOISEAIRWASTE |
| MUB-Z1-004 | 4 | Flower Latte Cafeunverified | Z1 Food and restaurants | FIREGASFOOTNOISEAIRWASTE |
| MUB-Z1-005 | 5 | Caffeine Cafeunverified | Z1 Food and restaurants | FIREGASFOOTNOISEAIRWASTE |
| MUB-Z1-006 | 6 | Breo, light food, at SOMUverified | Z1 Food and restaurants | FIREGASFOOTNOISEAIRWASTE |
| MUB-Z1-008 | 8 | Seventh Heaven Restaurantunverified | Z1 Food and restaurants | FIREGASFOOTNOISEAIRWASTE |
| MUB-Z1-018 | 18 | Bu Nashi Cafeverified | Z1 Food and restaurants | FIREGASFOOTNOISEAIRWASTE |
| MUB-Z1-034 | 34 | Al-Aql Restaurantverified | Z1 Food and restaurants | FIREGASFOOTNOISEAIRWASTE |
| MUB-Z1-041 | 41 | Al-Ruwad cafeverified | Z1 Food and restaurants | FIREGASFOOTNOISEAIRWASTE |
| MUB-Z1-051 | 51 | Traditional restaurants areaunverified | Z1 Food and restaurants | FIREGASFOOTNOISEAIRWASTE |
| MUB-Z1-059 | 59 | Al-Shamam Restaurantverified | Z1 Food and restaurants | FIREGASFOOTNOISEAIRWASTE |
| MUB-Z2-021 | 21 | Alfares Jewelleryverified | Z2 Gold and jewelry | FIREFOOTTAMPER |
| MUB-Z2-029 | 29 | Jewelers and gold trading kiosksunverified | Z2 Gold and jewelry | FIREFOOTTAMPER |
| MUB-Z2-032 | 32 | Central Gold Marketverified | Z2 Gold and jewelry | FIREFOOTTAMPER |
| MUB-Z3-014 | 14 | Persian carpet storesunverified | Z3 Textiles, bishts and carpets | FIREFOOTHUMID |
| MUB-Z3-015 | 15 | Antiques and carpets marketunverified | Z3 Textiles, bishts and carpets | FIREFOOTHUMID |
| MUB-Z3-030 | 30 | Wholesale clothing outletunverified | Z3 Textiles, bishts and carpets | FIREFOOTHUMID |
| MUB-Z3-035 | 35 | Old Bishts Marketunverified | Z3 Textiles, bishts and carpets | FIREFOOTHUMID |
| MUB-Z3-037 | 37 | Al-Duaij square for bishts and carpetsunverified | Z3 Textiles, bishts and carpets | FIREFOOTHUMID |
| MUB-Z3-038 | 38 | Carpets and bishts market, Souq Al-Zal, ground floorunverified | Z3 Textiles, bishts and carpets | FIREFOOTHUMID |
| MUB-Z3-048 | 48 | Souq Al-Harim, the women's marketverified | Z3 Textiles, bishts and carpets | FIREFOOTHUMID |
| MUB-Z3-049 | 49 | Coats and jackets storesunverified | Z3 Textiles, bishts and carpets | FIREFOOTHUMID |
| MUB-Z4-012 | 12 | Al-Mathana Al-Fakhera, nuts and spicesverified | Z4 Fresh markets | FIREWATERAIRTEMPWASTEFOOT |
| MUB-Z4-050 | 50 | Meat Marketverified | Z4 Fresh markets | FIREWATERAIRTEMPWASTEFOOT |
| MUB-Z4-052 | 52 | Kitchen supplies stores, ground floor and basementunverified | Z4 Fresh markets | FIREWATERAIRTEMPWASTEFOOT |
| MUB-Z4-055 | 55 | Dates Marketverified | Z4 Fresh markets | FIREWATERAIRTEMPWASTEFOOT |
| MUB-Z4-056 | 56 | Traditional sweets and roasted nuts marketunverified | Z4 Fresh markets | FIREWATERAIRTEMPWASTEFOOT |
| MUB-Z4-057 | 57 | Fish Marketverified | Z4 Fresh markets | FIREWATERAIRTEMPWASTEFOOT |
| MUB-Z4-058 | 58 | Vegetables Marketverified | Z4 Fresh markets | FIREWATERAIRTEMPWASTEFOOT |
| MUB-Z4-060 | 60 | Apothecaries and spice kiosksunverified | Z4 Fresh markets | FIREWATERAIRTEMPWASTEFOOT |
| MUB-Z5-011 | 11 | Sheikh Mubarak Al-Sabah Kioskverified | Z5 Perfumes and traditional goods | FIREFOOTAIR |
| MUB-Z5-020 | 20 | Perfumes, bukhour and ghutra kiosksunverified | Z5 Perfumes and traditional goods | FIREFOOTAIR |
| MUB-Z5-031 | 31 | Al-Musallam ghutra and head piecesverified | Z5 Perfumes and traditional goods | FIREFOOTAIR |
| MUB-Z5-039 | 39 | Al-Quraishi perfumes and incenseverified | Z5 Perfumes and traditional goods | FIREFOOTAIR |
| MUB-Z5-040 | 40 | Wholesale perfumes and incense marketunverified | Z5 Perfumes and traditional goods | FIREFOOTAIR |
| MUB-Z6-010 | 10 | Kuwait Finance Houseverified | Z6 Finance and offices | FOOTFIRE |
| MUB-Z6-013 | 13 | Currency exchange storesunverified | Z6 Finance and offices | FOOTFIRE |
| MUB-Z6-026 | 26 | Commercial Bank of Kuwaitverified | Z6 Finance and offices | FOOTFIRE |
| MUB-Z6-028 | 28 | Gulf Bankverified | Z6 Finance and offices | FOOTFIRE |
| MUB-Z6-053 | 53 | Stock and investment trading officesunverified | Z6 Finance and offices | FOOTFIRE |
| MUB-Z7-017 | 17 | Grand Souq Mosqueverified | Z7 Mosques and heritage | FOOTNOISEFIRE |
| MUB-Z7-019 | 19 | Diwaniyat Al-Raeel Al-Awwal, the founding generation diwaniyaverified | Z7 Mosques and heritage | FOOTNOISEFIRE |
| MUB-Z7-027 | 27 | Alfares Mosqueverified | Z7 Mosques and heritage | FOOTNOISEFIRE |
| MUB-Z7-033 | 33 | Al-Fahad Mosqueverified | Z7 Mosques and heritage | FOOTNOISEFIRE |
| MUB-Z7-054 | 54 | Mohammad Bin Bahar Mosqueverified | Z7 Mosques and heritage | FOOTNOISEFIRE |
| MUB-Z8-001 | 1 | Thouq Storeunverified | Z8 Retail and electronics | FIREFOOT |
| MUB-Z8-007 | 7 | Al-Baraka concept storeunverified | Z8 Retail and electronics | FIREFOOT |
| MUB-Z8-016 | 16 | Kuwait National Bookstoreunverified | Z8 Retail and electronics | FIREFOOT |
| MUB-Z8-022 | 22 | Novotiyeh Al-Anakaunverified | Z8 Retail and electronics | FIREFOOT |
| MUB-Z8-023 | 23 | Al-Sagran Complexverified | Z8 Retail and electronics | FIREFOOT |
| MUB-Z8-025 | 25 | Revolution Boutiqueverified | Z8 Retail and electronics | FIREFOOT |
| MUB-Z8-036 | 36 | Bait Ahmedverified | Z8 Retail and electronics | FIREFOOT |
| MUB-Z8-042 | 42 | Old arms market, Souq Al-Silahverified | Z8 Retail and electronics | FIREFOOT |
| MUB-Z8-043 | 43 | Luggage and handbags storesunverified | Z8 Retail and electronics | FIREFOOT |
| MUB-Z8-044 | 44 | Electronics and watches storesunverified | Z8 Retail and electronics | FIREFOOT |
| MUB-Z8-045 | 45 | Al-Maqasis market, the thrift and watch resellers marketverified | Z8 Retail and electronics | FIREFOOT |
| MUB-Z8-046 | 46 | Electronic appliances storesunverified | Z8 Retail and electronics | FIREFOOT |
| MUB-Z8-047 | 47 | Watches and cellphones storesunverified | Z8 Retail and electronics | FIREFOOT |
| MUB-Z9-009 | 9 | Souq parking, Kuwait Real Estate Marketsunverified | Z9 Squares, parking and streets | PARKTRAFFICFOOTHEATLIGHT |
| MUB-Z9-024 | 24 | Kuwait Stock Exchange, old building, and car parkunverified | Z9 Squares, parking and streets | PARKTRAFFICFOOTHEATLIGHT |
| MUB-Z9-S1 | S1 | Safat Squareunverified | Z9 Squares, parking and streets | PARKTRAFFICFOOTHEATLIGHT |
| MUB-Z9-S2 | S2 | SOMU Squareverified | Z9 Squares, parking and streets | PARKTRAFFICFOOTHEATLIGHT |
| MUB-Z9-S3 | S3 | Gold Parkingunverified | Z9 Squares, parking and streets | PARKTRAFFICFOOTHEATLIGHT |
| MUB-Z9-T1 | T1 | Mubarak Al-Kabeer Street entranceunverified | Z9 Squares, parking and streets | PARKTRAFFICFOOTHEATLIGHT |
| MUB-Z9-T2 | T2 | Abdullah Al-Mubarak Street entranceunverified | Z9 Squares, parking and streets | PARKTRAFFICFOOTHEATLIGHT |
| MUB-Z9-T3 | T3 | Ahmad Al-Jaber Street entranceunverified | Z9 Squares, parking and streets | PARKTRAFFICFOOTHEATLIGHT |
| MUB-Z9-T4 | T4 | Al-Gharabally Street entranceunverified | Z9 Squares, parking and streets | PARKTRAFFICFOOTHEATLIGHT |
Resilience modes
72 H AUTONOMYThe local unit has four modes and moves between them on its own. Life safety never waits for the cloud.
When the connection drops, the local unit moves between four modes by itself. Connected streams to the platform moment by moment. Degraded, when the platform slows down, lets the local rules take the lead and decide. Offline, when the platform is gone entirely, stores three full days of readings while the fire alarm keeps working as if nothing had happened. Recovering, when the connection returns, sends what was delayed and reconciles the digital twin before going back to connected. And every three months we pull the fiber on purpose to make sure it works, not only on paper.
Roadmap
5 GATESClick a phase. Most cost sits in Phase 2 civil works and integration, not sensors; the pilot is the cheapest way to de risk everything after it.
Security and compliance
REVIEW: NOTHING TO FLAG$ hisn check architecture/smart-mubarakiya.hisn --strict
0 high, 0 medium, 0 low
controls named on 93% of elements: 20 of 23 components, 23 of 23 flows
sensitive flows with a named control: 2 of 2
IEC 62443 coverage: 100% (6 of 6 areas addressed)What coverage means here. Hisn checks whether the blueprint names a control for each of the six IEC 62443 foundational areas a drawing can show: identification and authentication, use control, system integrity, restricted data flow, timely response, and resource availability. Six of six is a design coverage check, not a certification and not evidence that any control is implemented, which is what the phase gates and the independent assessment are for.
The review caught two real gaps during design: analytics reached the operations center directly, skipping a trust tier, so an inspected ops access gateway now sits on that path. Click any component below to trace its flows.
Trust zones
| Zone | Trust | What lives there | Boundary control |
|---|---|---|---|
| Public and partners | untrusted | visitor app, merchant users, Kuwait Fire Force dispatch | web application firewall |
| Exposed services | DMZ | public API and open data | WAF, authenticated API |
| Data platform | restricted | broker, time series, digital twin, device CA, analytics | TLS everywhere, certificate per device |
| Local unit | restricted | local firewall, local unit, LoRaWAN network server | local firewall, store and forward |
| Field sensing | secure | gateways, sensors, anonymized counters | device identity, signed firmware |
| OT and life safety | secure | OT conduit firewall, lighting, fire panel and PA | conduit allows approved signed commands only |
| Operations center | management | analysts, dashboard, SOC, ops access gateway | gateway with strong authentication |
Control mapping
| Concern | IEC 62443 | NIST CSF 2.0 | ISO 27001 Annex A | CITRA |
|---|---|---|---|---|
| Device and user identity | SR 1 | PR.AA | A.5.16, A.8.5 | telecom and IoT device requirements |
| Authorization, least privilege | SR 2 | PR.AA | A.5.15, A.8.3 | |
| Integrity of the control path, signed firmware | SR 3 | PR.PS, PR.DS | A.8.9, A.8.24 | |
| Data confidentiality, anonymization | SR 4 | PR.DS | A.8.11, A.8.24 | data privacy protection regulation |
| Segmentation, zones and conduits | SR 5 | PR.IR | A.8.20, A.8.22 | |
| Monitoring and response | SR 6 | DE.CM, RS.MA | A.8.15, A.8.16 | incident reporting |
| Availability, offline operation, backup | SR 7 | PR.IR, RC.RP | A.8.13, A.8.14 | service continuity |
Privacy by design
- Footfall is counted in the local unit by LiDAR or thermal sensors, and no image ever leaves a device or is stored.
- No facial recognition, no plate reading, no device fingerprinting of visitors' phones.
- Merchant accounts are the only personal data, and they live behind the WAF with strong authentication.
- Public and merchant views only ever see aggregates by zone and hour.
- Signage in the souq says what is measured and why, and the privacy notice is published.
Device lifecycle
- Provision: unique certificate from the device CA, no shared keys, no default credentials.
- Join: the broker accepts publish only from known certificates, and unknown devices are logged as a security event.
- Update: signed firmware only, staged rollout, rollback ready.
- Monitor: heartbeat, battery, signal, and behavior baselines into the SOC.
- Retire: certificate revoked, device wiped, registry updated, the same day it leaves the wall.
Operational security
- OT changes go through change control with a manual override and fail safe defaults, and automation never dispatches emergency services on its own.
- Quarterly offline drills prove the local unit protects life safety without the platform.
- Annual penetration test, annual tabletop with Kuwait Fire Force, and an independent assessment before any new OT control.
The control matrix generated by hisn matrix is in architecture/control-matrix.txt.
Threat model, what we assume will be tried
| Threat | Where | Mitigation in the design |
|---|---|---|
| Spoofed sensor injecting false readings | field | per device certificate and signed envelope, broker rejects unknown devices, plausibility checks in rules |
| Radio jamming of LoRaWAN | field | gateway overlap, silent sensor alarms, fire panel remains hardwired and independent |
| Compromised gateway | field | gateways only forward packets, no decryption keys on the gateway, certificate revocation, SNMP health monitoring |
| Rogue command to lighting, PA, or HVAC | OT | conduit allow list, signed commands, second person approval, read back verification, manual override |
| Platform breach used to reach OT | platform | OT is reachable only from the local unit through the conduit, never from the platform directly |
| Data exfiltration of footfall or merchant data | platform, DMZ | anonymized counts only, merchant data behind WAF and strong authentication, egress monitoring |
| Insider misuse at the operations center | management | least privilege roles, ops access gateway with MFA, every action audited to the SOC |
| Physical theft or tamper of a device | field | tamper sensors on high value stalls, discreet mounting, revocation on removal, spares |
| Supply chain, a device model with a backdoor | supply | software bill of materials per model, two vendors per class, isolated onboarding, firmware signing by our CA |
| Loss of the platform during an event | platform | the local unit works alone for 72 hours, quarterly disconnected drills |
Conduit matrix, who may talk to whom
| From \ To | Public | DMZ | Platform | Local unit | Field | OT | Ops |
|---|---|---|---|---|---|---|---|
| Public | WAF only | no | no | no | no | no | |
| DMZ | responses | twin aggregates, read only | no | no | no | no | |
| Platform | no | publish aggregates | certificates, signed commands | no | no | alerts via ops gateway | |
| Local unit | no | no | telemetry over TLS | join and downlink | signed commands via conduit | no | |
| Field | no | no | no | uplink | no | no | |
| OT | no | no | no | alarm state, read only | no | no | |
| Ops | no | no | via ops gateway | no | no | no |
Everything not listed is denied, and the conduit firewalls log every denial as a security event.
The review as a report a reviewer could sign, generated by Hisn from the blueprint source: in English and in Arabic.
Five safeguards
5 OF 5 ADDRESSEDFive safeguards run through this design. They are the questions any reviewer would ask about a system that can touch a fire panel or a lamp, and each one has a concrete answer here.
| Safeguard | What it asks | Where it lives in this design |
|---|---|---|
| 1. A response plan written for the physical place | A plan for the souq itself, rehearsed, with the right people on it | The fire drill scenario, the alert severities with who is told and how fast, the tabletop with Kuwait Fire Force before the pilot is accepted, and an annual exercise after |
| 2. A structure an attacker cannot cross | Segmentation, conduits, and a local unit that limits what an attacker can reach | Seven trust zones and conduits under IEC 62443, the OT conduit that passes only signed commands, OT reachable from the local unit alone and never from the platform, the local unit works alone for 72 hours |
| 3. Seeing what happens inside the operations network | Know what talks to what, and notice when it changes | OT protocol monitoring on the conduit, gateway health, join and rejection events, command audits, all delivered to the SOC in a documented schema |
| 4. No casual way in from outside | Remote access to OT that is more than a VPN and a password | No remote path to the OT zone at all, administrative access only through the ops gateway with multi factor authentication, second person approval for commands, every session audited |
| 5. Fixing what matters first, from a real inventory | Patch what matters for safety and operations first | A software bill of materials per device model, an asset registry that is the digital twin, a patch cadence tied to safety impact, and staged signed firmware with rollback |
Two principles shaped the choices here. Consequence first: every safeguard is ranked by what a failure would do to people in the alleys, which is why fire and crowd safety outrank analytics. Compliance that reduces consequence: IEC 62443, CITRA, and the framework mapping exist to make the souq safer, not to produce paperwork, so the review gates ask whether a safeguard is real, not whether it is documented.
A note on training. For anyone who wants to learn IoT and OT security properly, the SANS Institute runs well regarded courses on industrial control systems security; that is a suggestion for further learning and nothing more. Nothing on this site is taken from SANS material, which is copyrighted by SANS, and SANS has no connection to this work.
The people who would run it
A system like this is only as safe as the team behind it.
The pilot, at its smallest, needs five people: an industrial security engineer who owns the zones and conduits and knows why we drew them this way, an analyst in the security operations center who reads operational readings and not only computer logs, an incident responder who has rehearsed with Kuwait Fire Force, an operations engineer who knows the fire panel, the public address, and the lighting as physical machines rather than icons on a screen, and a leader who holds the decision during an event.
For anyone who wants to learn this field properly, the SANS Institute's courses on industrial control systems security are a good place to start; that is a suggestion for further learning, nothing here comes from their material, and the learning is better started before the first sensor is mounted, not after.
Commands to the physical world
HUMAN IN THE LOOPEvery command that changes something physical follows one path, and a human stays in it.
Any command that changes something in the real world, dimming the lights or playing an announcement, walks one path and no other: it starts as a request on the dashboard, a second person approves it if it goes beyond the usual schedules, the platform signs it, the conduit firewall checks it against a short allow list, then the local unit executes it, reads back the effect, and records it as an event in the security operations center. And the system never calls the fire force by itself; it raises the alert, and a human confirms.
Operations view
SIMULATEDA taste of the operations dashboard. Every number here is simulated in the browser to show what the analytics layer would look like, nothing is measured.
What it would take
A FIRST PILOTAn honest picture of a first pilot, not a price list.
The pilot zone
The restaurants street, Safat Square, and Gold Parking. It is where the fire risk is highest, the crowds are thickest, and a win would be most visible.
Sensing, about sixty devices
- 24 heat and smoke sensors under the awnings of the restaurant stalls
- 12 LPG and carbon monoxide sensors in the kitchens
- 8 anonymous footfall counters at the alley entrances and the square
- 4 noise sensors, 3 air and heat index sensors, 2 heat stress sensors
- 1 water quality probe at a drainage point, 4 waste fill sensors
- 60 parking bay sensors in Gold Parking, 1 traffic counter on the boundary street
- 6 lighting control nodes on the lamp posts of the square
Connectivity and the local unit
- 3 outdoor LoRaWAN gateways with battery backup and fiber or NB-IoT backhaul
- A redundant pair of fanless local units in a municipal room, with an local firewall and an OT conduit firewall
- Neutral, non invasive brackets and enclosures, nothing touching historic fabric
Platform and people
- The open source platform, on premises or cloud, sized for the whole souq from day one
- A device identity authority, dashboards and alerting, and the fire panel and PA integration accepted with Kuwait Fire Force
- A penetration test and a tabletop exercise before anyone says the work is done
- Ten percent spares, because the heat will take its share whatever we do
- Runbooks and training for the people who will actually run it
What it costs
Most of the money will not go to sensors but to digging, cabling, and connecting to the systems already there. A pilot is the cheapest way to find out what the whole souq really needs, and to earn the merchants' trust before scaling.
Risks and KPIs
Risk register
| Risk | Impact | Mitigation |
|---|---|---|
| Heritage approvals arrive late | schedule slip | start approvals in Phase 0, mount only on non historic fixtures |
| Vendor lock in | cost, inflexibility | open protocols only, two vendors per class, data export tested |
| Heat and dust degrade hardware | uptime, cost | derated specs, heat chamber acceptance, 10 percent spares |
| Camera or privacy backlash | reputation, shutdown | counting only, no images, signage, published privacy notice |
| Unclear ownership | alerts with no responder | governance charter and named responders per alert type |
| OT control causes a safety incident | injury, liability | fail safe defaults, manual override, change control, human in the loop |
| Platform outage during an event | missed alert | the local unit works alone for 72 hours, quarterly disconnected drills |
| Compromised device | false alerts, pivot | certificate per device, signed firmware, SOC monitoring, revocation |
| Merchant resistance | low adoption | merchant portal value early, footfall data shared with them first |
| Lifecycle underfunded | silent decay | five to seven year budget agreed in Phase 0, not after |
KPIs by phase
| KPI | Target | Measured from |
|---|---|---|
| Fire alert latency, sensor to operations | under 30 seconds | Phase 1 |
| Sensor uptime | above 98 percent | Phase 1 |
| Footfall count accuracy | above 90 percent | Phase 1 |
| Unauthorized device joins | zero | Phase 1 |
| The local unit works alone | 72 hours per drill | Phase 2 |
| Platform availability | 99.5 percent | Phase 2 |
| Mean time to acknowledge an alert | under 2 minutes | Phase 2 |
| Lighting energy reduction | 20 percent in adaptive zones | Phase 3 |
| Merchant portal adoption | 60 percent of shops | Phase 3 |
| Open data products with privacy review | 100 percent | Phase 3 |
| Patch of critical device vulnerabilities | within 30 days | Phase 4 |
| Annual penetration test and tabletop | completed | Phase 4 |
Glossary
24 TERMSThe words this vision leans on, in plain language.
- The local unit, what engineers call the edge: a small, rugged computer inside the souq, in a municipal room, that receives the sensors, runs the safety rules, and keeps the fire panel and the public address working even when the connection to the platform drops.
- Digital twin: a living digital copy of the souq. Here it is the registry of the sixty numbered map locations, each with its sensors and their latest readings.
- Trust zone: a group of systems that share the same level of trust and the same protections. This design has seven, from the public internet down to life safety.
- Conduit: the only controlled path between two trust zones, with a firewall that allows exactly what is listed and logs everything else.
- OT, operational technology: the systems that move something physical, here the lighting, the fire panel, the public address, and the ventilation.
- IoT, the internet of things: the sensors and small devices that measure the world and report over a network.
- LoRaWAN: a long range, low power radio network for small sensors. A handful of gateways cover the whole souq, and batteries last years.
- Gateway: the radio receiver that hears the sensors and forwards their packets to the local unit over fiber or a cellular backup.
- NB-IoT: a cellular network for small devices, used here as the backup path where fiber does not reach.
- MQTT and the broker: the messaging protocol the sensors publish on, and the server that receives and routes those messages. The broker only accepts devices it knows.
- Certificate per device: each device carries its own cryptographic identity, so a stolen or cloned device cannot pretend to be another.
- Signed command: an instruction that carries a cryptographic signature the conduit can verify before anything physical moves.
- Allow list: the short list of commands a conduit will pass. Everything not on it is refused.
- Store and forward: the local unit keeps readings when the platform is unreachable and sends them once the link returns.
- SOC, security operations center: the team and tools that watch the security events, from a rejected device to a blocked command.
- IEC 62443: the international standard for securing industrial and operational systems. Its zones and conduits shape this design.
- SBOM, software bill of materials: the list of every software component inside a device model, so a known vulnerability can be found and patched.
- Footfall: how many people pass a point per hour, counted anonymously, with no images kept.
- The heat stress index, WBGT: the wet bulb globe temperature, a heat stress index that combines temperature, humidity, sun, and wind.
- LEL, lower explosive limit: the lowest concentration of a gas that can ignite. The gas sensors alert at ten percent of it.
- PM10 and PM2.5: dust particles up to ten and two and a half microns across, the numbers that rise in a dust storm.
- NTU: the unit of turbidity, how cloudy water is.
- Tabletop exercise: a rehearsal around a table of how an incident would be handled, with the people who would actually handle it.
- Penetration test: an authorized attempt to break into the system, so the gaps are found before anyone else finds them.
Questions and answers
The questions people ask first.
- Is Smart Mubarakiya an official project? No. It is a personal vision by Ali AlEnezi and part of an educational experience. No authority, company, or merchant is involved, and the entities named are mentioned only to explain the ideas.
- Does it watch people? No. Footfall is counted anonymously in the local unit, there is no facial recognition, no images are stored, and no license plates are read. Privacy is a design rule here, not a setting.
- What happens when the internet goes down? The local unit inside the souq keeps the fire panel and the public address working, stores readings for 72 hours, and sends them once the link returns. This console works offline too, once you have visited it.
- What do the scenarios show? Seven step drills of what the design would do in a fire, a gas leak, a crowd surge, a dust storm, or a cyber attack stopped at the OT conduit, with sound and announcements, plus a builder that writes a drill for any place and sensor. All of it is simulated.
- Where do the numbers come from? The alert thresholds are sourced to KEPA, EN 54-5, NIOSH, ISO 7243, and crowd safety guidance. The map positions come from the illustrated map, the coordinates are measured where a name was verified and fitted from the drawing elsewhere, and every reading and alert on the page is simulated.
- How would it start? With a pilot in one zone: about sixty devices, three gateways, a pair of local units, and a tabletop exercise with the fire force before anything is accepted.
- Who drew the diagrams? Naqsha and Hisn, two tools by the same author, in English and in Arabic.
- Can I reuse this? The site is shared to read and discuss. Nothing here is offered for reuse.
Closing
The dream is that the souq stays as we know and love it, and becomes safer.
This vision, which I share here to read, is the start of a conversation about how, not a plan and not a project. And if one sensor under one awning ever raises one alarm one minute before what would have happened, the whole vision has already paid for itself.
The souq
PHOTOGRAPHS





Two centuries of trade under these roofs. Every photograph is a Creative Commons work by its photographer, credited here and in the credits section. Click any photo to enlarge.
Credits







These three bands are the patterns used on this site, original geometric designs drawn on the weaver's stepped grid rather than traditional named motifs, inspired by Al-Sadu, the Bedouin weaving of Kuwait that UNESCO inscribed as intangible cultural heritage of Kuwait and Saudi Arabia in 2020. Red, black, ivory, ochre, and a green thread, the colors of the tent.
Ali AlEnezi · Site@hotmail.com · 3li.info · linkedin.com/in/alenizi
Concept map and vision by Ali AlEnezi. Photographs are Creative Commons works by their photographers via Wikimedia Commons, unmodified apart from resizing. The drill announcements are recorded with neural voices, Kuwaiti Arabic and US English, generated for this project. SANS is named on this site only as a suggestion for training in IoT and OT security. Nothing here is taken from SANS material, which is copyrighted by SANS, and SANS has no connection to this work.