lets kick in
we will be using node-red , influxdb and grafana for this cool Time Series based project.
well lets have a small explanation of these tools…
node-red
It's a Browser based editor and programming tool for wiring together hardware devices.
influxDB
its a time series database optimized for HA storage and retrieval of time series data in fields like IOT sensor data, real time Analytics.
Grafana
Grafana provides the visualization of data from various data sources like influxDB , Prometheus... etc
setup
lets spin off influxDB and grafana using docker images.
lets write the docker-compose file.
checkout the github code
$ docker-compose up -d --build$ docker exec -it influxdb bash
# influxd
# influx > show databases
> create database WEATHER
> use WEATHER
> show measurements
> show field keys
> select * from TANK_PRESSURE
> select * from pi_sensor
Note: TANK_PRESSURE and pi_sensor are the measurements coming from node-red which come under WEATHER database.
setup of influx data source in node-red
setup of influx data source in node-red
the node red flow can be imported from this gist