Skip to content

My smarthome setup using Nodered on a Raspberry Pi with Docker.

Notifications You must be signed in to change notification settings

dArignac/smarthome

Repository files navigation

Smart Home

This is my playground for home automation / smart home, whatever you want to call it.

My goal is to integrate the sensors I have and do something useful. There is no final plan, it evolves as I wade. Please note that the flows are tied to my environment and you might need to adjust them if you reuse them.

Clone the repo

Run git clone --recurse-submodules https://github.com/dArignac/smarthome.git.

Basic Setup

Overview diagram

Hardware

Software

External Tools

Open Tasks

See https://github.com/dArignac/smarthome/issues.

Installation

Follow SETUP.md.

Afterwards ramp the services up by running docker-compose up -d.

If everything was alright, then you can access the services as follows (Note that my pi is named nodered, yours probably has a different name):

PiCoolFAN4

If you use PiCoolFAN4 for cooling the Raspberry Pi, check out PiCoolFAN4/README.md.

Nodered Flows

Grafana Dashboards

Additional information

MQTT Topics

# topics for all monitored raspberry pis
/home/pis/<pi-name>/health
# miflora
/home/bluetooth/miflora
# inkbird
/home/bluetooth/inkbird

Influxdb

Issues when starting

If influxdb cannot be started with some error like influxdb | run: open server: open tsdb store: lstat /var/lib/influxdb/data/db0/autogen/320: bad message then check the hard disk. Stop all services beforehand.

umount /mnt/pi1
sudo fsck /mnt/pi1
mount /mnt/pi1
<start services again>

Shell

Run docker-compose exec influxdb influx -precision rfc3339 -database db0

Then query around, e.g.:

SELECT * FROM "raspberries"
SELECT * FROM "lacrosses"
SELECT * FROM "miflora"
SELECT * FROM "miflora" WHERE "sensor" = 'Jasmin'
DELETE FROM "miflora" WHERE "sensor" = 'Wayne'
DROP SERIES FROM "miflora" WHERE "sensor" = 'Jasmin'

Sources used for creating this (loose order)