Studio Matrx Monthly · Volume 1 · Issue 3 · August 2026
Amogh N P
 In loving memory of Amogh N P — Architect · Designer · Visionary 
IoT Protocols: MQTT & LoRaWANLesson 2.3
DTS for Architecture, Planning & Urban Design/Module 2 · Connectivity & Protocols

Lesson 2.3 · Connectivity & Protocols

IoT Protocols: MQTT & LoRaWAN

The internet-age protocols: lightweight pub/sub over IP, and long-range low-power wireless

13 min Interactive lessonFree · open lessonByAmogh N P· Architect & interior designer
The hook

The old protocols poll: are you there, what is your value, again, again. The new ones let a sensor speak only when it has something to say.

BACnet, Modbus and KNX were designed for wired plant on a bus, and they mostly work by polling - a master repeatedly asks each device for its value. That is fine for a few dozen controllers on a wire. It scales badly to thousands of scattered, battery-powered sensors, where waking up to answer constant questions would drain the batteries in weeks.

The internet of things needed different protocols - lightweight, IP-native, event-driven and frugal with power and bandwidth. Two dominate the building world: MQTT, a tiny publish/subscribe messaging protocol that runs over IP, and LoRaWAN (with Zigbee for shorter range), low-power wireless built so a coin-cell sensor can last years. Understanding pub/sub versus polling, and when to reach for each, is the modern half of building connectivity.

Pub/sub > polling for scale. MQTT broker + topics = decoupled data plane. LoRaWAN long range, Zigbee mesh. Twin subscribes.

Polling versus publish/subscribe

The older building protocols are mostly poll-driven: a master (the BMS) walks around asking each device what is your value now? over and over. It is simple and predictable, and it works when devices are few, powered and on a fast wire. But it is chatty and wasteful - most answers are unchanged - and it couples every consumer of data tightly to every producer, because the asker must know exactly who to ask and how.

Publish/subscribe (pub/sub) flips this. A device (a publisher) sends a message only when it has something to report - a new reading, a state change - to a central broker, tagged with a topic. Anyone interested (a subscriber) tells the broker which topics it wants, and the broker forwards matching messages. Crucially, publishers and subscribers never need to know about each other - they only know the broker and the topic. This decoupling is the superpower: you can add a new dashboard, a new analytics job or a digital twin as just another subscriber, without touching the sensors, and a sensor can sleep between events, saving battery and bandwidth. Event-driven pub/sub is why the modern IoT and twin data plane looks so different from a polled BMS.

There is a subtler benefit too. Polling makes scaling painful: doubling the sensors roughly doubles the questions the master must ask, and adding a new consumer means teaching it who to poll. Pub/sub scales the other way - the broker fans messages out, so adding the ten-thousandth sensor or the fifth dashboard barely disturbs anything. This is not to say polling is obsolete; for a small, fixed set of wired controllers it is perfectly sensible, which is why the older protocols still poll happily. But for sprawling, changing, battery-powered fleets, event-driven wins decisively.

MQTT PUBLISH / SUBSCRIBEPUBLISHERSSUBSCRIBERSCO2 sensorTemp sensorEnergy meterMQTT brokerroutes by topicsite/floor2/#DashboardAnalyticsDigital twinpublishsubscribePublishers speak only on change; subscribers get only their topics; neither knows the other.
Zoom
MQTT publish/subscribe. Sensors publish to topics on a central broker only when they have something to report; the BMS, analytics and the digital twin each subscribe to the topics they want. Publishers and subscribers never know about each other - add a new subscriber, touch no sensor.

MQTT: lightweight pub/sub over IP

MQTT (originally MQ Telemetry Transport, now an OASIS standard) is the dominant lightweight messaging protocol of the IoT, and the pub/sub model above is exactly how it works. It was designed for constrained devices and unreliable networks - tiny message headers, minimal overhead, and it runs over standard TCP/IP so it rides any IP network, wired or wireless.

At its centre is the MQTT broker (such as Eclipse Mosquitto or HiveMQ). Devices publish to hierarchical topics like site/floor2/room14/temperature, and clients subscribe to topics or wildcards (site/floor2/# for everything on floor 2). MQTT adds practical touches: Quality of Service (QoS) levels let you choose at-most-once, at-least-once or exactly-once delivery; retained messages keep the last value for new subscribers; and a last will and testament lets the broker announce when a device drops off. Because it is IP-native, decoupled and frugal, MQTT has become the common data plane connecting sensors, gateways, platforms and digital twins - very often the protocol on which a twin actually receives its live stream. It carries messages but, like a network, does not itself define their meaning; a payload convention (often JSON, sometimes with Sparkplug or a schema) supplies that.

Because MQTT is a common data plane, it is also a place where security must be taken seriously: brokers should use TLS encryption, authenticate every client, and restrict which topics a client may publish or subscribe to, so a compromised sensor cannot read or forge the whole building's data. As with the network, treat this hardening as work for qualified professionals rather than a default left open.

MQTT PUBLISH / SUBSCRIBEPUBLISHERSSUBSCRIBERSCO2 sensorTemp sensorEnergy meterMQTT brokerroutes by topicsite/floor2/#DashboardAnalyticsDigital twinpublishsubscribePublishers speak only on change; subscribers get only their topics; neither knows the other.
Zoom
MQTT publish/subscribe. Sensors publish to topics on a central broker only when they have something to report; the BMS, analytics and the digital twin each subscribe to the topics they want. Publishers and subscribers never know about each other - add a new subscriber, touch no sensor.

LoRaWAN and Zigbee: low-power wireless

MQTT still assumes an IP network. For battery sensors scattered where no cable and no mains reach - a car park, a basement, a sprawling campus - you need low-power wireless that gets the reading to a gateway, which then often republishes it over MQTT.

LoRaWAN is built for long range and tiny power. Using LoRa radio in unlicensed sub-GHz bands, a sensor can reach a gateway kilometres away through walls and floors and run for years on a small battery - at the cost of very low data rates and infrequent messages. Its architecture is a star-of-stars: end devices talk to any gateway in range; gateways forward to a central network server, which deduplicates and hands data to the application. It is ideal for sparse, low-frequency telemetry: utility meters, leak and environmental sensors, occupancy counts across a large estate.

Zigbee (and its cousins Z-Wave, Thread and BLE) serves the shorter, denser indoor case. Zigbee forms a self-healing mesh where mains-powered devices relay for battery ones, giving reliable room-scale coverage - common in smart lighting, plugs and home and building sensor networks. The trade is range and topology: Zigbee blankets a floor with a mesh; LoRaWAN reaches across a site with a star. Both exist because Wi-Fi is too power-hungry for a coin-cell device meant to last years.

These low-power radios come with honest limits worth stating plainly. Their low data rates suit small, occasional messages, not video or fast control. Unlicensed bands are shared, so heavy use in a dense area can bring congestion. And range figures quoted by vendors assume open conditions - thick concrete, steel and basements cut them sharply, which is exactly why a proper site survey, not optimism, should decide gateway placement. Used within those limits, though, they are transformative for retrofits.

LOW-POWER WIRELESS -> MQTTLoRaWAN (long range)nodenodenodeLoRagatewaynetworkserverZigbee (room mesh)MQTT brokerclean streamDigital twinsubscribesDifferent radios at the edge; one clean MQTT stream to the twin.
Zoom
Low-power wireless feeding the IP data plane. LoRaWAN carries sparse readings kilometres from battery end-nodes through gateways to a network server; Zigbee blankets a floor as a self-healing mesh. Both are normalised at a gateway and republished over MQTT - the twin drinks from one clean stream.

LoRaWAN = long range, low rate, star-of-stars, years on a battery. Zigbee = room-scale self-healing mesh.

Choosing the right protocol for the job

These protocols are not rivals so much as specialists for different distances and constraints, and real buildings layer them. A practical decision guide:

Use MQTT as the IP-level data plane whenever devices or gateways can reach an IP network and you want decoupled, event-driven streaming into a platform or twin - it is the connective tissue above the field. Use LoRaWAN for sparse, battery, long-range telemetry where messages are small and infrequent and no IP or mains is available. Use Zigbee/Thread/BLE for dense, room-scale, battery devices - lighting, indoor sensors, wearables - where a self-healing mesh suits. Keep BACnet/Modbus/KNX (last lesson) for the wired plant and controls they were built for.

A typical modern building runs several at once: KNX and BACnet on the wired plant, Zigbee meshes in fit-out zones, LoRaWAN for far-flung meters - all normalised at gateways and carried upward over MQTT into the platform and twin. The skill is not loyalty to one protocol but matching each to its niche, and recognising the gateways that translate low-power and legacy worlds into a single, clean IP stream. That stream is what the twin ultimately drinks from.

LOW-POWER WIRELESS -> MQTTLoRaWAN (long range)nodenodenodeLoRagatewaynetworkserverZigbee (room mesh)MQTT brokerclean streamDigital twinsubscribesDifferent radios at the edge; one clean MQTT stream to the twin.
Zoom
Low-power wireless feeding the IP data plane. LoRaWAN carries sparse readings kilometres from battery end-nodes through gateways to a network server; Zigbee blankets a floor as a self-healing mesh. Both are normalised at a gateway and republished over MQTT - the twin drinks from one clean stream.

A worked example: a retrofit sensing layer

Picture retrofitting an occupied office with fresh sensing without rewiring it. You scatter battery CO2, temperature and occupancy sensors through the floors. Indoors, in dense zones, they join a Zigbee mesh to a floor gateway; the far basement plant room and the outdoor car-park meters, too remote for the mesh, use LoRaWAN to a rooftop gateway and its network server.

Both gateways translate their low-power worlds into MQTT, publishing to tidy topics - office/floor3/zoneB/co2, office/carpark/meter1/kwh. A single MQTT broker now holds the whole live stream. The BMS, an analytics service and the digital twin each subscribe to the topics they care about, entirely unaware of whether a given reading arrived by Zigbee or LoRaWAN. Add a new energy dashboard next month and it is just one more subscriber - no sensor is touched.

This is the modern pattern in miniature: low-power wireless at the edge, gateways translating, MQTT as the decoupled data plane, and the twin as one more subscriber. It is frugal, flexible and retrofit-friendly - everything the polled, wired protocols of the last lesson are not, and the reason both generations coexist in one building.

Zigbee/LoRaWAN at the edge -> gateway -> MQTT broker -> BMS, analytics and twin all just subscribe. Add-one, touch-none.

Protocols & standards in this lesson

MQTT (OASIS standard)

Lightweight publish/subscribe over IP

Broker plus topics; frugal, decoupled, event-driven. The common data plane feeding platforms and digital twins.

LoRaWAN (LoRa radio)

Long-range, low-power wireless

Kilometre range, years on a battery, low data rate; star-of-stars via gateways to a network server. For sparse telemetry.

Zigbee / Thread / BLE

Short-range low-power mesh

Self-healing room-scale mesh for dense battery devices - lighting, plugs, indoor sensors. Complements LoRaWAN.

Publish/subscribe vs polling

Two models for moving data

Event-driven pub/sub decouples producers from consumers and saves power; polling is simpler but chatty and tightly coupled.

Hands-on workshop

Workshop — see publish/subscribe for yourself

Pub/sub sounds abstract until you watch a message you publish arrive at a subscriber you set up. This exercise uses free, standard MQTT tooling so you can feel the decoupling first-hand - no building hardware needed.

A laptop and a free MQTT broker/client (Mosquitto, MQTT Explorer, or a public test broker). Optional: a hobby sensor board.

Given & goal
Goal: experience the pub/sub model MQTT and twins rely on
Inputs: a laptop with internet, or a free/public MQTT broker
Time: ~30 minutes
  1. 1Set up a broker: install Eclipse Mosquitto locally, or use a public test broker. Note its address - this is the middle everyone talks through.
  2. 2Open two terminals or a browser MQTT client. In one, subscribe to a topic such as smx/demo/temp (or a wildcard smx/demo/#).
  3. 3In the other, publish a value to smx/demo/temp and watch it appear at the subscriber. Publish again - only your messages, only when you send them.
  4. 4Add a second subscriber to the same topic and publish once more: both receive it, and neither publisher nor subscribers know about each other. That is the decoupling.
  5. 5Sketch how this maps to a building: sensors as publishers, the broker in the middle, and the BMS, analytics and digital twin as independent subscribers. Note where LoRaWAN or Zigbee gateways would feed in.

You’ll walk away with
A short write-up (with a screenshot if possible) of your publish/subscribe test, plus a labelled sketch mapping sensors, broker, topics and subscribers to a building - and one sentence on why decoupling helps a twin.

The worked example

Three altitudes on the same idea

Read the band that fits you — or all three.

For the architectBuildings that sense & adapt

These protocols are what make retrofits and phased sensing feasible. Battery LoRaWAN and Zigbee let you instrument an existing or occupied building without chasing cables through finished walls, and MQTT keeps the data architecture open for whatever comes next. Designing in gateway locations, rooftop LoRaWAN coverage and IP paths for brokers turns a hard retrofit into a straightforward one.

For the interior designerSmart comfort, wellbeing & experience

Zigbee, Thread and BLE are the fabric of responsive interiors. Wireless lighting, smart plugs, room comfort and occupancy sensing that adapt a space to its people usually ride these low-power meshes - no visible wiring, easily reconfigured as layouts change. Understanding their mesh nature (mains devices relay for battery ones) helps you place fixtures so coverage stays reliable across the design.

For the studentSkills, portfolio & proptech jobs

Pub/sub and MQTT are genuinely learnable this week. You can install a free broker like Mosquitto, publish and subscribe to topics from your laptop, and feel the decoupling that powers modern IoT and digital twins. Pair that with understanding LoRaWAN and Zigbee trade-offs and you hold the modern half of building connectivity - exactly the skills IoT and proptech teams hire for.

Misconception check

MQTT and LoRaWAN are competing standards - you pick one and it replaces the others.

They operate at different layers and distances, so they cooperate rather than compete. LoRaWAN (and Zigbee) are low-power wireless ways to get a reading from a battery sensor to a nearby gateway; MQTT is an IP-level messaging protocol that carries data between gateways, platforms and applications once it is on a network. A common architecture uses all of them: a sensor speaks LoRaWAN or Zigbee to a gateway, the gateway republishes over MQTT, and BACnet or Modbus still run the wired plant beneath. Choosing one does not replace the others; real buildings layer them, each in the niche it was designed for.
Try it

Do it yourself

Reason it through - and try the broker if you can.

  1. 1Explain the difference between polling and publish/subscribe in one sentence each.
  2. 2What is an MQTT broker, and what is a topic?
  3. 3Why does pub/sub let you add a new digital twin without touching the sensors?
  4. 4When would you choose LoRaWAN over Zigbee, and vice versa?
  5. 5Why do MQTT, LoRaWAN and Zigbee coexist rather than replace each other?
Take this with you

The one line to carry out

Modern IoT is event-driven: sensors publish only when they have something to say. MQTT carries those messages over IP through a broker to any subscriber - decoupling producers from consumers - while LoRaWAN and Zigbee get battery readings from the edge to a gateway. The twin is usually just another MQTT subscriber.
Take it further
References & further reading

Peer-reviewed journals & authoritative standards

  1. 01MQTTWikipedia, 2026.
  2. 02MQTT - official siteOASIS, 2026.
  3. 03LoRa / LoRaWANWikipedia, 2026.
  4. 04ZigbeeWikipedia, 2026.
  5. 05Internet of thingsWikipedia, 2026.
Related lessons
Recap
The internet-age protocols solve what polled, wired protocols cannot: thousands of scattered battery sensors. MQTT is a lightweight publish/subscribe protocol over IP, using a broker and topics to decouple producers from consumers, which is why a twin can subscribe without touching sensors. LoRaWAN gives long-range low-rate telemetry and Zigbee gives room-scale mesh; gateways translate both into MQTT as the common data plane.
Carry forward →

We now have data streaming in - polled from wired plant, published from wireless sensors, all converging on brokers and gateways. The last connectivity question is _where the computing happens_: on-site at the edge, or up in the cloud? Next: edge, cloud and gateways.

A

The author

Amogh N P

Architect, interior designer, and creative polymath. Studio Matrx began in his notebooks — his vision of design made honest, useful, and open to everyone. Its Academy is written and taught in his memory, and free, forever.

More about Amogh →