mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-03 16:56:54 +00:00
45_TRX.pm: Removed "Dumper" in Log message
git-svn-id: https://svn.fhem.de/fhem/trunk@20807 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
17a1e3c082
commit
9984b9c146
@ -29,8 +29,9 @@
|
|||||||
#
|
#
|
||||||
# CHANGELOG
|
# CHANGELOG
|
||||||
#
|
#
|
||||||
# 25.02.2ß19 Fixed missing FW reading for ProXL receivers
|
# 20.12.2019 Removed "Dumper"
|
||||||
# ß4.12.2018 Added NotifyDn to catch DISCONNECTED Events
|
# 25.02.2019 Fixed missing FW reading for ProXL receivers
|
||||||
|
# 04.12.2018 Added NotifyDn to catch DISCONNECTED Events
|
||||||
# 26.12.2018 RfxMgr-like functionality to enable/disable protocols
|
# 26.12.2018 RfxMgr-like functionality to enable/disable protocols
|
||||||
# Support for Cuveo devices
|
# Support for Cuveo devices
|
||||||
# 15.12.2018 added more readings and additional RFX-models
|
# 15.12.2018 added more readings and additional RFX-models
|
||||||
@ -47,7 +48,6 @@ use strict;
|
|||||||
use warnings;
|
use warnings;
|
||||||
use Time::HiRes qw(gettimeofday usleep);
|
use Time::HiRes qw(gettimeofday usleep);
|
||||||
|
|
||||||
|
|
||||||
my $last_rmsg = "abcd";
|
my $last_rmsg = "abcd";
|
||||||
my $last_time = 1;
|
my $last_time = 1;
|
||||||
my $trx_rssi = 0;
|
my $trx_rssi = 0;
|
||||||
@ -172,21 +172,22 @@ sub TRX_Define($$) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sub TRX_Notify ($$) {
|
sub TRX_Notify ($$) {
|
||||||
my ($own_hash, $dev_hash) = @_;
|
my ( $own_hash, $dev_hash ) = @_;
|
||||||
my $ownName = $own_hash->{NAME}; # own name / hash
|
my $ownName = $own_hash->{NAME}; # own name / hash
|
||||||
|
|
||||||
return "" if(IsDisabled($ownName)); # Return without any further action if the module is disabled
|
return "" if ( IsDisabled($ownName) ); # Return without any further action if the module is disabled
|
||||||
|
|
||||||
my $devName = $dev_hash->{NAME}; # Device that created the events
|
my $devName = $dev_hash->{NAME}; # Device that created the events
|
||||||
|
|
||||||
return "" if ($devName ne $ownName); # we just want to treat Devio events for own device
|
return "" if ( $devName ne $ownName ); # we just want to treat Devio events for own device
|
||||||
|
|
||||||
my $events = deviceEvents($dev_hash,1);
|
my $events = deviceEvents( $dev_hash, 1 );
|
||||||
return if( !$events );
|
return if ( !$events );
|
||||||
|
|
||||||
|
foreach my $event ( @{$events} ) {
|
||||||
|
|
||||||
foreach my $event (@{$events}) {
|
|
||||||
#Log3 $ownName, 1, "TRX received $event";
|
#Log3 $ownName, 1, "TRX received $event";
|
||||||
if ($event eq "DISCONNECTED") {
|
if ( $event eq "DISCONNECTED" ) {
|
||||||
readingsSingleUpdate( $own_hash, "state", "disconnected", 1 );
|
readingsSingleUpdate( $own_hash, "state", "disconnected", 1 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -295,7 +296,7 @@ sub TRX_SetModes($@) {
|
|||||||
|
|
||||||
my ( $b3, $b4, $b5, $b6 ) = "00";
|
my ( $b3, $b4, $b5, $b6 ) = "00";
|
||||||
|
|
||||||
Log3 $name, 5, "[$name] Setting protocols " . Dumper(@vals);
|
#Log3 $name, 5, "[$name] Setting protocols " . Dumper(@vals);
|
||||||
foreach my $key ( keys %m3 ) {
|
foreach my $key ( keys %m3 ) {
|
||||||
if ( grep ( /$m3{$key}/, @vals ) ) {
|
if ( grep ( /$m3{$key}/, @vals ) ) {
|
||||||
$b3 += $key;
|
$b3 += $key;
|
||||||
@ -369,6 +370,7 @@ sub TRX_DoInit($) {
|
|||||||
#DevIo_TimeoutRead( $hash, 0.5 );
|
#DevIo_TimeoutRead( $hash, 0.5 );
|
||||||
#$buf = DevIo_Expect( $hash, $init, 1 );
|
#$buf = DevIo_Expect( $hash, $init, 1 );
|
||||||
sleep(1);
|
sleep(1);
|
||||||
|
|
||||||
#Log3 $name,1,"TRX Expect received $buf";
|
#Log3 $name,1,"TRX Expect received $buf";
|
||||||
TRX_Clear($hash);
|
TRX_Clear($hash);
|
||||||
|
|
||||||
@ -378,8 +380,10 @@ sub TRX_DoInit($) {
|
|||||||
# Get Status
|
# Get Status
|
||||||
$init = pack( 'H*', "0D00000102000000000000000000" );
|
$init = pack( 'H*', "0D00000102000000000000000000" );
|
||||||
DevIo_SimpleWrite( $hash, $init, 0 );
|
DevIo_SimpleWrite( $hash, $init, 0 );
|
||||||
|
|
||||||
#usleep(50000); # wait 50 ms
|
#usleep(50000); # wait 50 ms
|
||||||
$buf = unpack( 'H*', DevIo_TimeoutRead( $hash, 1 ) );
|
$buf = unpack( 'H*', DevIo_TimeoutRead( $hash, 1 ) );
|
||||||
|
|
||||||
#$buf = DevIo_Expect( $hash, $init, 1 );
|
#$buf = DevIo_Expect( $hash, $init, 1 );
|
||||||
|
|
||||||
if ( !$buf ) {
|
if ( !$buf ) {
|
||||||
@ -408,7 +412,7 @@ sub TRX_DoInit($) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sub TRX_evaluateResponse($$) {
|
sub TRX_evaluateResponse($$) {
|
||||||
my ($hash, $buf ) = @_;
|
my ( $hash, $buf ) = @_;
|
||||||
my $name = $hash->{NAME};
|
my $name = $hash->{NAME};
|
||||||
|
|
||||||
my $fw = undef;
|
my $fw = undef;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user