Skip to content

Make dynu updates more efficient #25

Description

@tronikos

I see you first fetch https://ipv4.text.wtfismyip.com to get the IP address and then you call the v2 API.
This is unnecessary. Instead you could just use https://www.dynu.com/DynamicDNS/IP-Update-Protocol

Because you don't provide pre-built containers, see #24, I removed your addon and setup the let's encrypt addon for the certificate and the following rest sensor:

rest:
  # https://www.dynu.com/DynamicDNS/IP-Update-Protocol
  - resource: https://api.dynu.com/nic/update?hostname=mydomain.freeddns.org&password=sha256ofmypassword
    scan_interval: 600
    sensor:
      - name: "Dynu nic update response"
        value_template: "{{ value }}"

Edit: I moved them to secrets.yaml and I now have:

rest:
  # https://www.dynu.com/DynamicDNS/IP-Update-Protocol
  - resource: https://api.dynu.com/nic/update
    params:
      hostname: !secret dynu_hostname
      password: !secret dynu_password
    scan_interval: 600
    sensor:
      - name: "Dynu nic update response"
        value_template: "{{ value }}"

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions