15 July 2017
public link: https://hackmd.io/s/H1lA3HLrb
#LoRaLIV
It's traditional that hackdays define some challenges to the solved during the day. They provide some guidance and direction, but as one of the outcomes from today is to get some fresh ideas on uses for LoRaWAN, we'll start the day by creating some of our own.
An initial "hello world" for those new to Arduino, or those looking for a base to start from.
Using a DS18B20 temperature sensor, take a reading, report over LoRaWAN to The Things Network (TTN) using the Cayenne
payload structure, set the payload interpreter to Cayenne
, connect to myDevices Cayenne, and create a dashboard to show current temperature.
Sketch
→ Include Library
→ Manage Libraries
→ The Things Network
→ install
Device Info sketch for the Uno & shield:
applications
and + add application
ttn-handler-eu
+ register device
data
tab to see the incoming dataappEui
and appKey
) to match your application:This example uses the Cayenne LPP format so it can be recreated back into a JSON objects without having to do any custom float to byte array translation or javascript re-building
"temperature_1: xx.x"
visible in the processed payload,Payload Formats
to be Cayenne LPP
,Add new
→ Devices & Wigets
→ LoRa (beta)
→ The Things Network
→ Cayenne LPP
Device EUI
from the TTN console,Applications
→ + add integration
→ choose Cayenne
,
Process ID
of your choice (anything),Access Key
(one of the allowed MQTT passwords on the application to pass to Cayenne)temperature
, RSSI
and SNR
for this device will appear when it next sends.Trying to find the most pointless usage for LoRaWAN:
The #IoT #doorbell. Button -> #LoRaWAN -> #thethingsnetwork -> #mqtt -> #nodered -> #wifi -> the #ackers_bell #weeknotes #LoRaLiv
@amcewen: instagram.com/p/BWkOpeNlqDC
Because adding LoRaWAN gives you a doorbell that will still work if you take the button to the other side of the country!
Uses the LoRaWAN connected City Dash Button, takes the MQTT message from TTN, through a node-red flow to trigger the wifi connected Ackers Bell.
Using the LMIC library to send LoRaWAN packets using the Adafruit Feather (M0 processor plus RFM95 LoRa radio).
Arduino IDE set up - https://learn.adafruit.com/adafruit-feather-m0-radio-with-lora-radio-module/setup
Arduino LMIC library - https://github.com/matthijskooijman/arduino-lmic
Lora set up guide (but for different network) - https://startiot.telenor.com/learning/getting-started-with-adafruit-feather-m0-lora/
And - https://wolfgangklenk.wordpress.com/2017/04/15/adafruit-feather-as-lorawan-node/
Using GPS inputs: https://github.com/ttn-liv/range-tracking/blob/master/console/payload_function.js
Notes:
Used @davemee Twine-node-red. We got partway there! More at cheapjack's fork
Take a 433MHz radio input and pass the pulse length array remotely via LoRaWAN.
Although sucessful, the pulse length information is quite variable in lenght, and so should be better parsed on the payload end. Otherwise, if a more compact way of transferring the data was used, this would make for a very low power 433MHz scanner.