Hello !
I’ve just released a new add-on for Home Assistant.
It’s GandiDns. It will keep synchronized your DNS zone for your domain name with your public IP.
This is usefull if your isp provider is changing your IP times to times.
For this you needs a Gandi Account and your domain name needs to be managed by Gandi.net of course.
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] scripts: applying...
[fix-attrs.d] scripts: exited 0.
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-banner.sh: executing...
-----------------------------------------------------------
Add-on: GandiDNS
Update Gandi dns zone
-----------------------------------------------------------
Add-on version: 0.0.1
There is an update available for this add-on!
Latest add-on version: null
Please consider upgrading as soon as possible.
parse error: Expected string key before ':' at line 1, column 4
[16:34:52] ERROR: Unknown HTTP error occured
System: (amd64 / qemux86-64)
Home Assistant Core: 2020.12.2
Home Assistant Supervisor: 2020.12.7
-----------------------------------------------------------
Please, share the above information when looking for help
or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing...
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[16:34:53] INFO: Starting Ip Updater...
[16:34:53] INFO: Updater Started
Hello,
in records you should have [www, @, test] not the full domain name.
But care, I’ve saw than when updating @ reccord on gandi, that destroy MX reccords of my domain, I have to check that but I have no time actually
Hi @benlbrm and thanks for this add-on !
Before I had the opportunity of seeing your add-on, I’ve setup a Rest command pointed to the https://api.gandi.net/v5/livedns/domains/{fqdn}/records/{rrset_name}/{rrset_type} endpoint. This is working great and thanks to the “rrset_type” URL parameter, it doesn’t destroy MX records !
For those interested, here’s the full configuration.yaml excerpt:
Where %40 is the URL-encoded “@” for root record (and could be replaced by a subdomain, of course), mydoma.in is the FQDN of the DNS zone being updated, myApiKey is the Gandi v5 API key to use. And finally, I’m using a template to retrieve the new WAN IP from an attribute of a WAN sensor (which, incidentally, has an automation triggering this very Rest Command on state change).
In any case, the important bit is that if you use this endpoint URL (with the /A at the end as the “rrset_type”), your MX records should stay untouched.