Code Monkey home page Code Monkey logo

emqx / mqtt-to-timescaledb Goto Github PK

View Code? Open in Web Editor NEW
10.0 8.0 2.0 2.89 MB

Ingesting time series data into TimescaleDB using MQTT and EMQX | MQTT Timescale Integration

Home Page: https://www.emqx.com/en/blog/build-an-iot-time-series-data-application-for-energy-storage-with-mqtt-and-timescale

License: Apache License 2.0

Makefile 100.00%
emqx iiot iot iot-analytics time-series-analysis emqx-data-integration energy-consumption-analysis industrial-energy-monitoring mqtt-time-series-data

mqtt-to-timescaledb's Introduction

MQTT To TimescaleDB

Ingesting time series data into TimescaleDB using MQTT and EMQX | MQTT Timescale Integration

Introduction

This tutorial will show you how to use MQTT to ingest time series data into TimescaleDB. We will be using the EMQX MQTT broker to publish and subscribe to messages. We will also be using the TimescaleDB database to store the data.

This is a SaaS service for IIoT energy consumption analysis. Each factory has a production line with multiple devices per line. The factory needs to monitor the energy consumption of each device in real time, and analyze the energy consumption of each production line and the entire factory in a certain period of time.

This real-time monitoring and analysis can help factory managers make data-driven decisions, such as identifying equipment failures or abnormal energy consumption, adjusting production schedules to minimize energy consumption, and monitoring and evaluating the effectiveness of energy management measures. To improve energy efficiency and reduce production costs.

EMQX IIoT Energy Monitoring Example

Architecture

MQTT to TimescaleDB

Name Version Description
EMQX Enterprise 5.0.3+ MQTT broker used for message exchange between MQTT clients and the TimescaleDB.
MQTTX CLI 1.9.3+ Command-line tool used to generate simulated data for testing.
TimescaleDB latest-pg12+ IIoT data storage and management, as well as providing time aggregation and analysis capabilities for Grafana.
EMQX Exporter 0.1 Prometheus exporter for EMQX
Prometheus v2.44.0 Open-source systems monitoring and alerting toolkit.
Grafana 9.5.1+ Visualization platform utilized to display and analyze the collected data.

How to use

  1. Init the submodule to get the EMQX Exporter (Optional):
git submodule init
git submodule update
  1. Please make sure you have installed the docker, and then running the following commands to start the demo:
docker-compose up -d

You can quickly init submodule and start the demo by using the make command as well.

  1. Running the following commands to see the message from MQTTX:
docker logs -f mqttx
  1. If you want to view the energy data and EMQX Metrics in Grafana dashboard, you can open http://localhost:3000 in your browser, and login with admin:public

License

Apache License 2.0

mqtt-to-timescaledb's People

Contributors

emqplus avatar logo306142054 avatar rory-z avatar wivwiv avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

ttgzs b020239

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.