Building IoT / Smart Building with LoRaWAN
Timo Wevelsiep•Updated: 30.06.2026Editorial note: Versions, commands and prices may change. Please verify critical steps independently before production use. This guide does not replace individual consulting.
Build a sovereign smart building? WZ-IT plans, builds and runs self-hosted building IoT with LoRaWAN on your infrastructure - without cloud lock-in and without per-device licences. See our IoT services - See our LoRaWAN service
Building IoT with LoRaWAN means: battery-powered radio sensors capture occupancy, indoor climate, energy, leaks and door states, a single gateway per building aggregates the radio signals, and a self-hosted stack of ChirpStack, ThingsBoard and Grafana turns it into dashboards and alarms. The key advantage over Wi-Fi or bus solutions: the 868 MHz signal penetrates walls and floors, the sensors run for years without a power connection, and no new cabling is needed. This article covers the use cases, the sovereign stack and what matters for data protection.
Contents
- Why LoRaWAN is the right choice for buildings
- Smart building use cases
- The sovereign self-hosted stack
- Sensors: Milesight for climate, presence, leaks and energy
- Data protection and EU sovereignty in the building
- From pilot floor to a fully rolled-out building
- Implement building IoT with WZ-IT
Why LoRaWAN is the right choice for buildings
A building is a radio challenge: reinforced concrete, fire walls, basements and complex floor plans attenuate every signal. This is exactly where LoRaWAN plays to its strengths. The licence-free EU868 band penetrates walls and ceilings far better than 2.4 GHz Wi-Fi. In practice a single indoor gateway often covers an entire building, including basements and plant rooms.
Four properties make LoRaWAN such a good fit for smart buildings:
- Penetration: 868 MHz reaches sensors even behind several walls and in basements.
- Battery life: Class A sensors transmit only briefly and sleep the rest of the time. Three to five years per cell is common, and some models last longer.
- One gateway per building: Instead of distributing access points per floor, a single gateway usually suffices. One gateway serves hundreds to over a thousand sensors.
- No cabling: Sensors are glued or screwed on - no cable trays, no chasing channels into walls, no electrician for every measurement point. That makes LoRaWAN ideal for retrofitting existing buildings.
This resolves a classic dilemma: KNX, Modbus or BACnet need continuous cabling, while Wi-Fi sensing needs power and dense access-point coverage. LoRaWAN brings both together - wireless and low-power.
Smart building use cases
The main use cases cover comfort, space utilisation, energy and damage prevention:
| Use case | What is measured | Typical sensor | Benefit |
|---|---|---|---|
| Presence / occupancy | Motion, presence, desk usage | Milesight VS330, PIR in AM319 | Optimise space, clean on demand, desk sharing |
| Indoor climate | CO2, temperature, humidity, particulates | Milesight AM103, AM319 | Air quality, focus, demand-based ventilation |
| Energy / heating | Current draw, active power, flow temperature | Milesight CT101/CT103 | Make consumption visible, spot load peaks |
| Leak / water | Water on floors and pipes | Milesight WS303 | Stop water damage early, lower insurance risk |
| Doors / windows | Open/closed, tamper | Milesight WS301 | Security, avoid heating with windows open |
| Asset tracking | Location and state of mobile equipment | LoRaWAN tracker | Find devices, roll cages, medical equipment |
In practice projects combine several of these. An office building often starts with CO2 and occupancy sensors (comfort and space optimisation) and later adds energy and leak sensing. Machine and plant monitoring within the building, for example in the plant room, can be retrofitted along the same pattern - covered in our article on predictive maintenance & retrofit.
The sovereign self-hosted stack
LoRaWAN only pays off with a backend you control yourself. Instead of sending data to a vendor cloud with per-device billing, we build a fully open-source stack on your infrastructure:
| Layer | Component | Licence / note |
|---|---|---|
| Radio capture | LoRaWAN gateway (indoor) | hardware, one device per building |
| Network server | ChirpStack v4 | MIT, NS + application UI merged |
| Platform | ThingsBoard CE | Apache 2.0, unlimited devices |
| Visualisation | Grafana OSS + InfluxDB | AGPLv3 / MIT, long-term trends |
Here is how the data flows: the sensors transmit AES-128-encrypted to the gateway, which forwards the packets to ChirpStack as a pure packet forwarder. ChirpStack deduplicates, decrypts and passes the readings via MQTT to ThingsBoard, where device management, the rule engine, alarms and operational dashboards run. For long-term trends and mixed data sources we additionally write the time-series to InfluxDB and visualise them in Grafana - the step-by-step setup is in Grafana IoT dashboard with InfluxDB.
ChirpStack v4 merges the network server and the former application-server UI into one application and ships multi-region support plus MQTT, database and cloud integrations (chirpstack.io). How we set up and run the network server is described on our ChirpStack expertise. Why self-hosted is usually cheaper and more sovereign than managed clouds such as AWS IoT or Azure IoT is explored in IoT self-hosted vs. cloud.
Sensors: Milesight for climate, presence, leaks and energy
For hardware we rely on cross-vendor-compatible LoRaWAN sensors. The Milesight range has proven itself and covers the typical building measurands (all figures per Milesight datasheets):
- Indoor climate: The AM103 is a compact 3-in-1 sensor for CO2 (400 to 5000 ppm), temperature and humidity with an E-ink display and around three years of battery life. The AM319 extends this to up to nine measurands including TVOC, HCHO/O3, particulates (PM2.5/PM10), light and PIR motion, with a 4.2-inch display and traffic-light indicator (Works-with-WELL certified).
- Presence/occupancy: The VS330 captures occupancy of rooms and workplaces, and the PIR channel in the AM319 adds motion.
- Leak/water: The WS303 detects water from 0.5 mm depth, raises a local audible alarm and reports remotely - up to five years of battery life.
- Doors/windows: The magnetic contact WS301 reports opening, closing and tampering, with over four years of battery life.
- Robust temperature/humidity: The EM300-TH is IP67-rated (Sensirion sensing, up to five years on a 4000 mAh cell) and suits plant rooms and outdoor areas.
- Energy/heating: The CT101/CT103 smart current transformers clamp around the conductor without de-energising the system and measure current and energy; the CT101 harvests its power from the measured conductor (energy harvesting) and is therefore maintenance-free.
Because LoRaWAN is an open standard, you can mix sensors from different vendors on the same network - there is no lock-in to a proprietary ecosystem.
Data protection and EU sovereignty in the building
Building data is more sensitive than it first appears. Occupancy and presence data can become GDPR-relevant as soon as it is traceable to individual workplaces or people. That is exactly why the self-hosted approach is not an end in itself here:
- Data sovereignty: Telemetry never leaves the building or your EU infrastructure. No data in a US or Asian cloud.
- Data minimisation: Presence can be evaluated aggregated at room or zone level instead of tracking individuals. PIR and microwave sensors deliberately deliver no video, only an occupied/free signal.
- Access control: Roles and tenants in ThingsBoard separate who can see which floor or which tenant.
- Encryption: LoRaWAN is end-to-end AES-128-encrypted; the gateway never sees the payload in clear text.
The result is a smart building that delivers measurable value without surveilling staff or handing data sovereignty to a cloud provider.
From pilot floor to a fully rolled-out building
The pragmatic path starts small. We equip a pilot floor or a building wing: one gateway, a handful of sensors for the most important measurands, ChirpStack and ThingsBoard set up, dashboards and the first alarm rules (such as CO2 above a limit or water detected). Once this data path from sensor to dashboard runs reliably, the rollout scales almost linearly: more floors, more measurands, more buildings on the same stack.
Because the stack is open source and has no per-device licence jumps, it grows with you - from a pilot to a property with thousands of sensors. ThingsBoard Professional self-managed, if needed, starts at 10 USD/month in the Maker plan per the price list (as of 30 Jun 2026, thingsboard.io/pricing); many building scenarios are already fully covered by the free Community Edition.
Implement building IoT with WZ-IT
We plan the radio coverage, select the gateway and sensors to match your goals, set up the sovereign stack of ChirpStack, ThingsBoard and Grafana, and build dashboards and alarms that actually get used in operation. Self-hosted, vendor-neutral, without cloud lock-in and with honest cost accounting - from sensor to dashboard.
See our IoT services - LoRaWAN service - Milesight expertise - Book an intro call
You'd rather not run IoT yourself? WZ-IT handles setup, operations and maintenance – GDPR-compliant from Germany.
Frequently Asked Questions
Answers to the most important questions
LoRaWAN runs in the 868 MHz band, which penetrates walls, ceilings and basements well. A single gateway often covers an entire building, whereas Wi-Fi needs access points per floor and a KNX or Modbus bus needs continuous cabling. The battery-powered sensors run for years without a power connection and can be retrofitted without construction work. That makes LoRaWAN especially strong in existing buildings.
For most office and administrative buildings a single indoor gateway per building is enough; in larger or heavily compartmentalised properties, two or three. One gateway serves hundreds to over a thousand sensors, because each only sends small packets infrequently. For high-rise buildings or thick reinforced-concrete floors, you plan an extra gateway per several floors depending on radio propagation.
Typical ones are indoor-climate sensors for CO2, temperature and humidity (e.g. Milesight AM103 or AM319), presence and occupancy sensors (VS330), magnetic contacts for doors and windows (WS301), water leak detectors (WS303) and current/energy sensors (CT101/CT103). The right mix depends on the goal: comfort and air quality, space optimisation, energy savings or damage prevention.
With the self-hosted stack, yes. The LoRaWAN gateway, ChirpStack as network server, ThingsBoard and Grafana run on your own infrastructure (Proxmox, Hetzner or on-prem in the EU). No telemetry goes to a vendor cloud in the US or Asia. That matters for occupancy and presence data, which can be sensitive under the GDPR once it is traceable to individuals or specific workplaces.
The software is open source and has no per-device licence: ChirpStack (MIT), ThingsBoard Community Edition (Apache 2.0, unlimited devices) and Grafana OSS. You pay for hardware (one gateway per building, sensors per measurement point), servers and operations. Unlike AWS IoT or Azure IoT, costs do not scale per device and data point. ThingsBoard Professional self-managed starts at 10 USD/month in the Maker plan per the price list (as of 30 Jun 2026, thingsboard.io/pricing).
Depending on the model, three to five years and more. Milesight rates the WS301 magnetic contact at over four years, the WS303 leak detector at up to five years, and the EM300-TH temperature/humidity sensor at up to five years on a 4000 mAh cell. LoRaWAN Class A operation makes this possible: the sensor transmits only briefly and sleeps the rest of the time.
More on IoT
- What is LoRaWAN?
- What is MQTT?
- What is ThingsBoard?
- What is ChirpStack?
- IoT architecture in layers
- LoRaWAN vs NB-IoT vs WLAN/5G
- ThingsBoard pricing & editions
- How much does ChirpStack cost?
- ThingsBoard vs ChirpStack
- IoT platform: self-hosted vs cloud
- Open-source IoT platforms compared
- ThingsBoard vs AWS IoT Core & Azure IoT Hub
- Install ThingsBoard with Docker
- Set up ChirpStack & a LoRaWAN gateway
- Grafana IoT dashboard with InfluxDB
- ThingsBoard Rule Engine: alarms & notifications
- Milesight sensor in ChirpStack: payload decoder
- Node-RED MQTT dashboard for sensor data
- Predictive maintenance & retrofit
- Building IoT / smart building with LoRaWAN







