Switching form DuckDNS to TP-Link tplinkdns.com Dynamic DNS

I have been having problems with DuckDNS, it used to work fine but not does not. I revently got a new TP-Link router whitch comes with a .tplinkdns.com DyDNS so I have set this up.

  • I also changed external_url in my configuration.yaml file.
  • I have also changed the domain in NGINX Home Assistant SSL proxy.
  • I have changed to Home Assistent URL on the app.
  • I have restarted Home Assistant.
  • I have killed and restarted the App on my mobile.

It works fine on my my PC but my mobile is saying
'There was an error loading Home Assistent, please renew the conection settings and try again...'

I have even cleared all the credentials on my phone.

Cant see frequency for how often the the certificate is renewed so I guess it may be this. I have restarted NGINX Home Assistant SSL proxy and killed the app on my mobile refore restarting.

As I said it is working fine on my PC with the new domain.

Have I missed something.

Hi, have you figured out the issue yet?

Thank you

Hi I would love to know how to use tplinkdns.com to connect google home to home assistant too.
I can gain remote access via the DNS address. My issue is cannot connect home assistant back to google home without lets encrypt (duckdns).
Any help would be greatly appreciated.

Are there any updates on this? Id also be interested in this.

For other people also wanting to use tplinkdns:

Here are settings in home assistant:
Add letsencrypt addon in home assistant

  • Use your *.tplinkdns.com for the domain
  • Select http challenge, leave port at 80

configuration.yaml:
http:
use_x_forwarded_for: true
trusted_proxies:
- 172.30.33.0/24 (internal communication port for home assistant)

In router settings:

  • Port forward port 80 to Home Assistant (for http challenge)
  • Port forward port 443 to Home Assistant

Edit:
Forgot to say that NGINX Home Assistant SSL proxy Add On is also required

DuckDNS is probably a better bet but which ever way you go you need NGINX Home Assistant SSL proxy Add On and the DuckDNS add on if you use duckdns.

Can you elaborate on the yaml config. Where in the yaml config do I add:

use_x_forwarded_for: true
trusted_proxies:
- 172.30.33.0/24

What is this IP address? And what do you mean by (internal communication port for home assistant)?

Thanks!

The ip address is used internally between the OS and the container (for NGINX?). So you would need to trust this ip such that the reverse proxy can be passed.

In configuration.yaml paste this part directly as is wherever you like, I have put it after frontend but it should not matter:

http:
use_x_forwarded_for: true
trusted_proxies:

  • 172.30.33.0/24

image

So I just did this successfully changing over from DuckDNS to tplinkdns.
Pre-Reqs:

  1. If you have something like the DuckDNS addon, make sure you disable it in the addons section of Home Assistant.
  2. If you have something already in your configuration.yaml like below
# http:
  # server_port: 8124
  # ssl_certificate: /ssl/fullchain.pem
  # ssl_key: /ssl/privkey.pem

make sure you comment it out or remove it.

Setting up TP link DNS

  1. Open TPlink app and turn on your tplink DDNS. Create your unique URL.
  2. While in Tp link app, I port forwarded my HomeAssistant to port 80 as well as port 443
  3. Install the NGINX addon. My configuration looks something like this.
domain: {{your unique url}}.tplinkdns.com
hsts: max-age=31536000; includeSubDomains
certfile: fullchain.pem
keyfile: privkey.pem
cloudflare: false
customize:
  active: true
  default: nginx_proxy_default*.conf
  servers: nginx_proxy/*.conf
real_ip_from: []

Network Port is 443
4. Go into the configuration.yaml and add lines like this (if you already have a “http” header, leave it out

http:
  use_x_forwarded_for: true
  trusted_proxies:
    - 172.30.33.0/24
  ip_ban_enabled: true
  login_attempts_threshold: 4
  1. Add the let’s encrypt addon. My config looks like this
domains:
  -  {{your unique url}}.tplinkdns.com
email: {{your email}}
keyfile: privkey.pem
certfile: fullchain.pem
challenge: http
dns: {}
  1. In Home Assistant go to Settings->System->Network->and under the Home Assistant URL section add https://{{your unique url}}.tplinkdns.com and put the toggle “on” for the local network->automatic
  2. Go ahead and turn on (start) both the NGINX and Let’s Encrypt addon’s. Make sure you check the box for auto update, start on boot and watchdog if available.

There are some restarts you will probably have to do along the way but if you did not do so already, restart now. After restart, try to access the new TPlink DNS URL and it should work as expected with no warnings since you have an SSL cert.
If it does not, you can access HA again by going to http://homeassistant.local:8123 to check the configs.

While setting up the first time, I initially had an issue where the certificate did not download so I had to restart the Let’s Encrypt addon and watched the logs to make sure it successfully grabbed a cert, once it did, I rebooted once more for good measure and I was able to access through the new URL once HA booted back up.

Hope this helps anyone else who was searching for this like I was. I was having issues with my Google Assistant accessing HA every now and then. If you are using the Google Assistant SDK, make sure you log into your google dev account to update the URLs to the new tplink dns url as well so that continues to work.

EDIT: one thing I missed, my SmartThings integration stopped updating in real time, this is because when you initially install it, you need to have a callback URL, mine must have still been pointing at the duckddns url. After deleting and re-adding the ST integration, I am back and running. No issues after moving off of DuckDNS still.