Let's build a #Grafana Data Source for #TheThingsNetwork! (MQTT)
Why connect #Grafana to #TheThingsNetwork? So that we can instantly visualise the Sensor Data transmitted by IoT Devices
We'll take this brand new #Grafana Data Source for MQTT ... And mod it for the MQTT Server at #TheThingsNetwork
#TheThingsNetwork MQTT Messages are really complex ... Our #Grafana Data Source shall extract the Base64 Payload that's deep inside the message
https://github.com/lupyuen/the-things-network-datasource#mqtt-log
#Grafana Log shows our #TheThingsNetwork Data Source has extracted the Message Payload correctly yay!
https://github.com/lupyuen/the-things-network-datasource#grafana-log
How our #Grafana Data Source decodes CBOR Payloads from #TheThingsNetwork
https://github.com/lupyuen/the-things-network-datasource/blob/main/pkg/plugin/message.go#L100-L116
Cleaned up the CBOR Decoding ... In our #Grafana Data Source for #TheThingsNetwork
https://github.com/lupyuen/the-things-network-datasource/blob/main/pkg/plugin/message.go#L131-L189
How our #Grafana Data Source transforms #TheThingsNetwork MQTT Messages ... Into Grafana Data Frames
https://github.com/lupyuen/the-things-network-datasource/blob/main/pkg/plugin/message.go#L46-L129
CBOR Payloads now decoded OK ... By our #Grafana Data Source for #TheThingsNetwork yay! 🎉
Our Data Source for #TheThingsNetwork MQTT ... On a #Grafana Dashboard 🎉
We have just visualised #TheThingsNetwork Sensor Data in #Grafana with our custom data source
But to visualise historical Sensor Data from #TheThingsNetwork, we should store the data in Prometheus and push to #Grafana
Visualising #TheThingsNetwork Sensor Data with #Grafana ... All shall be explained in this article
How we enable the MQTT Server at #TheThingsNetwork
https://lupyuen.github.io/articles/grafana?2#configure-the-things-network-mqtt
Here's how we install #Grafana ... And our Custom Data Source for #TheThingsNetwork
https://lupyuen.github.io/articles/grafana?3#appendix-install-grafana-and-data-source
Adding the #Grafana Data Source for our MQTT Server at #TheThingsNetwork
https://lupyuen.github.io/articles/grafana?4#configure-grafana-data-source
Visualising #TheThingsNetwork Sensor Data with #Grafana
https://lupyuen.github.io/articles/grafana?5#grafana-dashboard
Why we encode #TheThingsNetwork Sensor Data with CBOR (instead of JSON)
https://lupyuen.github.io/articles/grafana?7#cbor-concise-binary-object-representation
How our #Grafana Data Source talks to the MQTT Server at #TheThingsNetwork
https://lupyuen.github.io/articles/grafana?9#mqtt-integration
Transforming MQTT Messages to #Grafana Data Frames
https://lupyuen.github.io/articles/grafana?10#transform-mqtt-messages
Remember that #LoRa Messages are super tiny ... We shall encode Sensor Data in CBOR ... And our #Grafana Data Source needs to decode the CBOR Payload
https://lupyuen.github.io/articles/ttn#fair-use-of-the-things-network