/aws-iot-core-lorawan

Quickly get started with AWS IoT Core for LoRaWAN with sample solutions (binary decoding, device and gateway monitoring, downlink, dashboarding, provisioning automation)

Primary LanguagePythonMIT No AttributionMIT-0

Quickly get started with AWS IoT Core for LoRaWAN with sample solutions (binary decoding, device and gateway monitoring, downlink, dashboarding, provisioning automation)

New to AWS IoT Core for LoRaWAN? Consider step-by-step tutorial at https://iotwireless.workshop.aws

AWS IoT Core for LoRaWAN enables you to set up a private LoRaWAN network by connecting your devices and gateways with no LoRaWAN Network Server setup required. This repository contains resources to quickly get started developing solutions using AWS IoT Core for LoRaWAN. It includes samples for typical design patterns (binary decoder, downlink messaging, Thing shadow update) and fully functional applications (dashboards, condition monitoring and alarming).

Please consider our developer guide to learn how to connect your wireless devices and gateways to AWS IoT Core for LoRaWAN. Please also consider automation guidelines and observability implementation guidelines.

Decoding binary payloads

LoRaWAN devices typically send uplink payloads as binary encoded messages. Below you will find various options for an implementation of binary payload decoding.

  • Decoding binary payloads from LoRaWAN devices with Python and Node.js
    In this sample you will learn how to decode a binary message from your LoRaWAN device using Python or Node.js and integrate the decoded payload with more than 17 AWS services using AWS IoT Rules. Guidelines for an integration of existing decoder code in Node.js and Python and building your own decoders are included. See a list of >12 included examples decoders here, new contributions are welcome.

  • Decoding binary payloads from LoRaWAN devices using Pilot Things Sensor Library
    This repository can help you to accelerate development of your LoRaWAN-based IoT solutions by providing a deployable reference architecture which will decode binary data using the Pilot Things Sensor Library. The Pilot Things Sensor Library is a SaaS offering that can be purchased from the AWS marketplace

  • Decoding Cayenne Low Power Payload (LPP)
    Cayenne LPP format allows the device to send multiple sensor data at one time. Different kinds of sensor data are sent in the individual frames and each sensor data is prefixed with two bytes: data channel (a unique sensor identifier) and one of predefined data types (e.g. analog input, humidity or GPS location).

Samples for typical design patterns

  • Sending downlink payload to a LoRaWAN device
    In this sample you will learn how to implement different options for sending downlink payload to your LoRaWAN devices. It includes examples for AWS SDK, AWS CLI and AWS IoT Core message broker.

  • Updating IoT Thing shadow with decoded device payload
    AWS IoT Thing Shadows can make a device’s state available to apps and other services whether the device is connected to AWS IoT or not. In this sample you will learn how to update the shadow of an AWS IoT Thing with the telemetry from a LoRaWAN device.

  • LoRaWAN device connection status monitoring and notifications
    Example solution for monitoring connectivity status of LoRaWAN devices will notify you if your LoRaWAN device is not sending uplink for longer then pre-configured amount of time.

  • LoRaWAN gateway connection status monitoring and notifications
    Example solution for monitoring connectivity status for LoRaWAN gateways. After deploying this solution in your AWS account, you will receive an e-mail notificiation each time your LoRaWAN gateway connects or disconnects. Additionaly, a message will be published to AWS IoT Core message broker MQTT topic (e.g. awsiotcorelorawan/events/presence/disconnect/<WirelessGatewayId>) each time the gateway connects and disconnects. Disconnection detection will consider a configurable grace period (default setting is 5 minutes), i.e. only disconnection which is longer then grace period will result in a notification/presence message.

Deployable sample applications

Useful guidelines

Included binary decoders

LoRaWAN devices often encode transmitted data in a binary format, as it increases transmission efficiency and improves battery lifetime. However, as the data arrive in the cloud, many use cases require a structured format. Transforming the binary data into JSON, for example, enables filtering and enrichment using AWS IoT SQL as well as integration with further AWS services using AWS IoT Rule Actions.

The sample Decoding binary payloads from LoRaWAN devices repository contains examples of binary decoders. Please note that all decoders are provided without any guarantee to fit for any specific purpose and are only intended for use in a laboratory or prototyping environment. The list below is not to be understood as a recommendation of specific manufacturers or specific device models. AWS IoT Core for LoRaWAN supports any LoRaWAN device that complies with LoRaWAN specifications 1.0.x and 1.1. Please consult AWS Partner Device Catalog for an overview of qualified devices. Said that, please find an overview of examples below:

  • Generic
    • Dragino LSN50
  • Air quality / CO2 / environment measurement
    • Elsys ERS CO2
  • Door and window opening
    • Elsys EMS Door
    • Dragino LDS01
  • GNSS tracking
    • Dragino LGT92
    • Globalsat LT-100
    • Browan Tabs Object Locator
  • Presence and smart home
    • Tektelic Smart Room Sensor
  • Sound level measurement
    • Elsys ERS Sound
  • Temperature, humidity and moisture
    • Browan Tabs Temperature & Humidity Sensor
    • Dragino LHT65 (temperature and humidity)
    • Dragino LSE01 (temperature and moisture)
    • Dragino LLMS01 (leaf moisture sensor)
    • Dragino LAQ4 (Air Quality Sensor CO2 + TVOC)
    • Elsys ERS Lite
    • Laird Senstrius RS1xx
  • Water Metering
    • Axioma W1
  • Cayenne Low Power Payload (LPP)
  • Network tester
    • Adeunis FTD2
  • Digital Contact Sensor
    • Adeunis Dry Contacts
  • Weather station
    • MeteoHelix Iot Pro
  • Development Board
    • ST Nucleo-WL55JC

Contributions to example binary decoders are welcome.

Getting help

Test results

Branch Result
main