When Home Assistant restarts, it puts the sensor in "Unavailable" state until it receives an "online" message. Since the sensor has no idea Home Assistant is waiting for such a message, it will never send one. By setting the "retain" flag on availability and configuration messages, the broker will automatically resend them to Home Assistant when it subscribes to the topic again, which resolves this issue. |
||
---|---|---|
.vscode | ||
src/thermostat | ||
.editorconfig | ||
.gitignore | ||
README.md | ||
backlight.service | ||
poetry.lock | ||
pyproject.toml | ||
sensor.service | ||
xinit@.service | ||
xinitrc.sh |
README.md
Thermostat Display
Screen Setup
As instructed at https://www.acmesystems.it/CM3-PANEL-7-BASIC_microsd
- Device Tree Overlay (
config.txt
) - Enable SSH:
thouch /run/media/boot/ssh
- Configure wpa_supplicant
Build/Install
- Build wheel:
poetry build
- Copy wheel to Raspberry Pi
- Install:
python3 -m pip install --user ~/thermostat-*.whl
- Copy
sensor.service
to~/.config/systemd/user
- Start sensor:
systemctl --user enable --now sensor
Automatic Login/Autostart
-
Install packages:
- firefox-esr
- matchbox-window-manager
- x11-xserver-utils
- xdotool
- xinit
-
Copy
xinit@.service
to/etc/systemd/system
-
Copy
xinit.sh
to~/.xinitrc
-
Start GUI:
systemctl enable xinit@pi.service systemctl set-default graphical.target systemctl isolate graphical.target
-
Install Auto Fullscreen add-on fore Firefox