LoRa/LoRaWAN tutorial 58: Uplink and downlink messages using the Paho MQTT Python client library
Mobilefish.com Mobilefish.com
28.3K subscribers
7,230 views
0

 Published On Aug 10, 2021

If you like this video and want to support me, go this page for my donation Paypal or crypto addresses:
   / mobilefish  

This is part 58 of the LoRa/LoRaWAN tutorial.

In this tutorial I will demonstrate a Python script using the Paho MQTT Python client library, which connects to The Things Stack MQTT Server, and receives uplink messages from my end node.
And also in this tutorial I will demonstrate another Python script using the same Paho MQTT Python client library, which again connects to The Things Stack MQTT Server, but now it sends downlink messages to my end node.

This presentation can be found at:
https://www.mobilefish.com/download/l...

All my LoRa/LoRaWAN tutorials and presentations can be found at:
https://www.mobilefish.com/developer/...

This Python script
https://www.mobilefish.com/download/l...
receives uplink messages from my end node via The Things Stack MQTT Server by using the Paho MQTT Python client library.
This Python script is tested using Python version: 3.7
Required library: paho-mqtt (v1.5.1)
The received uplink messages are:
- humidity and temperature data (DHT11)
- button pressed.

This Python script
https://www.mobilefish.com/download/l...
sends downlink messages to my end node via The Things Stack MQTT Server by using the Paho MQTT Python client library.
This Python script is tested using Python version: 3.7
Required library: paho-mqtt (v1.5.1)
By sending different hex values at fport 3, two leds (yellow and green) can be switched on or off.
The Python script converts the hex value to its corresponding base64 representation.

The end node in both demos is the same as the one used in tutorial 57.

The Python scripts used in this tutorial originates from this Github page (Please note: I made several modifications):
https://github.com/descartes/TheThing...

Information about how to work with integrations in The Things Stack:
https://www.thethingsindustries.com/d...
For example on this page you can find how to connect to an MQTT client and subscribe to uplinks or publish downlinks.

Check out all my other LoRa/LoRaWAN tutorial videos:
   • LoRa/LoRaWAN tutorials  

Subscribe to my YouTube channel:
   / @mobilefish  

#mobilefish #lora #lorawan

show more

Share/Embed