RFD-FHEM / RFFHEM

Counterpart of SIGNALDuino, it's the code for FHEM to work with the data received from the uC
GNU General Public License v3.0
44 stars 33 forks source link

00_SIGNALduino.pm - sporadic warning in logfile #1213

Open HomeAutoUser opened 6 months ago

HomeAutoUser commented 6 months ago

Expected Behavior

fix warning

Actual Behavior

more often warning

2023.12.18 18:40:11.025 1: PERL WARNING: Argument "" isn't numeric in sort at ./FHEM/00_SIGNALduino.pm line 3470.
2023.12.18 18:40:11.025 3: eval: {SIGNALduino_FW_saveWhitelist("sduino_dummy","0,0.1,0.2,0.3,0.4,0.5,1,3,3.1,4,6,7,7.1,8,9,10,11,12,13,13.1,13.2,14,15,16,17,17.1,18,19,20,20.1,21,22,23,24,25,26,27,28,29,30,31,32,33,33.1,33.2,34,35,36,37,38,39,40,41,42,43,44,44.1,45,46,47,48,49,49.1,49.2,50,51,52,53,54,54.1,55,56,57,58,59,60,61,62,64,65,66,67,68,69,70,71,72,73,74,74.1,76,78,79,80,81,83,84,85,87,88,89,90,91,91.1,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,107.1,108,109,110,111,112,113,114,115,116,116.1,117,118,118.1,119,120,121,122,123,125,126,127,127.1,128,128.1,129,130,132")}
2023.12.18 18:40:11.025 1: stacktrace:
2023.12.18 18:40:11.026 1:     main::__ANON__                      called by ./FHEM/00_SIGNALduino.pm (3470)
2023.12.18 18:40:11.026 1:     main::SIGNALduino_IdList            called by ./FHEM/00_SIGNALduino.pm (3111)
2023.12.18 18:40:11.026 1:     main::SIGNALduino_Attr              called by fhem.pl (3985)
2023.12.18 18:40:11.026 1:     main::CallFn                        called by fhem.pl (3205)
2023.12.18 18:40:11.027 1:     main::CommandAttr                   called by ./FHEM/00_SIGNALduino.pm (3347)
2023.12.18 18:40:11.027 1:     main::SIGNALduino_FW_saveWhitelist  called by (eval 545741) (1)
2023.12.18 18:40:11.027 1:     (eval)                              called by fhem.pl (1177)
2023.12.18 18:40:11.027 1:     main::AnalyzePerlCommand            called by fhem.pl (1206)
2023.12.18 18:40:11.028 1:     main::AnalyzeCommand                called by fhem.pl (1133)
2023.12.18 18:40:11.028 1:     main::AnalyzeCommandChain           called by ./FHEM/01_FHEMWEB.pm (2861)
2023.12.18 18:40:11.028 1:     main::FW_fC                         called by ./FHEM/01_FHEMWEB.pm (981)
2023.12.18 18:40:11.028 1:     main::FW_answerCall                 called by ./FHEM/01_FHEMWEB.pm (609)
2023.12.18 18:40:11.029 1:     main::FW_Read                       called by fhem.pl (3985)
2023.12.18 18:40:11.029 1:     main::CallFn                        called by fhem.pl (786)

line in module: @skippedWhiteId = sort {$a <=> $b} @skippedWhiteId;

Steps to Reproduce the Problem

Unfortunately, I can't provoke it yet

  1. ???

Specifications

HomeAutoUser commented 6 months ago

Ich denke durch Zufall auf den Fall gekommen zu sein. Das Problem wird sein, wenn ausversehen im whitelist_IDs Attribut der Wert mit ,90,1,2,13... beginnt. Sollte sich dies heraussstellen, könnte man bei einem Komma am Anfang, dieses wegschneiden.

elektron-bbs commented 6 months ago

Durch Zufall habe ich gerade diesen Eintrag in whitelist_IDs meines sduino_dummy gesehen:

0,,0.1,0.2,0.3,0.4,0.5,1,3,3.1,4,6,7,7.1,7.2,8,9,10,11,12,13,13.1,13.2,14,15,16,17,17.1,18,19,20,20.1,21,22,23,24,25,26,27,28,29,30,31,32,33,33.1,33.2,33.3,34,35,36,37,38,39,40,41,42,43,44,44.1,45,46,47,48,49,49.1,49.2,50,51,52,53,54,54.1,55,56,57,58,59,60,61,62,64,65,66,67,68,69,70,71,72,73,74,74.1,76,78,79,80,81,83,84,85,86,87,88,89,90,91,91.1,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,107.1,108,109,110,111,112,113,114,115,116,116.1,117,118,118.1,119,120,121,122,123,124,124.1,125,126,127,127.1,128,128.1,129,130,131,132,189,190,200,200.1,209

Zu beachten ist am Beginn: 0,,0.1, Das könnte dadurch entstanden sein, weil ich gestern Test-Protokolle aus der SD_ProtocolData.pm entfernt habe.