Truma iNetBox Service – Kurzinstallation (Raspberry Pi OS Bookworm)
Ich habe meine Truma Anbindung auf die neue OS Version installiert.
Anbei meine Anleitung hierzu. Allerdings konnte ich selber noch nicht testen, da mein WoWa noch noch eingemottet ist …
Projekt: https://github.com/danielfett/inetbox.py Ziel: Truma iNetBox seriell anbinden, Steuerung über MQTT (z. B. Node-RED)
Voraussetzungen
-
Raspberry Pi OS Bookworm
-
Python ≥ 3.11
-
MQTT-Broker (z. B. Mosquitto)
-
Truma iNetBox an z. B.
/dev/ttyAMA5 -
Node-RED ohne seriellen Zugriff auf Truma
Benutzer vorbereiten
sudo usermod -aG dialout pi
# danach neu einloggen oder rebooten
Python-venv anlegen (wichtig!)
python3 -m venv ~/venvs/inetbox
source ~/venvs/inetbox/bin/activate
pip install -U pip
pip install inetbox_py[truma_service]
Test:
python -m inetbox.truma_service --help
Konfigurationsdatei
/etc/miqro.yml
broker:
host: localhost
port: 1883
keepalive: 60
log_level: INFO
services:
truma:
serial_device: /dev/ttyAMA5
language: de
language ist Pflicht, sonst Absturz (KeyError: 'none')
systemd-Service installieren
sudo ~/venvs/inetbox/bin/python -m inetbox.truma_service --install
Service anpassen (empfohlen):
sudo systemctl edit --full miqro_truma
[Service]
User=pi
ExecStart=/home/pi/venvs/inetbox/bin/python -m inetbox.truma_service --config /etc/miqro.yml
Restart=always
sudo systemctl daemon-reload
sudo systemctl enable miqro_truma
WICHTIG: Node-RED darf nicht auf den UART zugreifen
-
Node-RED niemals
/dev/ttyAMA5öffnen -
Serielle Nodes / Function-Nodes prüfen!
Schnellcheck:
sudo lsof /dev/ttyAMA5
erlaubt: python (miqro_truma)
verboten: node-red
Node-RED-Flows ggf. bereinigen
sudo systemctl stop nodered
sed -i ‘s#/dev/ttyAMA5#/dev/ttyAMA6#g’ ~/.node-red/flows_*.json
sudo systemctl start nodered
Truma-Service starten
sudo systemctl start miqro_truma
sudo systemctl status miqro_truma --no-pager
Erwartet:
-
MQTT connected
-
kein „Could not exclusively lock port“
MQTT-Integration (für Node-RED)
-
Steuerung nur über MQTT
-
z. B.:
Test:
mosquitto_sub -h localhost -t ‘service/truma/#’ -v
Architektur (Best Practice)
Truma iNetBox
│ UART (/dev/ttyAMA5)
▼
miqro_truma (exklusiv)
│ MQTT
▼
Node-RED / Home-Automation
Ein UART → ein Prozess.