-
• #2
URL to IP address is usually done by a DNS server.
https://en.wikipedia.org/wiki/Domain_Name_SystemFor IOT devices you may need to set up a local DNS for them.
https://en.wikipedia.org/wiki/BIND
https://www.isc.org/downloads/bind/
http://www.zytrax.com/books/dns/
Your router may need to add the local DNS server to its list of DNS servers.See the DNS references on this page to register a device's IP with the DNS.
http://www.espruino.com/ESP8266_WifiUsage -
• #3
Thanks but in the end I just created a Ping Module, I've created a pull request here which does include documentation but its really simple to use, all you gotta do is:
var p = require("Ping"); p.ping({ address: 'google.com' }, function(err, data) { console.log(data); });
to get :
{ "address": "google.com", "port": 80, "attempts": 5, "avg": 36.86366081237, "max": 54.41212654113, "min": 29.13498878479, "raw": [ 29.13498878479, 54.41212654113, 34.74617004394, 32.61685371398, 33.40816497802 ] }
-
• #4
where did this get added to the api? net.ping?? this is not the same as Wifi.ping.
-
• #5
It has been merged into modules
I'd like to cycle through a list of ~90 domains to ping for the lowest response time, however the ESP8266.ping function only allows IP Addresses, so whats the best way to convert the URLs into direct IP Addresses?