filmov
tv
LoRa/LoRaWAN tutorial 27: Retrieve and Store Sensor Data From The Things Network
Показать описание
If you like this video and want to support me, go this page for my donation Paypal or crypto addresses:
This is part 27 of the LoRa/LoRaWAN tutorial.
In this video series different topics will be explained which will help you to understand LoRa/LoRaWAN.
It is recommended to watch each video sequentially as I may refer to certain LoRa/LoRaWAN topics explained earlier.
In this tutorial I will demonstrate:
- how to retrieve sensor data from The Things Network,
- how to store it in a database,
- how to retrieve this data from the database and display it in a browser,
- and how to create a downlink, using a NodeJS script, sending data from my computer to my LoRa end node.
All code used in this tutorial can be found in the following Github repository:
The Things Network community developers created several Software Development Kits (SDK) to receive activations and messages from IoT devices via The Things Network to your server.
It also allows you to send messages back to the IoT devices from your server.
The SDK’s are available in Go, Java, Python and Node.JS
In this tutorial I will use the Node.JS SDK.
This tutorial assumes you have installed the following software packages and know how these packages works.
Node.JS (JavaScript server environment) and npm (node package manager)
MySQL (Relational Database Management System)In this tutorial MySQL Community Server is used.
phpMyAdmin (Web based administration tool for MySQL)
Goto The Things Network console.
Goto the applications page and select the application which receives the sensor data.
In this demo the application ID is "youtube_demo_app2".
To retrieve sensor data from The Things Network to your server, you need:
The application ID
Example: youtube_demo_app2
Access key
Download the Git repository:
Goto folder ttn_app_server
Install the node modules, type: npm install
This script only retrieves sensor data from TTN and displays it in the terminal.
Depending on the hex value send, the yellow and green leds can be On or Off.
The retrieved sensor data from TTN can be stored in a MySQL database.
A database and corresponding table needs to be created.
Use the web application phpMyAdmin, to check if the database and table are created.
The column "payload_raw" has data type tinyblob to store binary data.
The payload_fields data is not stored because the payload_raw data can be used to recreate the payload_fields data.
The Arduino sketch transmits the humidity and temperature data as four bytes.
If the button switch is pressed a single byte is transmitted.
Use the web application phpMyAdmin, to check if sensor data are stored.
The sensor data is stored in the table sensor_data.
The sensor data is stored in the table sensor_data.
To display all records from table sensor_data in a browser:
Open a browser and open the PHP file.
BE CAREFUL, ONCE DELETED ALL DATA IS LOST.
Check out all my other LoRa/LoRaWAN tutorial videos:
Subscribe to my YouTube channel:
The presentation used in this video tutorial can be found at:
#mobilefish #lora #lorawan
This is part 27 of the LoRa/LoRaWAN tutorial.
In this video series different topics will be explained which will help you to understand LoRa/LoRaWAN.
It is recommended to watch each video sequentially as I may refer to certain LoRa/LoRaWAN topics explained earlier.
In this tutorial I will demonstrate:
- how to retrieve sensor data from The Things Network,
- how to store it in a database,
- how to retrieve this data from the database and display it in a browser,
- and how to create a downlink, using a NodeJS script, sending data from my computer to my LoRa end node.
All code used in this tutorial can be found in the following Github repository:
The Things Network community developers created several Software Development Kits (SDK) to receive activations and messages from IoT devices via The Things Network to your server.
It also allows you to send messages back to the IoT devices from your server.
The SDK’s are available in Go, Java, Python and Node.JS
In this tutorial I will use the Node.JS SDK.
This tutorial assumes you have installed the following software packages and know how these packages works.
Node.JS (JavaScript server environment) and npm (node package manager)
MySQL (Relational Database Management System)In this tutorial MySQL Community Server is used.
phpMyAdmin (Web based administration tool for MySQL)
Goto The Things Network console.
Goto the applications page and select the application which receives the sensor data.
In this demo the application ID is "youtube_demo_app2".
To retrieve sensor data from The Things Network to your server, you need:
The application ID
Example: youtube_demo_app2
Access key
Download the Git repository:
Goto folder ttn_app_server
Install the node modules, type: npm install
This script only retrieves sensor data from TTN and displays it in the terminal.
Depending on the hex value send, the yellow and green leds can be On or Off.
The retrieved sensor data from TTN can be stored in a MySQL database.
A database and corresponding table needs to be created.
Use the web application phpMyAdmin, to check if the database and table are created.
The column "payload_raw" has data type tinyblob to store binary data.
The payload_fields data is not stored because the payload_raw data can be used to recreate the payload_fields data.
The Arduino sketch transmits the humidity and temperature data as four bytes.
If the button switch is pressed a single byte is transmitted.
Use the web application phpMyAdmin, to check if sensor data are stored.
The sensor data is stored in the table sensor_data.
The sensor data is stored in the table sensor_data.
To display all records from table sensor_data in a browser:
Open a browser and open the PHP file.
BE CAREFUL, ONCE DELETED ALL DATA IS LOST.
Check out all my other LoRa/LoRaWAN tutorial videos:
Subscribe to my YouTube channel:
The presentation used in this video tutorial can be found at:
#mobilefish #lora #lorawan
Комментарии