External integration - Public IP (IP change, outages, Duck DNS and Cloudflare)

Hi everyone!

Here’s a handy integration for anyone accessing their home from the outside: the public IP of the house in Gladys, without an account.

What it does

  • An « Internet » device: connected or not, the public IPv4, and the public IPv6 when available.
  • Reliable detection: the address is checked every 5 minutes with three free services in rotation (ipify, icanhazip, ident.me). A new address is only retained if two different services confirm it: a failed service cannot trigger a false change.
  • Three scene triggers:
    • Public IP changed, with the old and new address;
    • Internet down;
    • Internet restored, with the duration of the outage.
  • Two scene actions: read the public IP, update the DNS now.
  • A « Public IP » widget: the connection, the addresses, how long they haven’t changed, the status of each DNS provider, and a « Update DNS » button.
  • Dynamic DNS, optional:
    • Duck DNS: your subdomains and your token.
    • Cloudflare: a « Edit zone DNS » token. Only the address of existing records changes, the proxy and TTL are kept as they are, and nothing is ever created or deleted.

The cool part

  • Your box changed IP overnight → Duck DNS is updated before you notice anything, and a message gives you the new address.
  • Internet down → the scene notes it. Upon return, « Internet restored after 12 minutes » on the phone.
  • A history of your operator’s outages, without installing anything else.

Installation

Gladys 5.1 minimum. It arrives in the store at the next indexer run. In a hurry? Integrations → Install from GitHub, with the address GitHub - LM1LC3N7/gladys-public-ip: Gladys Assistant external integration for your public IP address: IPv4 and IPv6 detection, a “public IP changed” scene trigger, and optional dynamic DNS updates (Duck DNS, Cloudflare). No account needed. · GitHub

  1. Install the integration, then add the Internet device in Discovery.
  2. Optional: fill in the Duck DNS or Cloudflare section, then click on Test detection and DNS. It checks everything without writing anything.
  3. Optional: add the Public IP widget to a dashboard.

Small honest reservations

  • A Docker container usually doesn’t have IPv6: the integration calmly states this in its status and only uses the IPv4.
  • Duck DNS doesn’t have a test mode: the test button only checks the fields.
  • For Cloudflare, first create the A (and AAAA) records to follow, with any address: the integration only updates them.

Like the previous ones, developed with Claude Code. Independent project, not affiliated with ipify, icanhazip, ident.me, Duck DNS, or Cloudflare.

Repository: GitHub - LM1LC3N7/gladys-public-ip: Gladys Assistant external integration for your public IP address: IPv4 and IPv6 detection, a “public IP changed” scene trigger, and optional dynamic DNS updates (Duck DNS, Cloudflare). No account needed. · GitHub