diff --git a/fhem/CHANGED b/fhem/CHANGED
index 7fde6671f..f9e4666ab 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: 30_MilightBridge: Add tcpPing mode (MarkusM)
- change: 98_pilight: all protocols, rewrite
- feature: 70_PHTV: added support for WoWifi/WoLAN to wake device up
- change: 98_GEOFANCY: improved/tightened input validation. 3rd party mobile
diff --git a/fhem/FHEM/30_MilightBridge.pm b/fhem/FHEM/30_MilightBridge.pm
index 611341f50..c32e065b3 100644
--- a/fhem/FHEM/30_MilightBridge.pm
+++ b/fhem/FHEM/30_MilightBridge.pm
@@ -47,7 +47,7 @@ sub MilightBridge_Initialize($)
$hash->{UndefFn} = "MilightBridge_Undefine";
$hash->{NotifyFn} = "MilightBridge_Notify";
$hash->{AttrFn} = "MilightBridge_Attr";
- $hash->{AttrList} = "port sendInterval disable:0,1 checkInterval ".$readingFnAttributes;
+ $hash->{AttrList} = "port sendInterval disable:0,1 tcpPing:1 checkInterval ".$readingFnAttributes;
return undef;
}
@@ -205,6 +205,10 @@ sub MilightBridge_State(@)
# check via ping
my $pingstatus = "unreachable";
my $p = Net::Ping->new('udp');
+ if(defined($attr{$hash->{NAME}}{tcpPing}))
+ {
+ $p = Net::Ping->new('tcp');
+ }
my $alive = $p->ping($hash->{HOST}, 2);
$p->close();
$pingstatus = "ok" if $alive;
@@ -396,6 +400,10 @@ sub MilightBridge_CmdQueue_Send(@)
port
Default: 8899. Older bridges (V2) used port 50000 so change this value if you have an old bridge.
+