2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-03 04:36:36 +00:00

PRESENCE: using ping command line utility to check presence on Windows based machines.

git-svn-id: https://svn.fhem.de/fhem/trunk@3831 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
markusbloch 2013-09-01 09:43:08 +00:00
parent 1ca00a2342
commit f63eaed48d
2 changed files with 4 additions and 3 deletions

View File

@ -9,7 +9,8 @@
meter with a JeeLabs JeeLink as RF modem. The matching JeeNode
sketch can be found in .../contrib/36_PCA301-pcaSerial.zip
(by justme1968)
- change: PRESENCE: changing ping method for Windows systems to "tcp"
- change: PRESENCE: using ping command line utility to check presence on Windows
based machines.
- feature: install FHEM as Windows service by T.E., see docs/HOWTO_Windows.txt
- feature: new module 33_readingsGroup to display a collection of readings
from one or more devices. this will replace weblink readings.

View File

@ -516,13 +516,13 @@ PRESENCE_DoLocalPingScan($)
{
$temp = qx(ping -n $count $device);
$temp = qx(ping -n $count -4 $device);
chomp $temp;
if($temp ne "")
{
Log3 $name, 5, "PRESENCE ($name) - ping command returned with output:\n$temp";
$return = "$name|$local|".($temp =~ /(Reply from|Antwort von) .* [Bb]ytes=\d+ .* TTL=\d+/ ? "present" : "absent");
$return = "$name|$local|".($temp =~ /TTL=\d+/ ? "present" : "absent");
}
else
{