Revision 16362: 11_OWX_CCC.pm: Neue Version 7.08 11_OWX_FRM.pm: Neue Version 7.0

Begonnen von ffdec, 11 März 2018, 14:42:46

Vorheriges Thema - Nächstes Thema

ffdec

Hi, auf die Schnelle habe ich nichts naheliegenderes zum Einordnen gefunden. Seit der Änderung (9.3.) oben (Firmata mit 1Wire) erhalte ich Fehlermeldungen und der Server ist nicht erreichbar. Abhilfe nur durch Restore. Ich verwende fünf DS18B20 zur Temperaturmessung an einem Arduino-Firmata. Danke für Eure Hilfe.

https://forum.fhem.de/index.php/topic,85503.msg778834.html#msg778834

2018.03.11 11:49:13.157 1: PERL WARNING: "my" variable $self masks earlier declaration in same scope at ./FHEM/11_OWX_FRM.pm line 125, <$fh> line 654.
2018.03.11 11:49:13.157 1: PERL WARNING: "state" variable @_ masks earlier declaration in same scope at ./FHEM/11_OWX_FRM.pm line 125, <$fh> line 654.
2018.03.11 11:49:13.157 1: PERL WARNING: "my" variable $hash masks earlier declaration in same scope at ./FHEM/11_OWX_FRM.pm line 126, <$fh> line 654.
2018.03.11 11:49:13.158 1: PERL WARNING: "my" variable $self masks earlier declaration in same scope at ./FHEM/11_OWX_FRM.pm line 153, <$fh> line 654.
2018.03.11 11:49:13.158 1: PERL WARNING: "state" variable @_ masks earlier declaration in same scope at ./FHEM/11_OWX_FRM.pm line 153, <$fh> line 654.
2018.03.11 11:49:13.158 1: PERL WARNING: "my" variable $hash masks earlier declaration in same scope at ./FHEM/11_OWX_FRM.pm line 154, <$fh> line 654.
2018.03.11 11:49:13.158 1: PERL WARNING: "my" variable $pin masks earlier declaration in same scope at ./FHEM/11_OWX_FRM.pm line 160, <$fh> line 654.
2018.03.11 11:49:13.159 1: PERL WARNING: Bareword found where operator expected at ./FHEM/11_OWX_FRM.pm line 188, near "STARTING INIT"
2018.03.11 11:49:13.159 1: PERL WARNING:        (Do you need to predeclare STARTING?)
2018.03.11 11:49:13.159 1: PERL WARNING: Misplaced _ in number at ./FHEM/11_OWX_FRM.pm line 188, <$fh> line 654.
2018.03.11 11:49:13.159 1: PERL WARNING: Bareword found where operator expected at ./FHEM/11_OWX_FRM.pm line 188, near "11_OWX_FRM"
2018.03.11 11:49:13.159 1: PERL WARNING:        (Missing operator before OWX_FRM?)
2018.03.11 11:49:13.160 1: PERL WARNING: String found where operator expected at ./FHEM/11_OWX_FRM.pm line 188, near "$msg = ""
2018.03.11 11:49:13.160 1: PERL WARNING:        (Missing semicolon on previous line?)
2018.03.11 11:49:13.160 1: PERL WARNING: String found where operator expected at ./FHEM/11_OWX_FRM.pm line 188, near "main::Log3 $name,1,""
2018.03.11 11:49:13.160 1: PERL WARNING: String found where operator expected at ./FHEM/11_OWX_FRM.pm line 188, near "if ( main::AttrVal($hash->{NAME},""
2018.03.11 11:49:13.160 1: PERL WARNING: String found where operator expected at ./FHEM/11_OWX_FRM.pm line 188, near "buspower",""
2018.03.11 11:49:13.160 1: PERL WARNING: String found where operator expected at ./FHEM/11_OWX_FRM.pm line 188, near "","") eq ""
2018.03.11 11:49:13.160 1: PERL WARNING:        (Missing operator before ") eq "?)
2018.03.11 11:49:13.161 1: PERL WARNING: Bareword found where operator expected at ./FHEM/11_OWX_FRM.pm line 188, near "") eq "parasitic"
2018.03.11 11:49:13.161 1: PERL WARNING:        (Missing operator before parasitic?)
2018.03.11 11:49:13.161 1: PERL WARNING: String found where operator expected at ./FHEM/11_OWX_FRM.pm line 188, near "$hash->{STATE}=""
2018.03.11 11:49:13.161 1: PERL WARNING: String found where operator expected at ./FHEM/11_OWX_FRM.pm line 188, near "main::InternalTimer(main::gettimeofday()+10, ""
2018.03.11 11:49:13.161 1: PERL WARNING: Bareword found where operator expected at ./FHEM/11_OWX_FRM.pm line 189, near "main::InternalTimer(main::gettimeofday()+10, "OWX_Discov$
  (Might be a runaway multi-line "" string starting on line 188)
2018.03.11 11:49:13.161 1: PERL WARNING: String found where operator expected at ./FHEM/11_OWX_FRM.pm line 189, near "my $res = ""
2018.03.11 11:49:13.161 1: PERL WARNING: String found where operator expected at ./FHEM/11_OWX_FRM.pm line 189, near "my @data = unpack ""
2018.03.11 11:49:13.162 1: PERL WARNING: String found where operator expected at ./FHEM/11_OWX_FRM.pm line 189, near "my $times = main::AttrVal($hash,""
2018.03.11 11:49:13.162 1: PERL WARNING: String found where operator expected at ./FHEM/11_OWX_FRM.pm line 189, near "main::OWX_WDBGL($name,5,""
syntax error at ./FHEM/11_OWX_FRM.pm line 62, near "}"
Global symbol "$class" requires explicit package name (did you forget to declare "my $class"?) at ./FHEM/11_OWX_FRM.pm line 62, <$fh> line 654.
Can't use global @_ in "my" at ./FHEM/11_OWX_FRM.pm line 76, near "= @_"
Global symbol "$self" requires explicit package name (did you forget to declare "my $self"?) at ./FHEM/11_OWX_FRM.pm line 77, <$fh> line 654.
syntax error at ./FHEM/11_OWX_FRM.pm line 114, near "}"
Can't use global @_ in "my" at ./FHEM/11_OWX_FRM.pm line 125, near "= @_"
syntax error at ./FHEM/11_OWX_FRM.pm line 142, near "}"
Can't use global @_ in "my" at ./FHEM/11_OWX_FRM.pm line 153, near "= @_"
syntax error at ./FHEM/11_OWX_FRM.pm line 179, near "}"
"no" not allowed in expression at ./FHEM/11_OWX_FRM.pm line 189, at end of line
./FHEM/11_OWX_FRM.pm has too many errors.
Compilation failed in require at ./FHEM/00_OWX.pm line 199, <$fh> line 654.
2018.03.11 11:58:37.889 1: Including fhem.cfg
2018.03.11 11:58:38.100 1: HMLAN_Parse: LAN new condition disconnected
2018.03.11 11:58:38.108 1: HMLAN_Parse: LAN new condition init
2018.03.11 11:58:39.747 1: [Alarm_Define] data hash restored from save file with date Sat Mar 10 17:58:17 2018
2018.03.11 11:58:40.161 1: OWX_FRM::Define warning: version 7.05 not identical to OWX version 7.08
2018.03.11 11:58:44.641 1: PERL WARNING: Use of uninitialized value in numeric comparison (<=>) at fhem.pl line 2055, <$fh> line 674.
2018.03.11 11:58:44.645 1: PERL WARNING: Use of uninitialized value in numeric comparison (<=>) at fhem.pl line 2055, <$fh> line 681.
2018.03.11 11:58:44.649 1: PERL WARNING: Use of uninitialized value in numeric comparison (<=>) at fhem.pl line 2055, <$fh> line 688.
2018.03.11 11:58:44.653 1: PERL WARNING: Use of uninitialized value in numeric comparison (<=>) at fhem.pl line 2055, <$fh> line 695.
2018.03.11 11:58:44.657 1: PERL WARNING: Use of uninitialized value in numeric comparison (<=>) at fhem.pl line 2055, <$fh> line 702.
2018.03.11 11:58:44.665 1: PERL WARNING: Use of uninitialized value in numeric comparison (<=>) at fhem.pl line 2055, <$fh> line 710.
HMUARTLGW HMLAN Alarmanlage ZPumpe VCONTROL Viessmann 333-F MySensors CO2 Floorplan IT Raspberry 3 CC1101 Firmata Arduino nanoCUL868

Maista

Moin,

Fehlermeldungen bei mir ebenfalls.
Habe die vorherige 11_OWX_FRM.pm zurück gespielt, danach läuft wieder.

Gruss Gerd

jensb

Bin mir nicht sicher ob das alles ist, aber auf jeden Fall fehlen in der Version 15392 aus dem SVN in Zeile 188 die hier ergänzten letzten 2 Zeichen:


187 sub Reopen () {
188   main::Log 1,"[OWX_FRM] Warning: ->Reopen currently not defined";
198 }


Vielleicht kann das jemand überprüfen, der 1-Wird Hardware zur Verfügung hat.

Grüße,
Jens

FHEM 6.1 - RPi 4 Raspbian 12 + PiTFT - OPi Zero Armbian 5.35
EnOcean - (W)LAN/Firmata: BMP180, TSL2561, SHT21, Heatronic 3, OBIS - WLAN/ESP8266: Gardena 1251, Zirkulationspumpe - RTL433: Oregon - Bluetooth - MQTT
Contributions: https://svn.fhem.de/trac/browser/trunk/fhem/contrib/jensb

ffdec

Zitat von: jensb am 11 März 2018, 20:05:01
Bin mir nicht sicher ob das alles ist, aber auf jeden Fall fehlen in der Version 15392 aus dem SVN in Zeile 188 die hier ergänzten letzten 2 Zeichen:


187 sub Reopen () {
188   main::Log 1,"[OWX_FRM] Warning: ->Reopen currently not defined";
198 }


Vielleicht kann das jemand überprüfen, der 1-Wird Hardware zur Verfügung hat.

Grüße,
Jens

Leider immer noch Fehler und keine Lauffähigkeit.
HMUARTLGW HMLAN Alarmanlage ZPumpe VCONTROL Viessmann 333-F MySensors CO2 Floorplan IT Raspberry 3 CC1101 Firmata Arduino nanoCUL868

jensb

Wäre zu schön gewesen. Dann wird sich das wahrscheinlich @pah noch einmal vornehmen dürfen. Wenn ich dazu komme werde ich in den nächsten Tagen mein Testsystem hochfahren. Vielleicht kann ich einen Patch vorbereiten.

Grüße,
Jens
FHEM 6.1 - RPi 4 Raspbian 12 + PiTFT - OPi Zero Armbian 5.35
EnOcean - (W)LAN/Firmata: BMP180, TSL2561, SHT21, Heatronic 3, OBIS - WLAN/ESP8266: Gardena 1251, Zirkulationspumpe - RTL433: Oregon - Bluetooth - MQTT
Contributions: https://svn.fhem.de/trac/browser/trunk/fhem/contrib/jensb

Prof. Dr. Peter Henning

Sorry, mein Fehler. Habe bei einer trivialen Änderung - husch,husch - einen trivialen Fehler eingebaut.

Sollte mit der soeben eingecheckten Version 7.09 behoben sein.

LG

pah

ffdec

Keine Problem  ;)

Leider bekomme ich aber noch ein paar kleine Fehlerchen... die auch mindestens die Oberfläche abwürgen.

Can't use global @_ in "my" at ./FHEM/11_OWX_FRM.pm line 76, near "= @_"
Global symbol "$self" requires explicit package name (did you forget to declare "my $self"?) at ./FHEM/11_OWX_FRM.pm line 77, <$fh> line 654.
syntax error at ./FHEM/11_OWX_FRM.pm line 114, near "}"
Can't use global @_ in "my" at ./FHEM/11_OWX_FRM.pm line 125, near "= @_"
syntax error at ./FHEM/11_OWX_FRM.pm line 142, near "}"
Can't use global @_ in "my" at ./FHEM/11_OWX_FRM.pm line 153, near "= @_"
syntax error at ./FHEM/11_OWX_FRM.pm line 179, near "}"
Can't use global @_ in "my" at ./FHEM/11_OWX_FRM.pm line 203, near "= @_"
./FHEM/11_OWX_FRM.pm has too many errors.
Compilation failed in require at ./FHEM/00_OWX.pm line 199, <$fh> line 654.
HMUARTLGW HMLAN Alarmanlage ZPumpe VCONTROL Viessmann 333-F MySensors CO2 Floorplan IT Raspberry 3 CC1101 Firmata Arduino nanoCUL868

Prof. Dr. Peter Henning

Uff, das kommt daher, dass ich die 11_OWX_FRM selten teste...

Bitte die angehängte Datei nehmen, die ich auch umgehend einchecke.

LG

pah

ffdec

Jetzt rennts wieder ordentlich. Vielen Dank für die fixe Hilfe. Ich habe zwar noch ein paar Meldungen die in die Richtung gehen, die waren aber schon länger da. Die prüfe ich erst noch mal selbst und melde mich ggf. nochmal.
HMUARTLGW HMLAN Alarmanlage ZPumpe VCONTROL Viessmann 333-F MySensors CO2 Floorplan IT Raspberry 3 CC1101 Firmata Arduino nanoCUL868

ffdec

HMUARTLGW HMLAN Alarmanlage ZPumpe VCONTROL Viessmann 333-F MySensors CO2 Floorplan IT Raspberry 3 CC1101 Firmata Arduino nanoCUL868

Prof. Dr. Peter Henning

Das sind aber nur Meldungen, die irgendwo tief aus Firmata kommen - und nur Warnungen.

LG

pah

jensb

Sowohl die Warnings als auch der Error kommen aus aus fhem.pl. Werde versuchen herauszufinden, was die eigentliche Ursache ist.

Grüße,
Jens
FHEM 6.1 - RPi 4 Raspbian 12 + PiTFT - OPi Zero Armbian 5.35
EnOcean - (W)LAN/Firmata: BMP180, TSL2561, SHT21, Heatronic 3, OBIS - WLAN/ESP8266: Gardena 1251, Zirkulationspumpe - RTL433: Oregon - Bluetooth - MQTT
Contributions: https://svn.fhem.de/trac/browser/trunk/fhem/contrib/jensb

jensb

@pah
Nach dem Einfügen von Logging in fhem.pl, FRM, OWX und OWX_FRM und einigen Stunden Tests von diversen Varianten steht die Ursache für "PERL WARNING: Use of uninitialized value in numeric comparison (<=>) at fhem.pl line 2055" fest. Das Löschen von OWX Z. 192ff

  #-- check if we have a COC/CUNO interface attached 
  }elsif( (defined( $defs{$dev}->{VERSION} ) ? $defs{$dev}->{VERSION} : "") =~ m/CSM|CUNO|MapleCUN...(4|5|6|7|C|D|E|F)/ ){
     require "$attr{global}{modpath}/FHEM/11_OWX_CCC.pm";
     $hwdevice = OWX_CCC->new($hash);

lässt den Fehler verschwinden. Alternativ genügt es "$defs{$dev}->{VERSION}" aus der Bedingung zu entfernen. Vermutlich modifiziert "$defs{$dev}->{VERSION}" den Hash "$defs", obwohl das sicher nicht beabsichtigt ist.

Für die FRM-Users würde es reichen die Reihenfolge von CCC und FRM in OWX_Define zu tauschen, vielleicht fällt dir aber eine bessere Lösung ein.

Den von @ffdec gemeldeten Error werde ich als nächstes untersuchen.

Grüße,
Jens
FHEM 6.1 - RPi 4 Raspbian 12 + PiTFT - OPi Zero Armbian 5.35
EnOcean - (W)LAN/Firmata: BMP180, TSL2561, SHT21, Heatronic 3, OBIS - WLAN/ESP8266: Gardena 1251, Zirkulationspumpe - RTL433: Oregon - Bluetooth - MQTT
Contributions: https://svn.fhem.de/trac/browser/trunk/fhem/contrib/jensb

jensb

@pah
Die Ursache für das gemeldete Logging "Error: >DeviceName:PinNumber< has no TYPE, but following keys: ><" ist eine Folgefehler der unten beschriebenen unbeabsichtigten Device-Definition durch den Zugriff auf "$defs{$dev}->{VERSION}" in OWX_Define.

Grüße,
Jens
FHEM 6.1 - RPi 4 Raspbian 12 + PiTFT - OPi Zero Armbian 5.35
EnOcean - (W)LAN/Firmata: BMP180, TSL2561, SHT21, Heatronic 3, OBIS - WLAN/ESP8266: Gardena 1251, Zirkulationspumpe - RTL433: Oregon - Bluetooth - MQTT
Contributions: https://svn.fhem.de/trac/browser/trunk/fhem/contrib/jensb

Prof. Dr. Peter Henning

#14
Gruselig. Weil hier kein modifizierender Zugriff auf den Hash erfolgt, und eine Device-Definition auch nicht.

Sollte man doch bitte erstmal im Developerbereich diskutieren. Danke trotzdem für das Suchen.

LG

pah

Edit: Bitte mal testen ob die Meldung auch mit


  #-- check if we have a COC/CUNO interface attached 
  }elsif( ( $defs{$dev}->{VERSION}  && $defs{$dev}->{VERSION} =~ m/CSM|CUNO|MapleCUN...(4|5|6|7|C|D|E|F)/ ){
     require "$attr{global}{modpath}/FHEM/11_OWX_CCC.pm";
     $hwdevice = OWX_CCC->new($hash);
   


weg ist.

ffdec

Ich finde den Code nicht in der OWX_FRM, OWX_CCC und auch nicht in der fhem.pl. Ich habe ebenso im letzten SVN geschaut, da ist er auch nicht zu finden. Oder habe ich die falsche Datei?
HMUARTLGW HMLAN Alarmanlage ZPumpe VCONTROL Viessmann 333-F MySensors CO2 Floorplan IT Raspberry 3 CC1101 Firmata Arduino nanoCUL868

jensb

Du hast dich verlaufen. Der Code steck in OWX_Define, also in 00_OWX.pm.

Grüße,
Jens
FHEM 6.1 - RPi 4 Raspbian 12 + PiTFT - OPi Zero Armbian 5.35
EnOcean - (W)LAN/Firmata: BMP180, TSL2561, SHT21, Heatronic 3, OBIS - WLAN/ESP8266: Gardena 1251, Zirkulationspumpe - RTL433: Oregon - Bluetooth - MQTT
Contributions: https://svn.fhem.de/trac/browser/trunk/fhem/contrib/jensb

Prof. Dr. Peter Henning

Ah, sorry, da ist eine "(" zu viel.

#-- check if we have a COC/CUNO interface attached
  }elsif(  $defs{$dev}->{VERSION}  && $defs{$dev}->{VERSION} =~ m/CSM|CUNO|MapleCUN...(4|5|6|7|C|D|E|F)/ ){
     require "$attr{global}{modpath}/FHEM/11_OWX_CCC.pm";
     $hwdevice = OWX_CCC->new($hash);
   


LG

pah

ffdec

Leider noch nicht

2018.03.17 15:46:28.290 1: Including fhem.cfg
2018.03.17 15:46:28.492 1: HMLAN_Parse: LAN new condition disconnected
2018.03.17 15:46:28.500 1: HMLAN_Parse: LAN new condition init
2018.03.17 15:46:30.102 1: [Alarm_Define] data hash restored from save file with date 2018-03-16 22:57:08
2018.03.17 15:46:30.404 1: OWX_FRM::Define warning: version 7.10 not identical to OWX version 7.08
2018.03.17 15:46:34.832 1: PERL WARNING: Use of uninitialized value in numeric comparison (<=>) at fhem.pl line 2055, <$fh> line 654.
2018.03.17 15:46:34.835 1: PERL WARNING: Use of uninitialized value in numeric comparison (<=>) at fhem.pl line 2055, <$fh> line 661.
2018.03.17 15:46:34.839 1: PERL WARNING: Use of uninitialized value in numeric comparison (<=>) at fhem.pl line 2055, <$fh> line 668.
2018.03.17 15:46:34.843 1: PERL WARNING: Use of uninitialized value in numeric comparison (<=>) at fhem.pl line 2055, <$fh> line 675.
2018.03.17 15:46:34.847 1: PERL WARNING: Use of uninitialized value in numeric comparison (<=>) at fhem.pl line 2055, <$fh> line 682.
2018.03.17 15:46:34.854 1: PERL WARNING: Use of uninitialized value in numeric comparison (<=>) at fhem.pl line 2055, <$fh> line 690.
2018.03.17 15:46:35.244 1: PERL WARNING: Use of uninitialized value in numeric comparison (<=>) at fhem.pl line 2055, <$fh> line 872.
2018.03.17 15:46:35.387 1: PERL WARNING: Use of uninitialized value in numeric comparison (<=>) at fhem.pl line 2055, <$fh> line 968.
2018.03.17 15:46:35.494 1: Error: >OWX:6< has no TYPE, but following keys: ><
2018.03.17 15:46:35.514 1: Including ./log/fhem.save
2018.03.17 15:46:36.293 1: usb create starting
2018.03.17 15:46:36.820 1: usb create end
2018.03.17 15:46:36.821 0: Featurelevel: 5.8
2018.03.17 15:46:36.821 0: Server started with 147 defined entities (fhem.pl:16403/2018-03-13 perl:5.024001 os:linux user:fhem pid:1833)
2018.03.17 15:46:38.060 1: HMLAN_Parse: LAN new condition ok
2018.03.17 15:46:41.157 1: PERL WARNING: Use of uninitialized value in concatenation (.) or string at ./FHEM/10_FRM.pm line 1051.
HMUARTLGW HMLAN Alarmanlage ZPumpe VCONTROL Viessmann 333-F MySensors CO2 Floorplan IT Raspberry 3 CC1101 Firmata Arduino nanoCUL868

Prof. Dr. Peter Henning

Sehr seltsam. Wie man sich leicht durch Eingabe von
{$defs{"irgendeindevicename"}->{VERSION} =~ m/xx/;; Dumper($defs{"irgendeindevicename"}->{VERSION})}
überzeugen kann, wird durch die Prüfung des regulären Ausdrucks gar nichts am Definitionshash verändert.

LG

pah

jensb

  }elsif(defined($defs{$dev}) && defined($defs{$dev}->{VERSION}) && $defs{$dev}->{VERSION} =~ m/CSM|CUNO|MapleCUN...(4|5|6|7|C|D|E|F)/ ){

funktioniert für OWX_FRM.

Grüße,
Jens
FHEM 6.1 - RPi 4 Raspbian 12 + PiTFT - OPi Zero Armbian 5.35
EnOcean - (W)LAN/Firmata: BMP180, TSL2561, SHT21, Heatronic 3, OBIS - WLAN/ESP8266: Gardena 1251, Zirkulationspumpe - RTL433: Oregon - Bluetooth - MQTT
Contributions: https://svn.fhem.de/trac/browser/trunk/fhem/contrib/jensb

ffdec

HMUARTLGW HMLAN Alarmanlage ZPumpe VCONTROL Viessmann 333-F MySensors CO2 Floorplan IT Raspberry 3 CC1101 Firmata Arduino nanoCUL868

Prof. Dr. Peter Henning

Dann würde ich aber bevorzugen

}elsif( $defs{$dev} && $defs{$dev}->{VERSION}  && $defs{$dev}->{VERSION} =~ m/CSM|CUNO|MapleCUN...(4|5|6|7|C|D|E|F)/ ){

LG

pah

ffdec

HMUARTLGW HMLAN Alarmanlage ZPumpe VCONTROL Viessmann 333-F MySensors CO2 Floorplan IT Raspberry 3 CC1101 Firmata Arduino nanoCUL868