Truma iNetBox Service – Kurzinstallation (Raspberry Pi OS Bookworm)

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


:one: Benutzer vorbereiten

sudo usermod -aG dialout pi

# danach neu einloggen oder rebooten


:two: 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


:three: Konfigurationsdatei

/etc/miqro.yml

broker:

host: localhost

port: 1883

keepalive: 60

log_level: INFO

services:

truma:

serial_device: /dev/ttyAMA5

language: de

:warning: language ist Pflicht, sonst Absturz (KeyError: 'none')


:four: 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


:five: 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

:check_mark: erlaubt: python (miqro_truma) :cross_mark: verboten: node-red


:six: 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


:seven: Truma-Service starten

sudo systemctl start miqro_truma

sudo systemctl status miqro_truma --no-pager

Erwartet:

  • MQTT connected

  • kein „Could not exclusively lock port“


:eight: MQTT-Integration (für Node-RED)

  • Steuerung nur über MQTT

  • z. B.:

Test:

mosquitto_sub -h localhost -t ‘service/truma/#’ -v


:white_check_mark: Architektur (Best Practice)

Truma iNetBox

│ UART (/dev/ttyAMA5)

miqro_truma (exklusiv)

│ MQTT

Node-RED / Home-Automation

Ein UART → ein Prozess.

1 Like