Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature parse optimize #926

Merged
merged 28 commits into from
Feb 27, 2021
Merged

Feature parse optimize #926

merged 28 commits into from
Feb 27, 2021

Conversation

sidey79
Copy link
Contributor

@sidey79 sidey79 commented Jan 8, 2021

  • Please check if the PR fulfills these requirements
  • Tests for the changes have been added / modified (needed for for bug fixes / features)
  • commandref has been added / updated (needed for bug fixes / features)
  • CHANGED has been updated (needed for bug fixes / features)
  • What kind of change does this PR introduce?
  • This fixes bugs (perl warnings)
  • What is the current behavior? (You can also link to an open issue here)
  • RMSGs which are not valid are accepted and cause perl warnings and errors during processing
  • What is the new behavior (if this is a feature change)?
  • rmsgs which are not valid are not accepted and do not cause perl warnings and errors during processing
  • rmsgs are filtered out in the parse_Mx subs
  • arguments to parse_Mx subs are reduced to (hash and rmsg)
  • Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)
  • rmsgs from other firmwares, or special debug firmwares which adds extra data are not accepted anymore
    Serval tests in out testjson have these special things in place
  • Other information:

Tests are updated and a check for occured perl warnings is implemented in the tests for the parse subs

sidey79 and others added 5 commits December 29, 2020 17:17
01_SIGNALduino_Parse_MC.t

Modified SIGNALduino_Parse_MC to use less parameters and check data to be more robust 00_SIGNALduino.pm - SIGNALduino_Parse | check raw´s | extension code for no warnings #917
Migrated tests from UnitTest\Tests\test_07_sub_SIGNALdiuno_Parse_MC-defintion.txt

00_SIGNALduino.pm

made _limit_to_number, _limit_to_hex and _limit_to_MC_pattern aware of getting an undefined variable
@codecov
Copy link

codecov bot commented Jan 8, 2021

Codecov Report

Merging #926 (d4391aa) into master (1e9c770) will increase coverage by 0.36%.
The diff coverage is 84.09%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #926      +/-   ##
==========================================
+ Coverage   57.17%   57.54%   +0.36%     
==========================================
  Files         103      104       +1     
  Lines        8358     8400      +42     
  Branches     1308     1313       +5     
==========================================
+ Hits         4779     4834      +55     
+ Misses       2714     2695      -19     
- Partials      865      871       +6     
Flag Coverage Δ
fhem 47.71% <84.09%> (+0.52%) ⬆️
modules 57.54% <84.09%> (+0.36%) ⬆️
perl 91.42% <ø> (ø)
unittests 57.54% <84.09%> (+0.36%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
t/FHEM/00_SIGNALduino/01_SIGNALduino_Parse_MC.t 100.00% <ø> (ø)
t/FHEM/00_SIGNALduino/01_SIGNALduino_Parse_MN.t 100.00% <ø> (ø)
t/FHEM/00_SIGNALduino/01_SIGNALduino_Parse_MS.t 100.00% <ø> (ø)
t/FHEM/00_SIGNALduino/01_SIGNALduino_Parse_MU.t 100.00% <ø> (ø)
t/FHEM/14_BresserTemeo/09_autocreate_devices.t 100.00% <ø> (ø)
t/FHEM/14_SD_WS/09_autocreate_devices.t 100.00% <ø> (ø)
FHEM/00_SIGNALduino.pm 59.59% <83.13%> (+0.47%) ⬆️
t/FHEM/00_SIGNALduino/00_limit_subs.t 100.00% <100.00%> (ø)
FHEM/41_OREGON.pm 28.50% <0.00%> (+4.75%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1e9c770...bf1fefa. Read the comment docs.

@sidey79
Copy link
Contributor Author

sidey79 commented Jan 18, 2021

@HomeAutoUser
Hier ist der PR mit Branch zu #917

@HomeAutoUser
Copy link
Contributor

Dein Branch lasse ich test laufen. Anmerkung habe ich vorgenommen, wo der Syntaxfehler vorliegt.

Nach dieser Parse_MC sollten wir die anderen auf jedenfall durchgehen weil dort der Fehler
2021.01.18 13:51:10.599 1: PERL WARNING: Argument "4^B" isn't numeric in numeric ge (>=) at ./FHEM/00_SIGNALduino.pm line 2251.
von einer anderen Sub (x_MS , x_MU)kommt. In der jetzigen hast du ja die Prüfung auf dezimal drin. Somit sollte dies von der Sub abgeleht werden.

Letztendlich habe ich keine Beinträchtigungen festgestellt mit deinem Stand.

  *  more data to test
  * rename testname
@sidey79
Copy link
Contributor Author

sidey79 commented Jan 19, 2021

Ah, das ist gut.
Ich denke ich pushe heute die anderen parse subs.
Muss da nur noch was aussortieren

@sidey79 sidey79 marked this pull request as ready for review February 21, 2021 09:47
@sidey79 sidey79 requested review from elektron-bbs and HomeAutoUser and removed request for elektron-bbs February 21, 2021 09:51
@sidey79
Copy link
Contributor Author

sidey79 commented Feb 27, 2021

@elektron-bbs
@HomeAutoUser

Wenn ihr fragen bezüglich Review habt, dann her damit.
Würde das Thema gerne abschließen bevor neue gestartet werden :)

@elektron-bbs
Copy link
Contributor

Du hattest mich bei den Reviews gelöscht, sonst hätte ich sicher schon bestätigt.
Ich habe den Branch auf einem System laufen und mir sind eigentlich keine Absonderlichkeiten aufgefallen.

@sidey79
Copy link
Contributor Author

sidey79 commented Feb 27, 2021

@elektron-bbs
Das mit dem Entfernen als Reviewer war keine Absicht. Ich habe es korrigiert.
Danke für das Feedback

@sidey79 sidey79 merged commit d23b410 into master Feb 27, 2021
@sidey79 sidey79 deleted the feature_parse-Optimize branch February 27, 2021 15:05
sidey79 added a commit that referenced this pull request Jan 16, 2022
Release 3.5.2 
     10_SD_Rojaflex.pm 
          new: Module for rojaflex remote controls

     90_SIGNALduino_un.pm
          changed: fix some PerlCritic hints (#914)
          changed: revised commandref

     00_SIGNALduino.pm:
          feature: xFSK processing
          feature: Added support for directio and none.
          feature: Extension for "get sduino ccreg" (#918)
          feature: parse subs optimized (#926)
          feature: update reading  config when change settings (#948)
          feature: Allow incremental addition of match list entries (#1026)
          change: added N to send SN  xFSK sendCommand
          change: added new sub SIGNALduino_calcRSSI to simplification code
          change: revised Parse_MN and loglevel
          change: revised logoutput text SIGNALduino_Get_Command
          change: rename "get raw" to "get rawmsg" (#925)
          feature: added commandref rfmode & cc1101_reg_user
          feature: added hardware ESP32cc1101, MAPLEMINI_F103CB on attribute
          feature: added new attrib rfmode to changed to xFSK & revised commandref
          feature: added separat sub SIGNALduino_Attr_rfmode
          feature: added set cmd LaCrossePairForSec (for LaCrosse
          bugfix: SIGNALduino_CheckccConfResponse is more robust #1015 (#1031)
          bugfix: fix PERL WARNING (#895) (#972)
          bugfix: get ccreg command caused stacktrace #898
          bugfix: Bugfix define with hostname 901 (#904)
          bugfix: Wrong version assignment fixed
          Bugfix, module runs now without fhemweb instance 
          bugfix: display protocol list (#947)
          bugfix: require 99_Utils only if really needed (#950)
          bugfix: corrected incorrect logoutput (#951)
          bugfix: Fix Multiple send delay (#941)
          bugfix: Fixes high CPU and MEM usage in patternExists (#988)

  SD_Protocols.pm:
          change: moved subs for converting in own package
                  ConvLaCrosse, ConvKoppFreeControl and ConvPCA301
          bugfix: Hideki fix inverted message (#974)

  SD_ProtocolData.pm
          feature: added rfmode, register rubric & comments
          change: fix perlcritic Severity 3 - hard tabs
          feature: Added crc checksum verification Revolt (#956)

  14_SD_WS.pm: 
         feature: protocol 27 for sensor EFS-3110A (#890)
         feature: protocol 106 for GT-TMBBQ-0   
         feature: protocol 110 for ADE WS1907 Weather station (#970)
         feature: protocol 111 for TS-FT002 water tank level (#1000)
         feature: protocol 113 for GFGT 433 B1 Wireless Grill sensor (#1003)
         feature: new protocol 108 for BRESSER 5-in-1 Weather Center
                  and BRESSER Professional Rain Gauge (#973)
         feature: protocol 115 for Bresser 6-in-1 and 
                  5-in-1 Comfort Wetter Center (#1010)
         feature: new protocol 107 for Fine Offset WH51 (#1055)
         feature: new protocol 116 for Fine Offset WH57 (#1061)
         bugfix: Update protocol 64 for sensor WH2A (#1009)
         bugfix: Conrad S522 protocol 33 no reading batteryState (#1042)

  14_SD_WS07.pm: 
         feature: protocol definition 7.1 for Mebus HQ7312-2 (#1050)

  14_FLAMINGO.pm: 
         change: Perlcritic (#887)

  14_SD_UT.pm:
         change: PerlCritic (#877)
         feature: new protocol 105 for remote control BF-301
         feature: decode and send protocol 56 remote control AC114-01B (#910)
         feature: decode and send protocol for Visivo remote control
         feature: Remote control SEAV BeSmart S4 (#933)
         feature: new protocol 114 for TR401 (#1002)

 14_SD_BELL.pm:
         change: PerlCritic (#877)
         change: Adjusted little things (#937)
         feature: added AVANTEK Wireless doorbell & LED night light (#981)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

00_SIGNALduino.pm - SIGNALduino_Parse | check raw´s | extension code for no warnings
4 participants