HackSpace – September 2019

(Jacob Rumans) #1
FORGE

data packet, you get a drop-down with more
information, such as the signal strengths and which
gateways the device sent the data through.
As things stand, we have our sensor data going
to The Things Network, but you might notice that
if you refresh the Applications Data page or close
it and reopen it, it doesn’t keep the data there.
Simple applications on The Things Network don’t
retain data; they act as a holding area that can
send and forward data to other places. We are now


going to create a simple dashboard for our device
to which our application will send the data, and the
dashboard will keep our data more permanently so
we can review it when we need to.


LET THERE BE DATA
Apart from it making it simple to get a payload in a
readable form on The Things Network, we used the
CayenneLPP library and payload format as it makes
it very trivial to create a dashboard for our device
online that will collect and display all the data from
our The Things Uno device. To set this up, we first
need to register a free account on the Cayenne
myDevices website: hsmag.cc/YlgAGf.
Once logged in, select the large LoRa icon
(Figure 6) and then select ‘The Things Network’
from the lower end of the menu bar on the
left (Figure 7). Then scroll down and click the
CayenneLPP option (Figure 8); in the settings
window that should appear, you need to give the
dashboard/device a name, and then add the Device
EUI in the DevEUI box – leave the Activation
mode set to ‘already registered’, and the tracking
box locations as ‘this device moves’. Save these
settings and leave this tab open in your browser.
Finally, we need to go back to The Things
Network site, and in our Applications Overview we
need to select the ‘Integrations’ tab and click ‘Add
integration’. Scroll down and click the myDevices
icon; in the Process ID box, give this a name such
as ‘hackspacedashboard’, and in the ‘Access Key’
drop-down menu, when you click on the empty box,


it should reveal only one option ‘Default key’ next
to two buttons that say ‘Devices’ and ‘Messages’.
Click on ‘Default key’ to select this into the ‘Access
Key’ box, then click the blue ‘Add integration’
button in the lower right-hand corner.
If you now switch back to your myDevices page
we left open in another tab, as soon as myDevices
receives some data from your The Things Uno, it
should automatically make a dashboard for you
and display the data. It should create a dashboard
with RSSI (received signal strength indicator), SNR
(signal to noise ratio), and, of course, our sensor
humidity and temperature data. This dashboard
will update with the latest data and will store the
data it receives, meaning you can come back and
check it anytime – or, if you take your The Things
Uno offline, it won’t lose all the existing logged
data. The myDevices dashboard elements can all
be edited and customised, so you can swap the
icons or the type of gauge or graph by clicking the
settings menu for each widget.

TIME FOR ANOTHER PROJECT
Congratulations on setting up your first LoRaWAN
device and application. There are dozens of
different platforms for devices, and innumerable
sensors that can be developed and added to them.
In addition, as a rapidly growing community, there
are lots of tutorials to explore online to help you
develop your next projects.

The myDevices dashboard
elements can all be edited
and customised so you
can swap the icons or the
type of graph



Below
Our altered
dashboard showing
data in visual form
Free download pdf