- Download hardwario hio-raspbian-buster-lite or use Custom Setup on Raspberry Pi
- Write img file using balenaEtcher or Raspberry Pi Imager
Version 1.6 of Raspberry Pi Imager has an advanced options menu under the magic key sequence:
Ctrl+Shift+X
- Hostname configuration
- Set SSH key-based autenthication
- Set WiFi SSID and password
- Boot raspberry (user:
pi
, password:raspberry
) - Set static IP address in
/etc/dhcpcd.conf
- Recommended: Change default password
- Optional: Add SSH key-based authentication
- Update
sudo apt update
- Upgrade
sudo apt upgrade
List of paired nodes
bch node list
From Connect Mosquitto and InfluxDB
-
Install MQTT to InfluxDB service
sudo pip3 install --upgrade mqtt2influxdb
-
Create the
hardwario
directorysudo mkdir /etc/hardwario
-
Create the configuration file
sudo nano /etc/hardwario/mqtt2influxdb.yml
-
Paste this real snippet to the configuration file and replace influxdb host and database
demo
to CentOS IoT server address and database.Example on https://tower.hardwario.com/en/latest/tutorials/mqtt-to-influxdb/ is not working. Snippet uses file from GitHub project https://github.com/hardwario/bch-mqtt2influxdb
-
Test the configuration file
mqtt2influxdb -c /etc/hardwario/mqtt2influxdb.yml --test
-
Start the MQTT to InfluxDB service
pm2 start `which python3` --name "mqtt2influxdb" -- `which mqtt2influxdb` -c /etc/hardwario/mqtt2influxdb.yml
-
Save the PM2 state (so it will start after reboot)
pm2 save
- Check if node-red is running
pm2 list
- Stop node-red
pm2 stop node-red
- For stop only, skip delete step
pm2 delete node-red
- Save PM2 state
pm2 save