I was now able to find the problem myself.
In this line
/tool fetch url=($url) user=$odnsuser password=$odnspass mode=http dst-path=(“/net_odns.txt”) you just have to replace mode=http with mode=https and the IP address is then passed on to Open DNS.