Do you know if it is possible to ping a Teamviewer id instead ip number ?
Because ip number can be changed, teamviewer id still the same.
You _could_ use a No-IP service (
https://www.noip.com/). Have the little program run in the back and you can always ping your hostname, no matter what your IP is.
I have been using 3 No-IP hostnames for my security cameras for over 3 years. Never had a problem.