see https://github.com/bmedicke/smart-mirror for another React project
Raspberry Pi based LED strip control (with individual LEDs)
- connects Home Assistant via MQTT to the database
- translates database changes to the physical world
# install docker:
curl -fsSL https://get.docker.com -o get-docker.sh
sh ./get-docker.sh
rm get-docker.sh
# install docker-compose and postgres:
apt install docker-compose postgresql -y
# we only need it for the cli tools:
systemctl disable --now postgresql
# create and activate virtual environment:
python3 -m venv env
source env/bin/activate
# on rpi4 you might get an error about multiple
# definitions while installing rpi.gpio,
# to avoid them use the flag:
export CFLAGS=-fcommon
# upgrade/install libs:
pip install --upgrade adafruit-blinka
pip install --upgrade adafruit-circuitpython-neopixel
pip install --upgrade black
# [binary] version not yet supported for ARM.
pip install --upgrade 'psycopg[pool]'
# start db and adminer:
docker-compose up -d
- entity
- sensors, automations, switches, scenes
- device
- physical objects (that might have multiple entities)
- Device Registry
- HA MQTT Light Schemas
- template: the one tasmota uses
- default: no flashing, transitions
- json: all features
- async-notifications with psycopg
- get notified of db-updates
- empty queries and performance impact
- psycopg writeup
- https://github.com/bokub/rgb-light-card (Lovelace custom card for RGB lights)