00_MYSENSORS.pm: fix MYSENSORS usb gateway for Windows (Forum: #61435)

git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@15106 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
Hauswart 2017-09-20 13:23:20 +00:00
parent a3a50a25aa
commit 2dc7dc60c5

View File

@ -195,6 +195,11 @@ sub Stop($) {
sub Ready($) {
my $hash = shift;
return DevIo_OpenDev($hash, 1, "MYSENSORS::Init") if($hash->{STATE} eq "disconnected");
if(defined($hash->{USBDev})) {
my $po = $hash->{USBDev};
my ( $BlockingFlags, $InBytes, $OutBytes, $ErrorFlags ) = $po->status;
return ( $InBytes > 0 );
}
}
sub Init($) {