Skip to content

Commit

Permalink
Update 00_SIGNALduino.pm
Browse files Browse the repository at this point in the history
  • Loading branch information
HomeAutoUser committed Nov 1, 2021
1 parent 6e1dd15 commit 98eeb76
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions FHEM/00_SIGNALduino.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1174,6 +1174,11 @@ sub SIGNALduino_CheckCmdsResponse {
sub SIGNALduino_CheckccConfResponse {
my (undef,$str) = split('=', $_[1]);
my $var;

# https://github.com/RFD-FHEM/RFFHEM/issues/1015 | value can arise due to an incorrect transmission from serial
# $str = "216%E857C43023B900070018146C040091";
return ('invalid value from uC. Only hexadecimal values are allowed. Please query again.',undef) if($str !~ /^[A-F0-9a-f]+$/);

my %r = ( '0D'=>1,'0E'=>1,'0F'=>1,'10'=>1,'11'=>1,'12'=>1,'1B'=>1,'1D'=>1, '15'=>1);
foreach my $a (sort keys %r) {
$var = substr($str,(hex($a)-13)*2, 2);
Expand Down

0 comments on commit 98eeb76

Please sign in to comment.