====LoRA on AWS Driver====
===Information===
Loads live information from MQTT and LoRA devices via Amazon Web Services IoT Core.
//This driver has specific extensions to handle LoRA payload decoding and disconnected-device detection//.
^Driver Info^Detail^
|Driver Type:|**Live**|
|Platforms:|**All**|
===Driver Settings===
^Option^Description^
|Server Name|The hostname used for IoT Core|
|Port|The TCP port to connect on (usually 8883)|
|Client|The MQTT client name|
|Topic|The MQTT topic to subscribe to (# for wildcard)|
|Certificate|The public certificate for the device you are connecting as.|
|Private Key|The contents of the private key file for the device you are connecting as.|
|The Certificate Authority|The contents of the Certificate Authority (CA) file|
===Options===
**Include Application Name in Device Name** means that the addresses you bind to will be in the form //Application//.//Device// instead of just //Device//. Useful when you have a large number of devices or multiple locations/sites.
**Set Offline Data To Blank**
This option is used to set all related values to //blank// when a device times out. See the later section on //Detecting Offline Devices//.
===File Content===
When pasting in the content of your certificates and keys, rememeber to include the -----BEGIN and -----END lines.
===Performance Note===
MQTT is extremely powerful when used for slower data, but encoding and decoding MQTT payloads can become very inefficient when dealing with fast-update information.
If you are sending out very large volumes of data, please consider alternatives such as **REDIS**, which may perform better at scale.
===Point Settings===
^Option^Description^
|Address|The name of the point to read|
|Option|A //timeout//, //model number// or //decoding string// for the LoRA message.|
The point name is made up of both **Device ID** and **Value Key**. For example, //Device.Temperature//.
===Decoding LoRA Payloads===
You can add either a //model number// or //decoding string// to process the LoRA message payload. This will extract values such as Temperature, Humidity, Vibration etc. from the encoded data send by the sensor.
You can use models or strings usable with the [[https://github.com/ignorantbliss/lorapayload|lorapayload]] library.
Note that you only have to specify the decoding string or model number on **one** of the bound points. The behaviour of the system when you have multiple different decoders or model numbers is not defined.
===Capturing Timeouts/Lost Sensors===
You can alert when a sensor has not send a signal in a fixed amount of time.
To do this, you can bind an alert to //DeviceName// or //Application.DeviceName// with the option '#' + the maximum number of seconds between updates.
For example, if you have a device called 'MachineSensor' that should send updates every 10 minutes, you could bind an alert to //MachineSensor// with the option //#600//.
After 10 minutes with no new updates from the device, the value will skip to '1'.
===Example===
==Basic MQTT Payload==
In this example, here's our MQTT payload...
{
"sequence": 293834,
"content": {
"sensors": {
"temperature": 25.3,
"humidity": 43
},
},
"deviceName": "MyDevice",
"applicationName": "MyApp",
"dt": "2012-20-20 10:10:00"
}
//MyApp.MyDevice.content.sensors.humidity// would get the current humidity value, and //MyApp.MyDevice.content.sensors.temperature// would get the temp.
==With Payload Decoding==
In this version, we have the following MQTT payload that contains encoded LoRA data...
{
"end_device_ids": {
"device_id": "sensor",
"application_ids": {
"application_id": "myapp"
},
"dev_eui": "xxx",
"join_eui": "xxx",
"dev_addr": "xxx"
},
"received_at": "2025-07-10T01:21:50.080004435Z",
"uplink_message": {
"session_key_id": "xxx",
"f_port": 99,
"f_cnt": 28,
"frm_payload": "AZIBMyUAAAAAAA==",
"rx_metadata": [
{
"gateway_ids": {
"gateway_id": "elpro-pkct",
"eui": "xxx"
},
"timestamp": 3036917906,
"channel_index": 7,
"received_at": "2025-07-10T01:21:49.834375860Z"
}
],
"settings": {
"data_rate": {
"lora": {
"bandwidth": 125000,
"spreading_factor": 7,
"coding_rate": "4/5"
}
},
"frequency": "918200000",
"timestamp": 3036917906
},
"received_at": "2025-07-10T01:21:49.847558325Z",
"confirmed": True,
}
}
The address //myapp.sensor.Temperature// will find the value, but the temperature is encoded.
To acces it, you'll need to set the optional text to 'R718CT' (the model number of the appropriate sensor, or '[1][x92][1](Battery:B:*0.1)(Temperature: