appendix-a

appendix A Building a LoRaWAN network

 

The home digital twin used throughout this book is built on LoRaWAN sensors. Although technologies such as Zigbee and platforms like Home Assistant are excellent choices for home automation, I selected LoRaWAN because the same architecture and design patterns scale naturally beyond the home to industrial, agricultural, and city-scale digital twins. This appendix focuses on building a private LoRaWAN network that mirrors how real-world digital twin deployments are designed and operated.

A.1 What you’ll need

Figure A.1 shows the architecture of the LoRaWAN-based sensing solution we’ll build in this appendix. It illustrates how sensor data flows from LoRaWAN devices through a gateway and network server into managed cloud services that can scale from a handful of sensors to hundreds of devices.

Figure A.1 LoRaWAN network architecture using a managed network server within AWS
figure

You can quickly set up your own LoRaWAN network by acquiring a gateway, network server, and sensors. This will give you a robust foundation that can scale from a handful of sensors to hundreds of devices across your deployment area.

A.1.1 LoRaWAN gateway

A gateway bridges your sensors and the internet, receiving LoRa radio signals and forwarding data to a network server via HTTPS. If you live within the coverage of The Things Network (TTN), you may be able to use a community gateway. Otherwise, you’ll need your own LoRaWAN gateway.

A.1.2 LoRaWAN network server

A.1.3 LoRaWAN sensors

A.2 Step 1: Configuring AWS IoT Core for LoRaWAN

A.3 Step 2: Configuring your gateway

A.4 Step 3: Configuring device and service profiles

A.4.1 Creating the device profile

A.4.2 Creating the service profile

A.5 Step 4: Adding a destination for your sensor data

A.6 Step 5: Adding a sensor