Skip to content
Dayne Broderson edited this page Oct 14, 2021 · 10 revisions

time stacken notes

General steps

references & links

install dependencies

Always good to start with an up-to-date system:

sudo apt update && sudo apt upgrade -y

install mosquito

sudo apt install mosquitto mosquitto-clients -y
sudo systemctl enable mosquitto
sudo system start mosquitto

One that is complete you've got a mosquitto MQTT server running on localhost.

install influx

sudo apt install influxdb
sudo systemctl enable influxdb
sudo systemctl start influxdb

install grafana

sudo apt-get install -y apt-transport-https
sudo apt-get install -y software-properties-common wget
wget -q -O - https://packages.grafana.com/gpg.key | sudo apt-key add -
echo "deb https://packages.grafana.com/enterprise/deb stable main" | sudo tee -a /etc/apt/sources.list.d/grafana.list
sudo apt-get update
sudo apt-get install grafana
sudo systemctl daemon-reload
sudo systemctl start grafana-server
sudo systemctl enable grafana-server.service
sudo systemctl status grafana-server

install telegraph

curl -sL https://repos.influxdata.com/influxdb.key | sudo apt-key add -
DISTRIB_ID=$(lsb_release -c -s)
echo "deb https://repos.influxdata.com/debian ${DISTRIB_ID} stable" | sudo tee /etc/apt/sources.list.d/influxdb.list

sudo apt-get update
sudo apt-get install telegraf
sudo systemctl enable telegraf
sudo systemctl start telegraf

setup influx

The configuration file /etc/influxdb/influxdb.conf can be used to enable/disable lots of features.

  • ensure HTTP enabled
  • bind to standard port
  • create users (optional for playgrounds)
    • create an admin user
    • create a data provider user (writer)
    • create a data consumer user (reader)

You can connect to the influx server command line console by typing influx whereupon you can do a few key comments;

  • show databases
  • use <a database>
  • create <a database>

See the query language spec for more details.

influx
> show databases
# If you don't have a database named `testing` create one:
> create database testing
> use database testing

setup telegraf

sudo nano /etc/telegraph/telegraph.conf

add the following at the bottom of the file

[[inputs.mqtt_consumer]]
  servers = ["tcp://127.0.0.1:1883"]
  connection_timeout = "30s"
  qos = 0
  topics = [ "rtl_433/#" ]
  client_id = "telegraf"
  persistent_session = false
  data_format = "json"
[[outputs.influxdb]]
  urls = ["http://127.0.0.1:8086"]
  database = "testing"
  user_agent = "telegraf"
sudo systemctl restart telegraf

setup grafana

Login to grafana on port 3000. The first time you login as admin and password admin. Change the password!

Configuration menu (sidebar) -> Data Sources -> Add data source -> InfluxDB URL: HTTP://localhost:8086 Database: testing

set node-red

mqtt-in node with Topic: rtl_433/# outputting to a JSON node.

Clone this wiki locally