Please check your network. The router needs to have an internet connection when you run the script! What is the router connected to? Can it ping that device? Does it show up on the DHCP leases of that device?