https://github.com/parmaster/logserver
Collecting telemetry data posted by IoT devices into MQTT, filtering, processing and visualizing results
https://github.com/parmaster/logserver
data-visualization golang-template iot-application mqtt mqtt-client template
Last synced: 9 months ago
JSON representation
Collecting telemetry data posted by IoT devices into MQTT, filtering, processing and visualizing results
- Host: GitHub
- URL: https://github.com/parmaster/logserver
- Owner: parMaster
- Created: 2022-01-15T01:04:41.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-11-13T21:43:33.000Z (about 2 years ago)
- Last Synced: 2025-01-30T02:14:15.228Z (11 months ago)
- Topics: data-visualization, golang-template, iot-application, mqtt, mqtt-client, template
- Language: Go
- Homepage:
- Size: 4.34 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Logserver
This service can be connected to MQTT broker, subscribed to the topics where telemetry data is reported, store the data in a database and visualize data with charts.
No additional documentation will be provided, code is self-explanatory and trivial.
This was ment to be an educational project to learn Golang, so a couple words about what I learned here:
- working with MQTT broker and subscribing to topics (using Paho MQTT library). Getting used to the idea of asynchronous programming
- using standart structure for Golang projects - which is overkill for this project, but I wanted to learn it
- using different data stores via interfaces
- using SQLite as a database. In the first version I used PostgreSQL, but it was an overkill for this project (I was surprised finding out that you need a stored procedure to get the last inserted row ID or trigger to implemented autoincrement in PostgreSQL.. crazy stuff..), although it was a good learning experience, specially using it with Docker.
Currently it's working on a local Raspberry Pi 4, connected to a hosted MQTT broker and used mainly to monitor the climate in the crocodile enclosure. Climate control in the enclosure is done by a custom made ESP32-based device, which is also connected to the MQTT broker and reports the data - source is [available in my other repository](https://github.com/parMaster/ESP32Base).
Frontend contains graphs to display the data and in my case it looks like this:
