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

RefDocumentUse
ISA-95 Part 1 / IEC 62264-1Enterprise-control system integrationHierarchical model (Enterprise → Site → Area → Work Unit)
MQTT v5.0 (OASIS)Message Queuing Telemetry TransportTransport
Sparkplug B v3.0 (Eclipse Foundation)MQTT topic & payload spec for industrialTopic structure, birth/death, Protobuf payloads
CESMII Smart Manufacturing ProfilesJSON Schema Draft 2020-12OEE, energy, production state, equipment models
ISO 8601Date and time formatAll timestamps
ISO 3166-1 alpha-2 / 3166-2:MACountry & subdivision codesma country, 12 region codes
BIPM SI BrochureInternational System of UnitsAll units
CNDP Loi 09-08Moroccan personal data protectionData-localization tagging
Digital Morocco 2030National digital strategySME diagnostic alignment
PAI 2021–2025Plan d’Accélération IndustrielleSector priority alignment
EU Reg. 2023/956 (CBAM)Carbon Border Adjustment MechanismEmissions-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
EnterpriseEntrepriseTop legal/commercial entity. One per organization.
SiteSiteA geographically distinct production location of an Enterprise.
AreaAire / ZoneA logical production zone within a Site (e.g. extraction, paint shop).
LineLigneA production line or process train within an Area.
CellCelluleAn equipment group or work unit within a Line.
EquipmentÉquipementA physical asset (machine, instrument).
SignalSignal / MesureA named, time-varying value produced by Equipment.
Edge NodeNœud EdgeA Sparkplug B edge device that publishes Signals on behalf of Equipment.
Namespace pathChemin namespaceSlash-separated UNS address (see §5).
Metadata envelopeEnveloppe métadonnéeMandatory fields on every published payload (see §7).
CBAM-relevantPertinent CBAMFlag 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

#SegmentRequiredSource of valueExample
1CountryyesISO 3166-1 alpha-2, lowercasema
2RegionyesISO 3166-2:MA, lowercase, hyphenatedma-09 (Casablanca-Settat), ma-01 (Tanger-Tétouan-Al Hoceïma)
3EnterpriseyesShort legal slug, kebab-caseocp, renault, stellantis, tanger-med
4SiteyesSite short namejorf-lasfar, khouribga, tangier-melloussa, kenitra
5AreayesProcess zoneextraction, paint-shop, dyeing, quay-3
6LineconditionalProduction line / trainslurry-line-3, body-shop-a, washer-2
7CellconditionalWork unit / cellflotation-cell-7, weld-cell-12
8EquipmentyesPhysical asset, kebab-case + tagpump-p301, robot-r12, dryer-d04
9SignalyesSee §6 metric namingflow-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 keyword group-kpi replaces both region and site segments. Use sparingly — discouraged for raw telemetry.

4.3 Region codes (ISO 3166-2:MA)

CodeRegionIndustrial relevance
ma-01Tanger-Tétouan-Al HoceïmaRenault Tangier, Tanger Med Port, Free Zone
ma-02L’OrientalNador West Med (under construction)
ma-03Fès-MeknèsTextile clusters, agro
ma-04Rabat-Salé-KénitraStellantis Kenitra, Atlantic Free Zone
ma-05Béni Mellal-KhénifraAgro-industry
ma-06Casablanca-SettatIndustrial heartland, Casablanca Midparc, Jorf Lasfar (OCP), Berrechid
ma-07Marrakech-SafiOCP Safi, Benguerir, OCP-MS
ma-08Drâa-TafilaletMining, agro
ma-09Souss-MassaAgadir port, agro
ma-10Guelmim-Oued Noun
ma-11Laâyoune-Sakia El HamraPhosphate transit
ma-12Dakhla-Oued Ed-DahabNew 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

  1. Lowercase only. No uppercase, no mixed case.
  2. Kebab-case. Words separated by -. No _, no ., no spaces.
  3. No diacritics. Tétouantetouan; Béni Mellalbeni-mellal. ASCII only.
  4. Max segment length: 32 chars. Forces concise, identifier-style names.
  5. No leading/trailing hyphens in any segment.
  6. No reserved tokens as segments: +, #, $, spBv1.0.
  7. 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 fieldUNS 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 patternRequirementExample use
Browse by hierarchyA 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 typeA 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 flagA 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 caseA 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

QuantitySuffixNotes
EnergykwhAlways kilowatt-hour. MWh in payload value, never in suffix.
Powerkw
Flow (volumetric)m3hm³/h written as m3h
Flow (mass)tphtonnes/hour
Pressurebar or paPrefer bar for process; pa for HVAC.
TemperaturecCelsius. Use k only for cryogenic.
Masskg or t
Lengthm
TimesCycle times in seconds.
Percentpct0–100 scale.
Dimensionless count(no suffix)
StatestateDiscrete 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>-countcycle-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 ProductionState enum (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 (with availability, performance, quality sub-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).

FieldTypeRequiredDescription
timestamp_utcISO 8601 stringyesUTC, millisecond precision. Producers in Morocco timezone (UTC+1, UTC+0 during Ramadan DST window) MUST convert.
source_protocolenumyesOne of: s7, fins, modbus-rtu, modbus-tcp, opcua, ethernet-ip, mqtt, rest, manual.
quality_codeenumyesOPC-UA-style: good, bad, uncertain, stale.
unitstringyesSI unit string matching §6.2. Redundant with the signal name suffix on purpose — enables broker-side validation.
iso_dimensionstringconditionalCESMII profile name if applicable (e.g. ProductionStateEnergyConsumption).
cbam_relevantbooleanyestrue 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_classenumyesnone, personal, sensitive. Almost always none for industrial telemetry; flag personnel-tracking signals.
producer_idstringyesThe Edge Node that published.
schema_versionstringyesThis 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:

GateRuleReject or quarantine when
Path grammarTopic matches §4-5 grammar.Segment is missing, non-ASCII, over-length, or uses a reserved token.
Unit consistencyunit matches the signal suffix in §6.2.Topic says temperature-c but payload unit is f or missing.
Model completenessRequired attributes for the asset/process/product model are present.A quality evidence object lacks order, part, timestamp, or quality status.
Source identityproducer_id is present and stable.Payload cannot be tied to a known edge node or gateway.
Quality statusquality_code is one of the permitted values.Payload is stale or uncertain and the consuming use case requires good data.
Evidence relevanceCompliance 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, not uns/<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.

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:

  1. Publishes only on paths matching the §4–5 grammar
  2. Uses unit suffixes from §6.2 for all known quantities
  3. Includes the full §7 metadata envelope on every payload
  4. 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:

LevelLabelUNS state
0Paper-basedNo telemetry
1ComputerizationLocal SCADA, no broker
2ConnectivitySome sensors published, ad-hoc topics
3VisibilityConformant UNS, single site
4TransparencyMulti-site UNS, CESMII-aligned analytics
5PredictabilityUNS-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.


  • 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.