deSEC dynamic dns (dedyn.io) integration

Hello! There is yet another dynamic dns service. I’m not in any way affiliated with it, but it is free (as of dec’ 2022 no paid plans), it has ipv4 and ipv6 support, rest api, A (ipv4) and AAAA (ipv6) records with TTL 60, and those records can be updated separately. It also has TXT support and let’s encrypt bot, but that’s another story, because it is easier to use in beatiful NGINX proxy manager addon GitHub - hassio-addons/addon-nginx-proxy-manager: Nginx Proxy Manager - Home Assistant Community Add-ons (it has deSEC support, btw).
So I decided to “make” an integration for. Since I have a little below 0 knowledge of python and HA, I just copy-pasted freedns integration and slightly modified it to work with deSEC dynamic dns.
Config stored in configuration.yaml and I need help making it ADR-0010 compliant architecture/0010-integration-configuration.md at 2017fdae15d48f287f2398e3243a91ec7a34b161 · home-assistant/architecture · GitHub

Here is the repo GitHub - JugglerLKR/desec_dedyn: Home Assistant deSEC dynamic dns integration (dedyn.io)
To try it, you have to add lines to configuration.yaml (as in readme), create desec_dedyn directory in your config/custom_components, put two files from repo and restart.

I know it is very ugly, but it works, this is why I need someone to make it better.

1 Like

Thanks for making this. Its working great!

I typically use the inadyn addon for my ddns updates, but desec is hard to integrate into that until a new release comes out with support.

I’m not very skilled but I might try tinkering with it, see if we can get multiple domains (need to ensure a delay of 2 mins is placed in between as it’ll hit the rate limit) and add a sensor to avoid having to use the logs to see if its updated (last updated sensor and update state).

I have never tried writing an integration that has a webui, but if it had that you could add it to HACS.

ps: doesn’t need letsencypt… agree nginx proxy is better for that.

I just found a way to use inadyn to update one domain (if you do two you’ll hit issues with the rate limit) with desec if needed.

 - hostname: {SUBDOMAIN}.dedyn.io
  password: {TOKEN - NOT PASSWORD}  #create in the desec token management tab
  ddns_path: /?myipv4=%i
  ddns_server: update.dedyn.io
  provider: desec
  username: {SUBDOMAIN}.dedyn.io #dont use your username/email, this is the subdomain
  custom_provider: true

Official support of desec is most likely coming in the next version of inadyn.