Morocco Unified Namespace Standard — IEIA Reference Specification v0.1
Status: Draft v0.1 — sector-agnostic core. Annexes A–E and worked example sit alongside in
Morocco UNS Annexes/. Maintainer: IEIA License (planned): CC-BY-4.0 once v1.0 is published.
1. Purpose & Scope
This document defines a Morocco-specific naming and structuring standard for a Unified Namespace (UNS) in industrial environments. Its purpose is to give every Moroccan industrial enterprise — phosphate, automotive, textile, agro-industrial, port — a single, predictable, machine-parseable way to name plants, areas, lines, equipment and signals so that data from any PLC, sensor or business system lands at the same logical address regardless of vendor.
A UNS, as framed by Walker Reynolds and adopted across Industry 4.0 practice, is the message-broker-mediated single source of truth that sits between operational technology (OT) and information technology (IT). The namespace itself — the naming convention — is what makes the broker useful. Without a standard, every site re-invents its own taxonomy and the system collapses back into point-to-point integration.
In scope
- ISA-95 hierarchy adapted to Moroccan multi-site, multi-region industrial reality
- Topic and path syntax (MQTT, Sparkplug B mapping)
- Metric and tag naming conventions (units, verbs, CESMII alignment)
- Mandatory metadata envelope on every payload
- Sector profiles for the five Moroccan industrial verticals
- Compliance hooks for CBAM, Digital Morocco 2030, CNDP
Out of scope (v0.1)
- Network topology and edge hardware sizing
- Broker hardening (TLS, mTLS, ACLs) — deferred to v0.2
- AuthN/AuthZ model — deferred to v0.2
- Arabic transliteration of taxonomy — deferred to v0.2
- Specific client pitch decks or commercial proposals
- Code (no broker config, no connector implementation)
2. Normative References
| Ref | Document | Use |
|---|---|---|
| ISA-95 Part 1 / IEC 62264-1 | Enterprise-control system integration | Hierarchical model (Enterprise → Site → Area → Work Unit) |
| MQTT v5.0 (OASIS) | Message Queuing Telemetry Transport | Transport |
| Sparkplug B v3.0 (Eclipse Foundation) | MQTT topic & payload spec for industrial | Topic structure, birth/death, Protobuf payloads |
| CESMII Smart Manufacturing Profiles | JSON Schema Draft 2020-12 | OEE, energy, production state, equipment models |
| ISO 8601 | Date and time format | All timestamps |
| ISO 3166-1 alpha-2 / 3166-2:MA | Country & subdivision codes | ma country, 12 region codes |
| BIPM SI Brochure | International System of Units | All units |
| CNDP Loi 09-08 | Moroccan personal data protection | Data-localization tagging |
| Digital Morocco 2030 | National digital strategy | SME diagnostic alignment |
| PAI 2021–2025 | Plan d’Accélération Industrielle | Sector priority alignment |
| EU Reg. 2023/956 (CBAM) | Carbon Border Adjustment Mechanism | Emissions-correlated tagging; first declaration May 2027 for OCP-class exporters |
Compatibility target: any UNS implementation built on the MaestroHub stack or an equivalent open-source stack (HiveMQ, EMQX, Mosquitto + Sparkplug B) must be able to consume this standard without modification.
3. Terminology
Primary language: English. French aliases provided because Moroccan industrial operations (OCP, Renault Tangier, Tanger Med, Stellantis Kenitra) run FR-internal. Arabic transliteration deferred to v0.2.
| EN (canonical) | FR (alias) | Definition |
|---|---|---|
| Enterprise | Entreprise | Top legal/commercial entity. One per organization. |
| Site | Site | A geographically distinct production location of an Enterprise. |
| Area | Aire / Zone | A logical production zone within a Site (e.g. extraction, paint shop). |
| Line | Ligne | A production line or process train within an Area. |
| Cell | Cellule | An equipment group or work unit within a Line. |
| Equipment | Équipement | A physical asset (machine, instrument). |
| Signal | Signal / Mesure | A named, time-varying value produced by Equipment. |
| Edge Node | Nœud Edge | A Sparkplug B edge device that publishes Signals on behalf of Equipment. |
| Namespace path | Chemin namespace | Slash-separated UNS address (see §5). |
| Metadata envelope | Enveloppe métadonnée | Mandatory fields on every published payload (see §7). |
| CBAM-relevant | Pertinent CBAM | Flag for any Signal that contributes to embedded-emissions reporting. |
4. ISA-95 Hierarchy Adapted to Morocco
4.1 Levels
ma / <region> / <enterprise> / <site> / <area> / <line> / <cell> / <equipment> / <signal>
Every UNS path is rooted at ma. This is non-negotiable: it is what makes the standard Moroccan and what allows multi-country operators (e.g. Stellantis, Renault, AVEVA-installed bases) to federate cleanly with future Tunisian, Egyptian, or Algerian deployments built on the same model.
4.2 Level definitions
| # | Segment | Required | Source of value | Example |
|---|---|---|---|---|
| 1 | Country | yes | ISO 3166-1 alpha-2, lowercase | ma |
| 2 | Region | yes | ISO 3166-2:MA, lowercase, hyphenated | ma-09 (Casablanca-Settat), ma-01 (Tanger-Tétouan-Al Hoceïma) |
| 3 | Enterprise | yes | Short legal slug, kebab-case | ocp, renault, stellantis, tanger-med |
| 4 | Site | yes | Site short name | jorf-lasfar, khouribga, tangier-melloussa, kenitra |
| 5 | Area | yes | Process zone | extraction, paint-shop, dyeing, quay-3 |
| 6 | Line | conditional | Production line / train | slurry-line-3, body-shop-a, washer-2 |
| 7 | Cell | conditional | Work unit / cell | flotation-cell-7, weld-cell-12 |
| 8 | Equipment | yes | Physical asset, kebab-case + tag | pump-p301, robot-r12, dryer-d04 |
| 9 | Signal | yes | See §6 metric naming | flow-rate-m3h, temperature-c, state |
Rules:
- Levels 6 and 7 are conditional: omit them if the Area has no meaningful Line/Cell sub-structure (e.g. a port quay, a single-flow textile dyeing house). Skipping a level is preferred over inventing an empty placeholder.
- Multi-site enterprises (OCP Group across Khouribga, Youssoufia, Benguerir, Safi, Jorf Lasfar) MUST use a single Enterprise segment and differentiate at the Site level.
- Free-zone industrial parks (Tanger Med, Kenitra Atlantic Free Zone, Casablanca Midparc) are not Enterprises. They are geographic context only and live inside the Region segment if needed via the ISO 3166-2 code; the Enterprise segment is always the operator (Renault, Stellantis, Lear, etc.).
- A Region MAY be omitted only for cross-region logical groupings published by an Enterprise itself (e.g.
ma/ocp/group-kpi/...); in that case the literal keywordgroup-kpireplaces both region and site segments. Use sparingly — discouraged for raw telemetry.
4.3 Region codes (ISO 3166-2:MA)
| Code | Region | Industrial relevance |
|---|---|---|
ma-01 | Tanger-Tétouan-Al Hoceïma | Renault Tangier, Tanger Med Port, Free Zone |
ma-02 | L’Oriental | Nador West Med (under construction) |
ma-03 | Fès-Meknès | Textile clusters, agro |
ma-04 | Rabat-Salé-Kénitra | Stellantis Kenitra, Atlantic Free Zone |
ma-05 | Béni Mellal-Khénifra | Agro-industry |
ma-06 | Casablanca-Settat | Industrial heartland, Casablanca Midparc, Jorf Lasfar (OCP), Berrechid |
ma-07 | Marrakech-Safi | OCP Safi, Benguerir, OCP-MS |
ma-08 | Drâa-Tafilalet | Mining, agro |
ma-09 | Souss-Massa | Agadir port, agro |
ma-10 | Guelmim-Oued Noun | — |
ma-11 | Laâyoune-Sakia El Hamra | Phosphate transit |
ma-12 | Dakhla-Oued Ed-Dahab | New port, fisheries |
Note: ISO 3166-2:MA codes were renumbered in 2015. v0.1 uses the post-2015 numeric codes. v0.2 will support the pre-2015 alpha codes as deprecated aliases for legacy systems.
4.4 Worked path examples
ma/ma-07/ocp/safi/slurry-line-3/pump-p301/flow-rate-m3h
ma/ma-01/renault/tangier-melloussa/paint-shop/booth-2/robot-r12/state
ma/ma-04/stellantis/kenitra/body-shop-a/weld-cell-12/cycle-time-s
ma/ma-06/danone-centrale/el-jadida/cold-storage/zone-3/temperature-c
ma/ma-01/tanger-med/port/quay-3/sts-crane-04/twin-lift-count
5. Topic & Path Syntax
5.1 Formal grammar (ABNF-style)
uns-path = "ma" "/" region "/" enterprise "/" site "/" area
[ "/" line ] [ "/" cell ] "/" equipment "/" signal
region = "ma-" 2DIGIT
segment = 1*32 ( lowercase / DIGIT / "-" )
lowercase = %x61-7A ; a-z
enterprise = segment
site = segment
area = segment
line = segment
cell = segment
equipment = segment
signal = segment
5.2 Lexical rules
- Lowercase only. No uppercase, no mixed case.
- Kebab-case. Words separated by
-. No_, no., no spaces. - No diacritics.
Tétouan→tetouan;Béni Mellal→beni-mellal. ASCII only. - Max segment length: 32 chars. Forces concise, identifier-style names.
- No leading/trailing hyphens in any segment.
- No reserved tokens as segments:
+,#,$,spBv1.0. - Stable identifiers. Once an Equipment is assigned an ID, it never changes. If equipment is replaced, append a generation suffix:
pump-p301-g2.
5.3 MQTT topic mapping
The full UNS path is published verbatim as the MQTT topic for non-Sparkplug telemetry, prefixed with the namespace root:
uns/<uns-path>
Example: uns/ma/ma-07/ocp/safi/slurry-line-3/pump-p301/flow-rate-m3h
5.4 Sparkplug B mapping
Sparkplug B prescribes spBv1.0/<group_id>/<message_type>/<edge_node_id>/<device_id>. This standard maps as follows:
| Sparkplug field | UNS path source |
|---|---|
group_id | <region>.<enterprise>.<site>.<area> joined by . (Sparkplug forbids / inside fields) |
edge_node_id | <line>.<cell> joined by ., or just <line> if no cell |
device_id | <equipment> |
| Metric name (within payload) | <signal> |
Example for the OCP slurry line:
- UNS path:
ma/ma-07/ocp/safi/slurry-line-3/pump-p301/flow-rate-m3h - Sparkplug topic:
spBv1.0/ma-07.ocp.safi.slurry-line-3/DDATA/.../pump-p301 - Metric in payload:
flow-rate-m3h
5.5 Wildcards
Subscribers SHOULD subscribe at the lowest level that satisfies their need. Common patterns:
- All signals from one site:
uns/ma/+/ocp/safi/# - All flow-rate signals nationally:
uns/ma/+/+/+/+/+/+/flow-rate-m3h - All CBAM-relevant signals from OCP: filter via §7 metadata flag, not topic.
5.6 Namespace browse and query access
The UNS path is the canonical address, but consumers also need controlled ways to discover and query the namespace without hard-coding topic strings. v0.1 therefore defines the following vendor-neutral access patterns:
| Access pattern | Requirement | Example use |
|---|---|---|
| Browse by hierarchy | A conformant implementation SHOULD expose a read-only tree of the ma/<region>/<enterprise>/<site>/... hierarchy. | A QHSE dashboard lists all signals available for one production line before building an audit view. |
| Query by asset type | A conformant implementation SHOULD support filtering by equipment/model class, not only by topic prefix. | Find all pump assets in OCP Safi with temperature-c and vibration-mm-s. |
| Query by evidence flag | A conformant implementation SHOULD support filtering by metadata fields such as cbam_relevant, cndp_class, quality_code, and iso_dimension. | Build a CBAM evidence stream without subscribing to non-emissions telemetry. |
| Query by use case | A conformant implementation MAY maintain logical views such as maintenance, quality, batch, energy, and audit. | A maintenance app receives motor-current and vibration payloads without seeing unrelated batch data. |
These access patterns MUST NOT weaken topic discipline. Query APIs are views over conformant paths and payloads; they are not a second namespace.
6. Metric & Tag Naming
6.1 Pattern
<noun>-<modifier>?-<unit>
<noun>— what is measured:flow,temperature,pressure,energy,state,oee,count,level.<modifier>— optional qualifier:inlet,outlet,setpoint,actual,target.<unit>— SI unit suffix, lowercase, no division slash. Use the unit table below.
6.2 Required units
| Quantity | Suffix | Notes |
|---|---|---|
| Energy | kwh | Always kilowatt-hour. MWh in payload value, never in suffix. |
| Power | kw | |
| Flow (volumetric) | m3h | m³/h written as m3h |
| Flow (mass) | tph | tonnes/hour |
| Pressure | bar or pa | Prefer bar for process; pa for HVAC. |
| Temperature | c | Celsius. Use k only for cryogenic. |
| Mass | kg or t | |
| Length | m | |
| Time | s | Cycle times in seconds. |
| Percent | pct | 0–100 scale. |
| Dimensionless count | (no suffix) | |
| State | state | Discrete enum, use CESMII production state |
6.3 Verb forms
- Setpoints:
<noun>-setpoint-<unit>→temperature-setpoint-c - Actuals:
<noun>-<unit>is implicitly the actual (default) - Targets/limits:
<noun>-target-<unit>,<noun>-min-<unit>,<noun>-max-<unit> - Counters:
<noun>-count→cycle-count,defect-count
6.4 CESMII alignment
Where a CESMII Smart Manufacturing Profile defines a metric, prefer the CESMII name over an ad-hoc one. Specifically:
- Production state → CESMII
ProductionStateenum (Producing, Idle, Down, Setup, Off) - Equipment status → CESMII
EquipmentStatus - Energy consumption per state → CESMII
ProductionStateEnergyConsumption(the 9-field schema documented in IIoT Platform Build Intelligence — Open Source Stack 2026) - OEE → CESMII
OverallEquipmentEffectiveness(withavailability,performance,qualitysub-metrics)
7. Mandatory Metadata Envelope
Every published payload, whether MQTT JSON or Sparkplug Protobuf, carries the following fields. These are non-negotiable — without them the payload is non-conformant and the broker SHOULD reject it (v0.2 will define the rejection mechanism).
| Field | Type | Required | Description |
|---|---|---|---|
timestamp_utc | ISO 8601 string | yes | UTC, millisecond precision. Producers in Morocco timezone (UTC+1, UTC+0 during Ramadan DST window) MUST convert. |
source_protocol | enum | yes | One of: s7, fins, modbus-rtu, modbus-tcp, opcua, ethernet-ip, mqtt, rest, manual. |
quality_code | enum | yes | OPC-UA-style: good, bad, uncertain, stale. |
unit | string | yes | SI unit string matching §6.2. Redundant with the signal name suffix on purpose — enables broker-side validation. |
iso_dimension | string | conditional | CESMII profile name if applicable (e.g. ProductionStateEnergyConsumption). |
cbam_relevant | boolean | yes | true for any Signal that contributes to embedded-emissions reporting (energy, fuel, process emissions, electricity grid factor inputs). Mandatory by May 2027 for OCP-class exporters. |
cndp_class | enum | yes | none, personal, sensitive. Almost always none for industrial telemetry; flag personnel-tracking signals. |
producer_id | string | yes | The Edge Node that published. |
schema_version | string | yes | This standard’s version: morocco-uns-0.1. |
7.1 Example JSON payload
{
"timestamp_utc": "2026-04-27T14:32:01.123Z",
"value": 412.6,
"unit": "m3h",
"source_protocol": "s7",
"quality_code": "good",
"iso_dimension": null,
"cbam_relevant": false,
"cndp_class": "none",
"producer_id": "edge-safi-line3-01",
"schema_version": "morocco-uns-0.1"
}7.2 Model and payload validation gates
Every sector-pack pipeline SHOULD validate payloads before they enter the trusted uns/ namespace. Validation is a standards requirement, not a tooling preference.
Minimum validation gates:
| Gate | Rule | Reject or quarantine when |
|---|---|---|
| Path grammar | Topic matches §4-5 grammar. | Segment is missing, non-ASCII, over-length, or uses a reserved token. |
| Unit consistency | unit matches the signal suffix in §6.2. | Topic says temperature-c but payload unit is f or missing. |
| Model completeness | Required attributes for the asset/process/product model are present. | A quality evidence object lacks order, part, timestamp, or quality status. |
| Source identity | producer_id is present and stable. | Payload cannot be tied to a known edge node or gateway. |
| Quality status | quality_code is one of the permitted values. | Payload is stale or uncertain and the consuming use case requires good data. |
| Evidence relevance | Compliance fields are explicit. | cbam_relevant or cndp_class is omitted. |
Recommended routing:
- Non-conformant payloads SHOULD land in
staging/<uns-path>or a dead-letter queue, notuns/<uns-path>. - Corrected payloads MAY be republished to
uns/<uns-path>only after the correction is logged. - A sector-pack conformance report SHOULD include counts for accepted, quarantined, corrected, and rejected payloads.
8. Sector Profiles
Sector-specific archetypes and mandatory tag lists are defined in dedicated annexes. Each annex provides: enterprise/site examples, area inventory, equipment archetypes, mandatory signals, and CBAM exposure.
- Annex A — Phosphate & Mining — OCP Group sites; extraction, beneficiation, slurry, drying, port loading; CBAM-critical
- Annex B — Automotive (Tanger Med corridor) — Renault Tangier, Stellantis Kenitra; stamping, body, paint, assembly; OEE mandatory
- Annex C — Textiles & Apparel — Casablanca/Fès/Tangier clusters; spinning, weaving, dyeing, CMT; ZDHC alignment
- Annex D — Agro-industry — Cooperatives + processors; cold-chain, batch traceability, HACCP CCPs as first-class signals
- Annex E — Ports & Logistics — Tanger Med, Casablanca, Jorf Lasfar, Nador West Med; gate, yard, quay, reefer, customs
A worked end-to-end example proving the standard parses cleanly is provided in Worked Example — OCP Safi Slurry Line.
9. Governance
9.1 Maintainer
The standard is maintained by IEIA. v0.1 is an internal draft. v1.0 will be published openly under CC-BY-4.0 with a public reference repository (planned location: github.com/ieia-ma/morocco-uns-standard).
9.2 Versioning
Semantic versioning of the spec:
- Major (1.0 → 2.0): breaking changes to path grammar or required fields.
- Minor (1.0 → 1.1): new sectors, new optional fields, new region codes, new CESMII profile alignments.
- Patch (1.0.0 → 1.0.1): editorial only.
The schema_version field in §7 carries the major.minor only. Producers running mixed versions MUST tag accurately.
9.3 Change-request process
- Issues opened against the public repo (post v1.0)
- Proposed changes presented at quarterly Cluster Maintenance 4.0 working sessions when relevant
- Sector annexes updated independently of the core standard, with their own minor version
9.4 Conformance
A producer is Morocco UNS v0.1 conformant if it:
- Publishes only on paths matching the §4–5 grammar
- Uses unit suffixes from §6.2 for all known quantities
- Includes the full §7 metadata envelope on every payload
- Honors the relevant sector annex when one exists
A consumer is conformant if it can parse all conformant producer payloads without producer-specific shims.
10. Compliance Hooks
The standard is designed so that three external regulatory regimes can be served from the same UNS without parallel pipelines.
10.1 CBAM (EU Reg. 2023/956)
The cbam_relevant: true flag in §7, combined with CESMII ProductionStateEnergyConsumption alignment in §6.4, gives an exporter everything required for the first mandatory declaration in May 2027. Any energy, fuel-flow, electricity-purchase, or direct-emission signal must carry the flag. A reporting consumer can build the embedded-emissions inventory by subscribing to uns/# and filtering on the flag.
This matters most to OCP Group (phosphoric acid and fertilizer exports to EU), cement exporters, steel, and aluminum.
10.2 Digital Morocco 2030 SME diagnostic
The 8-dimension maturity framework defined in DigiTPME Digital Maturity Model v1 uses a 0–5 scale that this standard reuses for UNS adoption maturity:
| Level | Label | UNS state |
|---|---|---|
| 0 | Paper-based | No telemetry |
| 1 | Computerization | Local SCADA, no broker |
| 2 | Connectivity | Some sensors published, ad-hoc topics |
| 3 | Visibility | Conformant UNS, single site |
| 4 | Transparency | Multi-site UNS, CESMII-aligned analytics |
| 5 | Predictability | UNS-fed agentic AI, autonomous control loops |
This lets a DigiTPME diagnostic consume UNS conformance data directly as evidence for the Operations and Data Quality dimensions.
10.3 CNDP (Loi 09-08)
The cndp_class field in §7 enables data-localization tagging at the signal level. Industrial telemetry is almost always none; the field exists so that personnel-positioning, biometric, or HR-linked signals can be flagged and routed to in-country brokers only.
Related notes
- Industry 4.0
- IoT and Sensors
- IIoT Platform Build Intelligence — Open Source Stack 2026
- 4.0 Solutions Channel — Intelligence & Frameworks 2026
- Morocco Industry 4.0 Landscape 2026
- OCP Group — Innovation Ecosystem & Client Intelligence 2026
- MaestroHub — Intelligence & Strategic Assessment 2026
- DigiTPME Digital Maturity Model v1
- Carbon Compliance
- ISO and Governance
Change log
- 2026-05-27 — HighByte ingestion delta. Added vendor-neutral namespace browse/query access patterns and model/payload validation gates inspired by Industrial DataOps benchmarking; no HighByte-specific claims added.
- 2026-04-27 — v0.1 draft created. Sector-agnostic core complete; annexes A–E and worked example forthcoming.