From 21afcfedba218eb4176a5cd42c1cf5ba3d598d34 Mon Sep 17 00:00:00 2001 From: HomeAutoUser Date: Mon, 1 Nov 2021 22:21:50 +0100 Subject: [PATCH 1/8] Update 00_SIGNALduino.pm https://github.com/RFD-FHEM/RFFHEM/issues/1015 --- FHEM/00_SIGNALduino.pm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/FHEM/00_SIGNALduino.pm b/FHEM/00_SIGNALduino.pm index 1800ac05f..1085c4616 100644 --- a/FHEM/00_SIGNALduino.pm +++ b/FHEM/00_SIGNALduino.pm @@ -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); From 0a3e133712d6079c1fabcfcf9d011468b3b58530 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Mon, 1 Nov 2021 21:22:58 +0000 Subject: [PATCH 2/8] Automatic updated controls and CHANGED --- controls_signalduino.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controls_signalduino.txt b/controls_signalduino.txt index 264ddeb92..b963ed621 100644 --- a/controls_signalduino.txt +++ b/controls_signalduino.txt @@ -1,4 +1,4 @@ -UPD 2021-08-30_16:54:51 229349 FHEM/00_SIGNALduino.pm +UPD 2021-11-01_22:21:50 229643 FHEM/00_SIGNALduino.pm UPD 2020-06-15_17:41:39 17876 FHEM/10_FS10.pm UPD 2020-05-26_11:51:12 20465 FHEM/10_SD_GT.pm UPD 2021-08-11_21:38:30 10096 FHEM/14_BresserTemeo.pm From 70ee7d48e41e038c77da56805e2d1e4c5848a3f3 Mon Sep 17 00:00:00 2001 From: HomeAutoUser Date: Mon, 1 Nov 2021 22:34:34 +0100 Subject: [PATCH 3/8] Update 02_SIGNALduino_CheckccConfResponse.t test added with wrong value --- .../02_SIGNALduino_CheckccConfResponse.t | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/t/FHEM/00_SIGNALduino/02_SIGNALduino_CheckccConfResponse.t b/t/FHEM/00_SIGNALduino/02_SIGNALduino_CheckccConfResponse.t index 6eab2bd57..71197efab 100644 --- a/t/FHEM/00_SIGNALduino/02_SIGNALduino_CheckccConfResponse.t +++ b/t/FHEM/00_SIGNALduino/02_SIGNALduino_CheckccConfResponse.t @@ -7,7 +7,7 @@ use Test2::Tools::Compare qw{ is }; our %defs; InternalTimer(time(), sub { - plan(2); + plan(3); subtest 'Test cconf response ASK/OOK (C0Dn11=10B07157C43023B900070018146C070091)' => sub { plan(3); @@ -31,6 +31,15 @@ InternalTimer(time(), sub { is(ReadingsVal($target,"cc1101_config_ext",undef),"Modulation: 2-FSK, Syncmod: 16/16 sync word bits detected, Deviation: 57.13 kHz"); }; + subtest 'Test cconf response wrong value (C0Dn11=216%E857C43023B900070018146C040091)' => sub { + plan(1); + my $target='dummyDuino'; + my $targetHash = $defs{$target}; + + my ($ret)=SIGNALduino_CheckccConfResponse($targetHash,"C0Dn11=10AA568AF80222F851070018166C434091"); + is($ret,'invalid value from uC. Only hexadecimal values are allowed. Please query again.','check return message'); + }; + exit(0); }, 0); From b0f668cf899f4d0560cea9f565698968f1becda7 Mon Sep 17 00:00:00 2001 From: HomeAutoUser Date: Mon, 1 Nov 2021 22:37:08 +0100 Subject: [PATCH 4/8] Update 02_SIGNALduino_CheckccConfResponse.t revised wrong test value --- t/FHEM/00_SIGNALduino/02_SIGNALduino_CheckccConfResponse.t | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/FHEM/00_SIGNALduino/02_SIGNALduino_CheckccConfResponse.t b/t/FHEM/00_SIGNALduino/02_SIGNALduino_CheckccConfResponse.t index 71197efab..fe2c6219e 100644 --- a/t/FHEM/00_SIGNALduino/02_SIGNALduino_CheckccConfResponse.t +++ b/t/FHEM/00_SIGNALduino/02_SIGNALduino_CheckccConfResponse.t @@ -36,7 +36,7 @@ InternalTimer(time(), sub { my $target='dummyDuino'; my $targetHash = $defs{$target}; - my ($ret)=SIGNALduino_CheckccConfResponse($targetHash,"C0Dn11=10AA568AF80222F851070018166C434091"); + my ($ret)=SIGNALduino_CheckccConfResponse($targetHash,"C0Dn11=216%E857C43023B900070018146C040091"); is($ret,'invalid value from uC. Only hexadecimal values are allowed. Please query again.','check return message'); }; From 2fa844c789ae34cb456e9b870c0b6681745ad7d4 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Tue, 2 Nov 2021 09:47:03 +0000 Subject: [PATCH 5/8] Update Versiondate --- FHEM/00_SIGNALduino.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/FHEM/00_SIGNALduino.pm b/FHEM/00_SIGNALduino.pm index 1085c4616..c5201a552 100644 --- a/FHEM/00_SIGNALduino.pm +++ b/FHEM/00_SIGNALduino.pm @@ -1,4 +1,4 @@ -# $Id: 00_SIGNALduino.pm v3.5.2 2021-08-29 21:54:48Z elektron-bbs $ +# $Id: 00_SIGNALduino.pm v3.5.2 2021-11-02 09:46:17Z HomeAutoUser $ # # v3.5.2 - https://github.com/RFD-FHEM/RFFHEM/tree/master # The module is inspired by the FHEMduino project and modified in serval ways for processing the incoming messages @@ -39,7 +39,7 @@ use List::Util qw(first); use constant { - SDUINO_VERSION => '3.5.2+20210829', # Datum wird automatisch bei jedem pull request aktualisiert + SDUINO_VERSION => '3.5.2+20211102', # Datum wird automatisch bei jedem pull request aktualisiert SDUINO_INIT_WAIT_XQ => 1.5, # wait disable device SDUINO_INIT_WAIT => 2, SDUINO_INIT_MAXRETRY => 3, From 0dd9c37553d94702c7af2e430818de38a92f4823 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Wed, 3 Nov 2021 13:01:09 +0000 Subject: [PATCH 6/8] Update Versiondate --- FHEM/00_SIGNALduino.pm | 4 ++-- controls_signalduino.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/FHEM/00_SIGNALduino.pm b/FHEM/00_SIGNALduino.pm index c5201a552..17aa8e650 100644 --- a/FHEM/00_SIGNALduino.pm +++ b/FHEM/00_SIGNALduino.pm @@ -1,4 +1,4 @@ -# $Id: 00_SIGNALduino.pm v3.5.2 2021-11-02 09:46:17Z HomeAutoUser $ +# $Id: 00_SIGNALduino.pm v3.5.2 2021-11-03 13:00:24Z HomeAutoUser $ # # v3.5.2 - https://github.com/RFD-FHEM/RFFHEM/tree/master # The module is inspired by the FHEMduino project and modified in serval ways for processing the incoming messages @@ -39,7 +39,7 @@ use List::Util qw(first); use constant { - SDUINO_VERSION => '3.5.2+20211102', # Datum wird automatisch bei jedem pull request aktualisiert + SDUINO_VERSION => '3.5.2+20211103', # Datum wird automatisch bei jedem pull request aktualisiert SDUINO_INIT_WAIT_XQ => 1.5, # wait disable device SDUINO_INIT_WAIT => 2, SDUINO_INIT_MAXRETRY => 3, diff --git a/controls_signalduino.txt b/controls_signalduino.txt index b963ed621..e08b725c3 100644 --- a/controls_signalduino.txt +++ b/controls_signalduino.txt @@ -1,4 +1,4 @@ -UPD 2021-11-01_22:21:50 229643 FHEM/00_SIGNALduino.pm +UPD 2021-11-02_09:47:03 229643 FHEM/00_SIGNALduino.pm UPD 2020-06-15_17:41:39 17876 FHEM/10_FS10.pm UPD 2020-05-26_11:51:12 20465 FHEM/10_SD_GT.pm UPD 2021-08-11_21:38:30 10096 FHEM/14_BresserTemeo.pm From 177b3a6e8982c9f0ed426083ae8e38ecb1bc41e5 Mon Sep 17 00:00:00 2001 From: HomeAutoUser Date: Wed, 3 Nov 2021 14:02:04 +0100 Subject: [PATCH 7/8] Update 02_SIGNALduino_CheckccConfResponse.t https://github.com/RFD-FHEM/RFFHEM/pull/1031#pullrequestreview-796397674 --- t/FHEM/00_SIGNALduino/02_SIGNALduino_CheckccConfResponse.t | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/t/FHEM/00_SIGNALduino/02_SIGNALduino_CheckccConfResponse.t b/t/FHEM/00_SIGNALduino/02_SIGNALduino_CheckccConfResponse.t index fe2c6219e..4f409ccb3 100644 --- a/t/FHEM/00_SIGNALduino/02_SIGNALduino_CheckccConfResponse.t +++ b/t/FHEM/00_SIGNALduino/02_SIGNALduino_CheckccConfResponse.t @@ -14,7 +14,7 @@ InternalTimer(time(), sub { my $target='dummyDuino'; my $targetHash = $defs{$target}; - my ($ret)=SIGNALduino_CheckccConfResponse($targetHash,"C0Dn11=10B07157C43023B900070018146C070091"); + my ($ret)=SIGNALduino_CheckccConfResponse($targetHash,'C0Dn11=10B07157C43023B900070018146C070091'); is($ret,"Freq: 433.920 MHz, Bandwidth: 325 kHz, rAmpl: 42 dB, sens: 8 dB, DataRate: 5.60 kBaud, Modulation: ASK/OOK","check return message"); is(ReadingsVal($target,"cc1101_config",undef),"Freq: 433.920 MHz, Bandwidth: 325 kHz, rAmpl: 42 dB, sens: 8 dB, DataRate: 5.60 kBaud","check reading cc1101_config value"); is(ReadingsVal($target,"cc1101_config_ext",undef),"Modulation: ASK/OOK","check reading cc1101_config_ext value"); @@ -25,7 +25,7 @@ InternalTimer(time(), sub { my $target='dummyDuino'; my $targetHash = $defs{$target}; - my ($ret)=SIGNALduino_CheckccConfResponse($targetHash,"C0Dn11=10AA568AF80222F851070018166C434091"); + my ($ret)=SIGNALduino_CheckccConfResponse($targetHash,'C0Dn11=10AA568AF80222F851070018166C434091'); is($ret,"Freq: 433.300 MHz, Bandwidth: 203 kHz, rAmpl: 33 dB, sens: 8 dB, DataRate: 49.99 kBaud, Modulation: 2-FSK, Syncmod: 16/16 sync word bits detected, Deviation: 57.13 kHz","check return message"); is(ReadingsVal($target,"cc1101_config",undef),"Freq: 433.300 MHz, Bandwidth: 203 kHz, rAmpl: 33 dB, sens: 8 dB, DataRate: 49.99 kBaud","check reading cc1101_config value"); is(ReadingsVal($target,"cc1101_config_ext",undef),"Modulation: 2-FSK, Syncmod: 16/16 sync word bits detected, Deviation: 57.13 kHz"); @@ -36,7 +36,7 @@ InternalTimer(time(), sub { my $target='dummyDuino'; my $targetHash = $defs{$target}; - my ($ret)=SIGNALduino_CheckccConfResponse($targetHash,"C0Dn11=216%E857C43023B900070018146C040091"); + my ($ret)=SIGNALduino_CheckccConfResponse($targetHash,'C0Dn11=216%E857C43023B900070018146C040091'); is($ret,'invalid value from uC. Only hexadecimal values are allowed. Please query again.','check return message'); }; From ba4e5d206acb0e8e44ab4cb0992288f385314228 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Wed, 3 Nov 2021 13:04:18 +0000 Subject: [PATCH 8/8] Update Versiondate --- FHEM/00_SIGNALduino.pm | 2 +- controls_signalduino.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/FHEM/00_SIGNALduino.pm b/FHEM/00_SIGNALduino.pm index 17aa8e650..f04447548 100644 --- a/FHEM/00_SIGNALduino.pm +++ b/FHEM/00_SIGNALduino.pm @@ -1,4 +1,4 @@ -# $Id: 00_SIGNALduino.pm v3.5.2 2021-11-03 13:00:24Z HomeAutoUser $ +# $Id: 00_SIGNALduino.pm v3.5.2 2021-11-03 13:02:40Z HomeAutoUser $ # # v3.5.2 - https://github.com/RFD-FHEM/RFFHEM/tree/master # The module is inspired by the FHEMduino project and modified in serval ways for processing the incoming messages diff --git a/controls_signalduino.txt b/controls_signalduino.txt index e08b725c3..4ce493c21 100644 --- a/controls_signalduino.txt +++ b/controls_signalduino.txt @@ -1,4 +1,4 @@ -UPD 2021-11-02_09:47:03 229643 FHEM/00_SIGNALduino.pm +UPD 2021-11-03_13:01:09 229643 FHEM/00_SIGNALduino.pm UPD 2020-06-15_17:41:39 17876 FHEM/10_FS10.pm UPD 2020-05-26_11:51:12 20465 FHEM/10_SD_GT.pm UPD 2021-08-11_21:38:30 10096 FHEM/14_BresserTemeo.pm