diff --git a/fhem/CHANGED b/fhem/CHANGED index 62ad5b66b..b76c931ce 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -1,5 +1,6 @@ # Add changes at the top of the list. Keep it in ASCII, and 80-char wide. # Do not insert empty lines here, update check depends on it. + - feature: PRESENCE: support for Solaris ping (mode: local-ping) - feature: HUEbridge: added support for HUE scenes (get: scenes; set: savescene, modifyscene, scene) new unified syntax for multiple lights diff --git a/fhem/FHEM/73_PRESENCE.pm b/fhem/FHEM/73_PRESENCE.pm index e3ebdaf24..a952050bc 100755 --- a/fhem/FHEM/73_PRESENCE.pm +++ b/fhem/FHEM/73_PRESENCE.pm @@ -610,6 +610,21 @@ PRESENCE_DoLocalPingScan($) $return = "$name|$local|error|Could not execute ping command: \"ping -n $count -4 $device\""; } } + elsif($^O =~ m/solaris/) + { + $temp = qx(ping $device 4); + + chomp $temp; + if($temp ne "") + { + Log3 $name, 5, "PRESENCE ($name) - ping command returned with output:\n$temp"; + $return = "$name|$local|".($temp =~ /is alive/ ? "present" : "absent"); + } + else + { + $return = "$name|$local|error|Could not execute ping command: \"ping -n $count -4 $device\""; + } + } else { $temp = qx(ping -c $count $device 2>&1); @@ -1226,7 +1241,7 @@ Options: If this attribute is activated, an active check will be disabled.

Possible values: 0 => not disabled , 1 => disabled
Default Value is 0 (not disabled)

-
  • ping_count
  • (Only in Mode "ping" on non-Windows machines applicable)
    +
  • ping_count
  • (Only in Mode "ping" on Linux based OS applicable)
    Changes the count of the used ping packets to recognize a present state. Depending on your network performance sometimes a packet can be lost or blocked.

    Default Value is 4 (packets)

  • fritzbox_speed
  • (only for mode "fritzbox")
    @@ -1471,7 +1486,7 @@ Options: Wenn dieses Attribut aktiviert ist, wird die Anwesenheitserkennung nicht mehr durchgeführt.

    Mögliche Werte: 0 => Erkennung durchführen , 1 => Keine Erkennungen durchführen
    Standardwert ist 0 (Erkennung durchführen)

    -
  • ping_count
  • (Nur im Modus "ping" anwendbar auf Nicht-Windows-Maschinen)
    +
  • ping_count
  • (Nur im Modus "ping" anwendbar auf Linux-basierten Betriebssystemen)
    Verändert die Anzahl der Ping-Pakete die gesendet werden sollen um die Anwesenheit zu erkennen. Je nach Netzwerkstabilität können erste Pakete verloren gehen oder blockiert werden.

    Standartwert ist 4 (Versuche)