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

14_SD_BELL.pm - Adjusted little things #937

Merged
merged 35 commits into from
Mar 22, 2021

Conversation

HomeAutoUser
Copy link
Contributor

  • 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, ...)
    revised code for PerlCritic
    revised comments
    remove fixed room allocation

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

  • What is the new behavior (if this is a feature change)?
    everything adjusted

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

  • Other information:
    none

@codecov
Copy link

codecov bot commented Feb 4, 2021

Codecov Report

Merging #937 (f462452) into master (ddafac0) will increase coverage by 0.01%.
The diff coverage is 30.76%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #937      +/-   ##
==========================================
+ Coverage   58.11%   58.13%   +0.01%     
==========================================
  Files         105      105              
  Lines        8409     8412       +3     
  Branches     1314     1314              
==========================================
+ Hits         4887     4890       +3     
  Misses       2637     2637              
  Partials      885      885              
Flag Coverage Δ
fhem 48.42% <30.76%> (+0.02%) ⬆️
modules 58.13% <30.76%> (+0.01%) ⬆️
perl 91.42% <ø> (ø)
unittests 58.13% <30.76%> (+0.01%) ⬆️

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

Impacted Files Coverage Δ
FHEM/14_SD_BELL.pm 40.09% <30.76%> (+0.90%) ⬆️

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 ddafac0...f462452. Read the comment docs.

HomeAutoUser and others added 5 commits February 4, 2021 10:41
…ogo82148/actions-setup-perl-v1.10.0

Bump shogo82148/actions-setup-perl from v1.9.7 to v1.10.0
 * remove modification (! ... not work)
 * added useful informations
@HomeAutoUser
Copy link
Contributor Author

@sidey79
habe finish mit Anpassungen :-D

@@ -108,6 +113,10 @@ use POSIX;

use GPUtils qw(:all); # wird für den Import der FHEM Funktionen aus der fhem.pl benötigt

use constant {
SD_BELL_VERSION => '2021-02-04',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Würde ich nicht nicht als constant ablegen.

Du kannst es ganz gut aus den Metadaten holen oder wenns PERL Style sein soll dann als Variable deklarieren

sidey79
sidey79 previously approved these changes Feb 6, 2021
Copy link
Contributor

@sidey79 sidey79 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ich genehmige, das mit der Version kannst Du dir ja noch überlegen.
Da gibt es auch eine Hilfsfunktion um Internals aus den Metadaten zu erzeugen

@HomeAutoUser
Copy link
Contributor Author

Wo kann ich das mit der Hilfsfunktion entnehmen oder nachlesen? Ich möchte nicht dumm bleiben :-D

Variable anstatt Constante sehe ich ein, da die Variable sich ändern könnte und nicht ständig gleich = Constant bleibt.

@sidey79
Copy link
Contributor

sidey79 commented Feb 7, 2021

Hier ein Beispiel wie es in initialize und define eingebunden wird:

################################################## FHEM API
sub initialize {
    my $device_definition = shift;

    $device_definition->{DefFn}         = \&handle_define;
    $device_definition->{UndefFn}       = \&handle_undefine;
    $device_definition->{SetFn}         = \&handle_set;
    $device_definition->{GetFn}         = \&handle_get;
    $device_definition->{AttrFn}        = \&handle_attributes;
    $device_definition->{AttrList}      = join(
        q{ },
        (
            q{disable:0,1},
        )
    ) . qq[ $::readingFnAttributes ];

    return FHEM::Meta::InitMod( __FILE__, $device_definition );
}
sub handle_define {
    my $global_definition   = shift;
    my $define              = shift;

    if ( !FHEM::Meta::SetInternals($global_definition) ) {
        return $EVAL_ERROR;
    }

HomeAutoUser and others added 3 commits March 17, 2021 18:49
 * added internal FVERSION for version from modul via
   FHEM::Meta
sidey79
sidey79 previously approved these changes Mar 22, 2021
Copy link
Contributor

@sidey79 sidey79 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Passt für mich Jetzt :)

 * revised JSON information META
@HomeAutoUser
Copy link
Contributor Author

HomeAutoUser commented Mar 22, 2021

@elektron-bbs ,@sidey79 ich habe fertig.

Für die Version in Github erfolgt dann diese Ausgabe.

FVERSION 14_SD_BELL.pm:v1.0.0-s0/2021-03-22

Für die SVN Variante erfolgt dann dies Ausgabe.

FVERSION 14_SD_BELL.pm:v1.0.0-s22345/2021-03-22

Ich passe bei jeder Änderung die "erste Zeile das Datum im Code an" und somit ist eine Unterscheidung genau möglich.
0 = Github | 22345 = SVN Revision und die zusätzliche Angabe das Datum zeigt mit den Stand.

@HomeAutoUser
Copy link
Contributor Author

Wieso generiert ab diesem PR 0b99c0d dies hier fehler? Ich sehe da nicht durch.

Dieser PR 60bc67e davor lief noch ohne Fehler durch. Wo ist der Zusammenhang?

@sidey79
Copy link
Contributor

sidey79 commented Mar 22, 2021

Hmm, irgendwo ist vermutlich ein Syntax Fehler.

Gefunden habe ich ihn aber nicht. :-(

@sidey79
Copy link
Contributor

sidey79 commented Mar 22, 2021

Der Test der nicht zufrieden ist, ist folgender:

    # Failed test 'No Warnings in logfile'
Error:     # at /home/runner/work/RFFHEM/RFFHEM/t/FHEM/00_SIGNALduino/01_SIGNALduino_Parse_MC.t line 120.
    # +-----+----+-------+
    # | GOT | OP | CHECK |
    # +-----+----+-------+
    # | 2   | eq | 0     |
    # +-----+----+-------+

Der hat ein Warning im Logfile gefunden, dass er aber nicht mag.

Das ist jetzt natürlich irgendwie schade, dass wir einen Fehler aus dem META Modul gefunden haben und er uns zum Verhängnis wird:

Error: 2021.03.22 21:30:18 1: PERL WARNING: Use of uninitialized value in pattern match (m//) at FHEM/Meta.pm line 2435.
Error: 2021.03.22 21:30:18 1: PERL WARNING: Use of uninitialized value $prefix in regexp compilation at FHEM/Meta.pm line 2474.

@HomeAutoUser
Copy link
Contributor Author

Da sehen wir, das auch andere Fehler uns ins stolpern bringen können. Ich mache nun in einem anderen Branch step bei Step Schritte um die Stelle zu finden.

@sidey79
Copy link
Contributor

sidey79 commented Mar 22, 2021

Bugs sind angezeigt:
fhem/pkg-Meta#8
fhem/pkg-Meta#7

@HomeAutoUser
Copy link
Contributor Author

An die Stelle kam ich auch. Nun sollte alles wieder in Ordnung sein nach dem Durchlauf.

Danke für die Buganzeige gleich :-)

@HomeAutoUser HomeAutoUser merged commit 103ac9d into RFD-FHEM:master Mar 22, 2021
@HomeAutoUser HomeAutoUser deleted the master_SD_BELL branch March 22, 2021 22:47
@sidey79 sidey79 mentioned this pull request Jan 16, 2022
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
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants