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

Allow incremental addition of match list entries #1026

Conversation

Devirex
Copy link
Contributor

@Devirex Devirex commented Oct 7, 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? (Bug fix, feature, docs update, ...)
    Feature to add MatchList-entries

  • What is the current behavior? (You can also link to an open issue here)
    Override complete MatchList

  • What is the new behavior (if this is a feature change)?
    Entries from myMatchList attribute will be added to default MatchList

  • Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)
    no

  • Other information:

@sidey79
Copy link
Contributor

sidey79 commented Oct 8, 2021

Thanks you for that Pull Requests.

There is already a Attribut called

MatchList

There is not very much difference in the behaviour. Die you think we can reuse this and only change the evaluation ?

@Devirex
Copy link
Contributor Author

Devirex commented Oct 8, 2021

Thanks you dir that Pull Requests.

There is already a Attribut called

MatchList

There is not very much difference in the behaviour. Die you think we can reuse this and only change the evaluation ?

I have changed myMatchList to MatchList but kept the beahvior. Some tests on my side showed that it is working quite good. If you press "deleteattr" all additional items are gone and the behavior is reverted to default MatchList.

@codecov
Copy link

codecov bot commented Oct 8, 2021

Codecov Report

Merging #1026 (16c1dfc) into master (8aeae92) will increase coverage by 0.05%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1026      +/-   ##
==========================================
+ Coverage   59.78%   59.84%   +0.05%     
==========================================
  Files         111      111              
  Lines        8851     8851              
  Branches     1394     1394              
==========================================
+ Hits         5292     5297       +5     
+ Misses       2586     2577       -9     
- Partials      973      977       +4     
Flag Coverage Δ
fhem 50.30% <100.00%> (+0.06%) ⬆️
modules 59.84% <100.00%> (+0.05%) ⬆️
perl 91.57% <ø> (ø)
unittests 59.84% <100.00%> (+0.05%) ⬆️

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

Impacted Files Coverage Δ
t/FHEM/00_SIGNALduino/01_SIGNALduino_Attr.t 100.00% <ø> (ø)
FHEM/00_SIGNALduino.pm 62.97% <100.00%> (+0.24%) ⬆️

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 8aeae92...16c1dfc. Read the comment docs.

@sidey79
Copy link
Contributor

sidey79 commented Oct 8, 2021

Looks good.
I`ll check how we can extend automated tests.

- Added some tests to verify add and remove MatchList attribute
@sidey79
Copy link
Contributor

sidey79 commented Oct 9, 2021

I wrote some tests.

Currently i think there is a unexpected behaviour deleteing the attribute doesn't delete the attribute completly, only the content seems to be removed.

@sidey79
Copy link
Contributor

sidey79 commented Oct 13, 2021

Do you need any assistance or need some more informations ?

@sidey79
Copy link
Contributor

sidey79 commented Oct 13, 2021

I checked CommandDeleteAttr, and i think this does the delete job, so no need to delete the attribute inside SIGNALduino_Attr.

If you agree, i'll update my tests

@sidey79
Copy link
Contributor

sidey79 commented Oct 30, 2021

@Devirex

Just a reminder for my last question

@Devirex
Copy link
Contributor Author

Devirex commented Nov 2, 2021

@Devirex

Just a reminder for my last question

Hi,

sorry was on holiday the last three weeks. I’ll have a look at this, this week

@Devirex
Copy link
Contributor Author

Devirex commented Nov 7, 2021

Hi,

had a look in this today, I don't understand where you find "CommandDeleteAttr".
The "MatchList" Attribute was always be there and if there is no valid hash List which is set then it will default to standard.

@sidey79
Copy link
Contributor

sidey79 commented Nov 20, 2021

Hi,

had a look in this today, I don't understand where you find "CommandDeleteAttr". The "MatchList" Attribute was always be there and if there is no valid hash List which is set then it will default to standard.

CommandDeleteAttr is a perl command and it already does the job of deleting a attribute so ther is no need, that we do it.
https://github.com/fhem/fhem-mirror/blob/19f4992fb1cb47ee91e0f856de85ea12e23dfeb3/fhem/fhem.pl#L2380

@sidey79 sidey79 merged commit b1a77b6 into RFD-FHEM:master Nov 21, 2021
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.

None yet

2 participants