npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

homebridge-ahoy-dtu

v2.1.0

Published

Advanced Homebridge plugin for AHOY-DTU solar inverters with MQTT integration, historical data storage, modern web dashboard, and comprehensive performance optimization

Downloads

78

Readme

homebridge-ahoy-dtu

npm version GitHub release License

Ein Homebridge-Plugin für AHOY-DTU Solar-Wechselrichter mit MQTT-Integration, historischer Datenspeicherung und modernem Web-Dashboard.

✨ Features

🔌 MQTT-Integration

  • Direkte Verbindung zu AHOY-DTU MQTT-Broker
  • Automatische Geräteerkennung
  • Echtzeit-Datenübertragung

📱 HomeKit-Integration

  • Konfigurierbare Sensoren: Wähle aus, welche Sensoren in HomeKit angezeigt werden
  • Custom Sensor Names: Individuelle Namen für alle Sensoren
  • Child Bridge Support: Läuft isoliert für bessere Stabilität

📊 Historical Data Storage

  • Sparsame Speicherung: Nur alle 5 Minuten (konfigurierbar)
  • Rolling Window: Automatische Bereinigung alter Daten
  • Komprimierung: Entfernt ähnliche Werte für SSD-Schonung
  • Statistiken: Min/Max/Average/Latest für jeden Sensor

🌐 Web Interface

  • Apple Flat Design: Modernes, sauberes Dashboard
  • Echtzeit-Charts: Interaktive Diagramme mit Chart.js
  • REST API: Vollständige API für Datenzugriff
  • Responsive Design: Mobile-optimiert
  • Status-Indikatoren: MQTT-Verbindung und Datenverfügbarkeit

🌍 Mehrsprachig

Unterstützung für Deutsch, Englisch, Französisch, Italienisch und Chinesisch

🚀 Installation

NPM (Empfohlen)

npm install -g homebridge-ahoy-dtu

Dev-Version (Neueste Features)

npm install -g homebridge-ahoy-dtu@dev

⚙️ Konfiguration

Basis-Konfiguration

{
  "platforms": [
    {
      "platform": "homebridge-ahoy-dtu.AhoyDTU",
      "name": "AHOY-DTU Solar",
      "mqtt": {
        "host": "192.168.1.100",
        "port": 1883,
        "username": "your_username",
        "password": "your_password",
        "clientId": "homebridge-ahoy-dtu"
      },
      "discoverDevices": true,
      "offlineThresholdMinutes": 5,
      "language": "de"
    }
  ]
}

Erweiterte Konfiguration

{
  "platforms": [
    {
      "platform": "homebridge-ahoy-dtu.AhoyDTU",
      "name": "AHOY-DTU Solar",
      "mqtt": {
        "host": "192.168.1.100",
        "port": 1883,
        "username": "your_username",
        "password": "your_password",
        "clientId": "homebridge-ahoy-dtu"
      },
      "discoverDevices": true,
      "offlineThresholdMinutes": 5,
      "language": "de",
      "sensors": {
        "power": true,
        "energyToday": true,
        "temperature": true,
        "status": true,
        "voltage": false,
        "current": false,
        "efficiency": false,
        "frequency": false,
        "rssi": false,
        "producing": false
      },
      "customNames": {
        "power": "Meine Solaranlage",
        "energyToday": "Heute produziert",
        "temperature": "Wechselrichter Wärme",
        "status": "Online Status"
      },
      "dataStorage": {
        "enabled": true,
        "retentionHours": 24,
        "samplingInterval": 5,
        "compressionEnabled": true
      },
      "webInterface": {
        "enabled": true,
        "port": 8080,
        "refreshInterval": 30
      }
    }
  ]
}

📱 HomeKit-Sensoren

Das Plugin erstellt verschiedene HomeKit-Sensoren basierend auf den AHOY-DTU-Daten:

| Sensor | HomeKit-Typ | Beschreibung | Einheit | |--------|-------------|--------------|---------| | Solarproduktion | Light Sensor | Aktuelle Leistung | W | | Tagesenergie | Light Sensor | Heute produzierte Energie | kWh | | Temperatur | Temperature Sensor | Wechselrichter-Temperatur | °C | | Status | Contact Sensor | Online/Offline-Status | - | | Spannung | Light Sensor | DC-Spannung | V | | Strom | Light Sensor | DC-Strom | A | | Effizienz | Light Sensor | Wirkungsgrad | % | | Frequenz | Light Sensor | Netzfrequenz | Hz | | RSSI | Light Sensor | Signalstärke | dBm | | Produktion | Light Sensor | Produktionsstatus | - |

🌐 Web Dashboard

Zugriff

  • URL: http://localhost:8080/ (oder konfigurierter Port)
  • Auto-Refresh: Alle 30 Sekunden (konfigurierbar)

Features

  • Echtzeit-Statistiken: Min/Max/Average/Latest für alle Sensoren
  • Interaktive Charts: Zeitbereich 1h, 6h, 24h, 7d
  • Sensor-Auswahl: Dropdown für verschiedene Sensoren
  • Status-Anzeige: MQTT-Verbindung und Datenverfügbarkeit
  • Apple Flat Design: Modernes, sauberes Interface

REST API Endpoints

  • GET / - Dashboard HTML
  • GET /api/sensors - Alle verfügbaren Sensoren
  • GET /api/sensor/:sensorType/data - Historische Daten
  • GET /api/sensor/:sensorType/stats - Statistiken
  • GET /api/storage/stats - Speicher-Statistiken
  • GET /api/sensors/overview - Übersicht aller Sensoren

📊 Historical Data Storage

Konfiguration

"dataStorage": {
  "enabled": true,           // Aktiviert/deaktiviert
  "retentionHours": 24,      // Aufbewahrungszeit in Stunden
  "samplingInterval": 5,     // Sampling-Intervall in Minuten
  "compressionEnabled": true // Komprimierung aktiviert
}

Features

  • Sparsame Speicherung: Nur alle 5 Minuten (konfigurierbar)
  • Rolling Window: Automatische Bereinigung alter Daten
  • Komprimierung: Entfernt ähnliche Werte (1% Schwellenwert)
  • SSD-Schonung: Optimiert für Flash-Speicher
  • Statistiken: Min/Max/Average/Latest für jeden Sensor

🔧 MQTT-Topics

Das Plugin abonniert folgende MQTT-Topics:

  • AHOY-DTU_TOTAL/power - Aktuelle Leistung
  • AHOY-DTU_TOTAL/energy_today - Tagesenergie
  • AHOY-DTU_TOTAL/temperature - Temperatur
  • AHOY-DTU_TOTAL/status - Status
  • AHOY-DTU_TOTAL/voltage - Spannung
  • AHOY-DTU_TOTAL/current - Strom
  • AHOY-DTU_TOTAL/efficiency - Effizienz
  • AHOY-DTU_TOTAL/frequency - Frequenz
  • AHOY-DTU_TOTAL/rssi - Signalstärke
  • AHOY-DTU_TOTAL/producing - Produktionsstatus

🛠️ Troubleshooting

Plugin wird nicht geladen

  • Überprüfe die MQTT-Verbindung
  • Stelle sicher, dass die MQTT-Credentials korrekt sind
  • Prüfe die Homebridge-Logs auf Fehler

Keine Sensoren sichtbar

  • Warte auf MQTT-Daten (nur während der Produktion verfügbar)
  • Überprüfe die MQTT-Topic-Struktur
  • Stelle sicher, dass discoverDevices auf true gesetzt ist

Web Interface nicht erreichbar

  • Überprüfe den konfigurierten Port (Standard: 8080)
  • Stelle sicher, dass webInterface.enabled auf true gesetzt ist
  • Prüfe die Firewall-Einstellungen

Sensoren zeigen falsche Werte

  • Überprüfe die MQTT-Datenqualität
  • Stelle sicher, dass die AHOY-DTU-Firmware aktuell ist
  • Prüfe die Custom Names-Konfiguration

📈 Changelog

v2.0.2-dev.2 (Latest)

  • Apple Flat Design Web Interface
  • Custom Sensor Names
  • Historical Data Storage mit Komprimierung
  • REST API für Datenzugriff
  • Status-Indikatoren und Echtzeit-Updates
  • Responsive Design für Mobile
  • 🔧 Verbesserte Fehlerbehandlung
  • 📚 Vollständige Dokumentation

v2.0.2-dev.1

  • MQTT-Integration
  • Konfigurierbare Sensoren
  • Child Bridge Support
  • Mehrsprachige Unterstützung

🤝 Contributing

Beiträge sind willkommen! Bitte erstelle einen Pull Request oder öffne ein Issue.

Entwicklung

git clone https://github.com/chr-braun/homebridge-ahoy-dtu.git
cd homebridge-ahoy-dtu
npm install
npm run build

📄 Lizenz

MIT License - siehe LICENSE für Details.

🔗 Links