The pimatic-ping Addon works only with the IP. A DNS resolution would be geat
-
[Implemented] pimatic-ping with DNS
pimatic + MySensors + Homeduino + z-way
https://github.com/n3roGit/MySensors_n3ro -
It would be nice to have this feature! For example, you could monitor people presence at home knowing the host name of their phones. Now it is only possible if they have static ips, not if you have DHCP enabled.
-
@dandresm You can set a reservation based on the MAC adress of your phone in you router so you dont have to set an static ip on the phone itself.
-
@Sjeff I like that solution, I am goint to try it. Until we get the update, I was going to use the arp command to extract all the MACs and use a ShellSensor, but your solution is easier. Thanks!
-
@dandresm Let us know if it worked so they can mark this topic as solved
-
always depends on your router how you have to do it, but i guess every router is able to.
i did this with my zyxel media router ac1750 and it is working fine! -
Finally as @Sjeff proposed, I have been able to assign fixed IPs based on MAC in the DHCP configuration section of my router (also an AC1750 by the way).
Thanks again! -
A ping via DNS should also cover the case where multiple IP addresses are returned.
Take the follwoing example:Most of the time, my notebook is connected via LAN cable. However, if I am roaming around in the house I use WiFi. For this reason DNS may return two IP adresses for some time. Note, this case cannot be covered with a static local IP address - my router can’t do it at least. So, if DNS returns multiple IP addresses for a name, the “presence” attribute shall be set to true if one of the pinged IP addresses is echoed.
C:>nslookup.exe marcus-PC.fritz.box
Server: fritz.box
Address: 192.168.178.1Name: marcus-PC.fritz.box
Addresses: 192.168.178.55
192.168.178.57"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law
-
Impelemented. It just uses the DNS record that was found first.