No description
  • Python 99.3%
  • Batchfile 0.7%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-08-04 23:32:25 +02:00
.agents Add GitHub CI workflow, templates, LICENSE, requirements, AGENTS rule, and fix n8n JSON formatting 2026-08-04 22:37:47 +02:00
.github Add stale_sensor_cleaner_gui.py and batch launcher for > 6 months inactive sensor deletion 2026-08-04 22:44:25 +02:00
.gitignore Initial commit: ioBroker battery and sensor status monitor (Python CLI & n8n workflow) 2026-08-03 17:10:22 +02:00
6 Fix sensor tree nesting bug by enforcing strict trailing dot matching (root_id + '.') 2026-08-04 23:03:10 +02:00
app_icon.ico Fix Taskbar icon display by executing AppUserModelID and iconbitmap before Tk root handle creation 2026-08-04 23:32:25 +02:00
app_icon.png Add collapsed tree start, inactivity settings dialog (min 3 months default), and custom taskbar icon 2026-08-04 23:16:12 +02:00
check_iobroker_batteries.py Initial commit: ioBroker battery and sensor status monitor (Python CLI & n8n workflow) 2026-08-03 17:10:22 +02:00
ioBroker_Batteriestatus.bat Initial commit: ioBroker battery and sensor status monitor (Python CLI & n8n workflow) 2026-08-03 17:10:22 +02:00
ioBroker_Stale_Sensoren_Cleaner.bat Fix Taskbar icon display by executing AppUserModelID and iconbitmap before Tk root handle creation 2026-08-04 23:32:25 +02:00
LICENSE Add GitHub CI workflow, templates, LICENSE, requirements, AGENTS rule, and fix n8n JSON formatting 2026-08-04 22:37:47 +02:00
n8n_iobroker_battery_workflow.json Add GitHub CI workflow, templates, LICENSE, requirements, AGENTS rule, and fix n8n JSON formatting 2026-08-04 22:37:47 +02:00
README.md Add collapsed tree start, inactivity settings dialog (min 3 months default), and custom taskbar icon 2026-08-04 23:16:12 +02:00
requirements.txt Add collapsed tree start, inactivity settings dialog (min 3 months default), and custom taskbar icon 2026-08-04 23:16:12 +02:00
stale_sensor_cleaner_gui.py Fix Taskbar icon display by executing AppUserModelID and iconbitmap before Tk root handle creation 2026-08-04 23:32:25 +02:00

ioBroker Batterie- & Sensor-Überwachung (MCP & n8n)

Code Quality & Syntax Validation License: MIT

Automatisierte Batteriestandsabfrage, Sensor-Ausfallkontrolle und grafische Bereinigung inaktiver Sensoren für ioBroker über das Model Context Protocol (MCP) und n8n.


⚡ Features

  • Automatische Erkennung: Findet Batterie- & LOWBAT-Zustände über ioBroker MCP (deConz/Zigbee, FritzDECT, Tuya, Shelly, etc.).
  • Adapter-Aufschlüsselung: Strukturierte Gruppierung nach Adapter-Instanzen (deconz.0, deconz.1, fritzdect.0, tuya.0, etc.).
  • Stale-Sensor-Erkennung: Erkennt Sensoren, die seit mehr als 24 Stunden bzw. dem konfigurierten Zeitraum (Standard: min. 3 Monate) keine Werte gesendet haben.
  • Grafisches Bereinigungstool:
    • Tkinter-GUI startet standardmäßig zugeklappt für maximale Übersicht.
    • Eigenes Taskleisten-Icon: Eigenes App-Icon (app_icon.ico & app_icon.png) für Windows-Taskleiste & Fensterleiste.
    • Konfigurierbarer Schwellenwert: Einstellungen (⚙️ Einstellungen) zur Wahl der Mindest-Inaktivität in Monaten oder Tagen (gespeichert in config.json).
    • Schnellsteuerung: 📂 Alles aufklappen und 📁 Alles zuklappen Buttons.
    • Ignoreliste (Rechtsklick): Per Rechtsklick (🚫 Auf Ignoreliste setzen) können Sensoren dauerhaft in ignore_list.json ignoriert werden.
    • Ignorelisten-Verwaltung: Eigenes Verwaltungsfenster (📋 Ignoreliste verwalten) zum Wiederherstellen ignoriert gewesener Sensoren.
    • Selektive Löschung: Sicheres Löschen/Zurücksetzen nur der per Checkbox ausgewählten Objektbäume mit Sicherheitsabfrage.
  • n8n Workflow Integration: Vollautomatischer n8n-Workflow (täglich 6:00, 12:00, 18:00 Uhr) mit formatiertem HTML-E-Mail-Ausfallbericht.

📁 Repository-Struktur

.
├── .github/
│   ├── ISSUE_TEMPLATE/                   # Templates für Bug-Reports & Feature-Wünsche
│   ├── PULL_REQUEST_TEMPLATE.md
│   └── workflows/
│       └── python-check.yml              # GitHub Actions CI Workflow
├── .agents/
│   └── AGENTS.md                         # Entwickler- & Git-Synchronisationsregeln
├── check_iobroker_batteries.py           # Python CLI Skript zur MCP Abfrage
├── iobroker_Batteriestatus.bat            # Windows Batch Starter (CLI Status)
├── stale_sensor_cleaner_gui.py           # Python Tkinter GUI (Sensor Bereinigung)
├── ioBroker_Stale_Sensoren_Cleaner.bat   # Windows Batch Starter (GUI Bereinigung)
├── app_icon.ico / app_icon.png           # Anwendungs-Icon für Taskleiste & Fenster
├── config.json                           # Konfiguration (Inaktivitäts-Schwellenwert & MCP-URL)
├── ignore_list.json                      # Gespeicherte Ignoreliste
├── n8n_iobroker_battery_workflow.json    # n8n Workflow Export
├── requirements.txt                       # Abhängigkeiten & Python Requirements
├── LICENSE                                # MIT Lizenz
└── README.md

🚀 Anwendungen & Ausführung

Voraussetzungen

  • Python 3.10+ (inkl. standardmäßigem tkinter und Pillow)
  • Erreichbarer ioBroker MCP-Server (z. B. http://10.10.10.252:8011/mcp)

1. Batteriestatus-Report (CLI)

python check_iobroker_batteries.py --url http://10.10.10.252:8011/mcp

(Oder Doppelklick auf ioBroker_Batteriestatus.bat)

2. Inaktive Sensoren GUI (Bereinigung, Schwellenwert & Ignoreliste)

python stale_sensor_cleaner_gui.py

(Oder Doppelklick auf ioBroker_Stale_Sensoren_Cleaner.bat)


🔄 n8n Workflow Importieren

  1. In n8n oben rechts auf Workflows → Import from File klicken.
  2. n8n_iobroker_battery_workflow.json auswählen.
  3. Im Knoten Send Alert Email Ihre SMTP-Anmeldedaten und E-Mail-Adresse konfigurieren.
  4. Workflow auf Active schalten.

🤝 Mitarbeit & Workflow

Vor allen Änderungen am Code bitte folgende Schritte beachten:

  1. Prüfen auf Remote-Änderungen: git fetch origin
  2. Stand synchronisieren: git pull --rebase origin main
  3. Änderungen vornehmen und testen.
  4. Committen & Pushen: git push origin main

🔒 Sicherheitshinweise

Dieses Repository enthält keine API-Schlüssel, Passwörter oder private Zugangsdaten.


📜 Lizenz

Dieses Projekt steht unter der MIT-Lizenz.