Skip to content

LuckyTriple7/ha-strato-dyndns

Repository files navigation

Strato DynDNS

HACS Version

Home Assistant custom integration for Strato DynDNS. Monitors your public IPv4 (and optionally IPv6) address and automatically updates all configured domains at Strato when the IP changes.

Features

  • Multiple Strato accounts configurable in parallel
  • Public IP determined via redundant providers (ipify.org, AWS, ident.me) with automatic fallback
  • Optional IPv6 support (AAAA records, separate public IPv6 detection)
  • Smart update trigger — Strato is only called when necessary (see Update Logic)
  • Error backoff per domain to prevent abuse blocks from Strato
  • Configurable polling interval (min. 10 seconds)
  • Optional persistent notifications for IP mismatches and update errors
  • Fully configured through the HA UI, no YAML required
  • Supports main domain + up to 10 subdomains per account

Installation via HACS

  1. Open HACS → Integrations → Menu (⋮) → Custom repositories
  2. Enter URL: https://github.com/LuckyTriple7/ha-strato-dyndns
  3. Category: IntegrationAdd
  4. Search for Strato DynDNSDownload
  5. Restart Home Assistant

Configuration

  1. Settings → Devices & Services → Add Integration → Strato DynDNS
  2. Step 1: Enter account name, username and password
  3. Step 2: Enter domains, set the polling interval and optional features

The first field is the main domain (e.g. example.de), followed by up to 10 subdomains (e.g. home.example.de). None of the fields are mandatory — use only what you need.

To configure multiple Strato accounts, simply add the integration again.

Entities

The integration creates one HA device per account and one device per domain. Domain devices are linked to their account device.

Account device (<account>):

Entity Type Description
sensor.<account>_public_ipv4 Sensor · Diagnostic Currently detected public IPv4 address
sensor.<account>_public_ipv6 Sensor · Diagnostic Currently detected public IPv6 address (when IPv6 enabled)
binary_sensor.<account>_problem Problem sensor on when any domain's DNS-resolved IP differs from the public IP
button.<account>_update_now Button Force immediate update of all domains, bypassing backoff

Domain device (<domain>, e.g. website.de):

Entity Type Description
sensor.<domain>_resolved_ip Sensor · Diagnostic DNS-resolved IPv4 of the domain (via 1.1.1.1 / 8.8.8.8)
sensor.<domain>_resolved_ipv6 Sensor · Diagnostic DNS-resolved IPv6 of the domain (when IPv6 enabled)
sensor.<domain>_last_update Sensor Timestamp of last successful Strato update
binary_sensor.<domain>_ip_mismatch Problem sensor on when DNS IPv4 ≠ public IPv4
binary_sensor.<domain>_ipv6_mismatch Problem sensor on when DNS IPv6 ≠ public IPv6 (when IPv6 enabled)

Diagnostic entities are shown under the Diagnostics tab in the integration overview, keeping the main view focused on what matters.

Update Logic

The integration uses a two-stage trigger to avoid unnecessary Strato API calls:

On HA start / after restart — no prior state is available, so the DNS-resolved IP is compared with the public IP:

  • DNS IP = public IP → no update (IP hasn't changed)
  • DNS IP ≠ public IP → update sent to Strato

During a running session — after a successful update, the sent IP is remembered per domain:

  • Public IP unchanged since last send → no update, even if DNS is still propagating the previous change
  • Public IP changed → update sent to Strato

This prevents duplicate API calls during DNS propagation delay (which can take several minutes) while still reacting immediately to any IP change.

Additionally, a per-domain error backoff prevents rapid retries after a Strato error (abuse → 15 min, badauth / notfqdn → 30 min, dnserr / badsys / 911 → 5 min, other → 2 min). The "Update Now" button bypasses the backoff for an immediate retry.

Setting up Strato DynDNS

DynDNS must be enabled for each domain/subdomain in the Strato control panel: Domains → Manage domain → DynDNS

The username for the DynDNS API is the full domain (e.g. example.de), the password is set separately in Strato.


Deutsch

Home Assistant Custom Integration für Strato DynDNS. Überwacht die öffentliche IPv4-Adresse (und optional IPv6) und aktualisiert automatisch alle konfigurierten Domains bei Strato, wenn sich die IP ändert.

Features

  • Mehrere Strato-Accounts parallel konfigurierbar
  • Öffentliche IP über redundante Provider ermittelt (ipify.org, AWS, ident.me) mit automatischem Fallback
  • Optionale IPv6-Unterstützung (AAAA-Records, separate IPv6-Erkennung)
  • Intelligente Update-Logik — Strato wird nur bei Bedarf kontaktiert (siehe Update-Logik)
  • Error-Backoff je Domain verhindert abuse-Sperren bei Strato
  • Konfigurierbares Prüfintervall (min. 10 Sekunden)
  • Optionale persistente Benachrichtigungen bei IP-Abweichungen und Update-Fehlern
  • Konfiguration komplett über die HA-Oberfläche, kein YAML nötig
  • Unterstützung für Haupt-Domain + bis zu 10 Subdomains pro Account

Installation via HACS

  1. HACS öffnen → Integrationen → Menü (⋮) → Benutzerdefinierte Repositories
  2. URL eingeben: https://github.com/LuckyTriple7/ha-strato-dyndns
  3. Kategorie: IntegrationHinzufügen
  4. Integration suchen: Strato DynDNSHerunterladen
  5. Home Assistant neu starten

Konfiguration

  1. Einstellungen → Geräte & Dienste → Integration hinzufügen → Strato DynDNS
  2. Schritt 1: Account-Name, Benutzername und Passwort eingeben
  3. Schritt 2: Domains eintragen, Prüfintervall und optionale Funktionen festlegen

Das erste Feld ist die Haupt-Domain (z. B. example.de), danach bis zu 10 Subdomains (z. B. home.example.de). Kein Feld ist Pflicht — nur ausfüllen, was benötigt wird.

Für mehrere Strato-Accounts die Integration einfach erneut hinzufügen.

Entitäten

Die Integration erstellt ein HA-Gerät pro Account und ein Gerät pro Domain. Domain-Geräte sind mit dem zugehörigen Account-Gerät verknüpft.

Account-Gerät (<account>):

Entität Typ Beschreibung
sensor.<account>_public_ipv4 Sensor · Diagnose Aktuell erkannte öffentliche IPv4-Adresse
sensor.<account>_public_ipv6 Sensor · Diagnose Aktuell erkannte öffentliche IPv6-Adresse (wenn IPv6 aktiv)
binary_sensor.<account>_problem Problem-Sensor an wenn bei einer Domain DNS-IP ≠ öffentliche IP
button.<account>_update_now Button Sofortige Aktualisierung aller Domains, Backoff wird ignoriert

Domain-Gerät (<domain>, z. B. website.de):

Entität Typ Beschreibung
sensor.<domain>_resolved_ip Sensor · Diagnose Per DNS aufgelöste IPv4 der Domain (via 1.1.1.1 / 8.8.8.8)
sensor.<domain>_resolved_ipv6 Sensor · Diagnose Per DNS aufgelöste IPv6 der Domain (wenn IPv6 aktiv)
sensor.<domain>_last_update Sensor Zeitstempel des letzten erfolgreichen Strato-Updates
binary_sensor.<domain>_ip_mismatch Problem-Sensor an wenn DNS-IPv4 ≠ öffentliche IPv4
binary_sensor.<domain>_ipv6_mismatch Problem-Sensor an wenn DNS-IPv6 ≠ öffentliche IPv6 (wenn IPv6 aktiv)

Diagnose-Entitäten erscheinen im Diagnose-Tab der Integrations-Übersicht und halten die Hauptansicht übersichtlich.

Update-Logik

Die Integration verwendet eine zweistufige Trigger-Logik, um unnötige Strato-API-Calls zu vermeiden:

Beim HA-Start / nach Neustart — kein Zustand vorhanden, daher wird die DNS-aufgelöste IP mit der öffentlichen IP verglichen:

  • DNS-IP = öffentliche IP → kein Update (IP hat sich nicht geändert)
  • DNS-IP ≠ öffentliche IP → Update wird an Strato gesendet

Im laufenden Betrieb — nach einem erfolgreichen Update wird die gesendete IP pro Domain gespeichert:

  • Öffentliche IP unverändert seit letztem Senden → kein Update, auch wenn DNS noch die alte IP zeigt (Propagierungs-Verzögerung)
  • Öffentliche IP hat sich geändert → Update wird an Strato gesendet

Damit werden doppelte API-Calls während der DNS-Propagierung (die einige Minuten dauern kann) vermieden, während gleichzeitig sofort auf IP-Änderungen reagiert wird.

Zusätzlich verhindert ein Error-Backoff pro Domain schnelle Wiederholungen nach einem Strato-Fehler (abuse → 15 Min., badauth / notfqdn → 30 Min., dnserr / badsys / 911 → 5 Min., sonstige → 2 Min.). Der „Update Now"-Button umgeht den Backoff für eine sofortige Wiederholung.

Strato DynDNS einrichten

In der Strato-Verwaltung muss DynDNS für jede Domain/Subdomain aktiviert sein: Domains → Domain verwalten → DynDNS

Der Benutzername für die DynDNS-API ist die vollständige Domain (z. B. example.de), das Passwort wird separat in Strato gesetzt.

About

Home Assistant custom integration for Strato DynDNS — automatically updates DynDNS entries when your public IP changes

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages