Fehler 00_tcm mit std. RS485 Adapter

Begonnen von Sturi2011, 01 April 2015, 12:02:29

Vorheriges Thema - Nächstes Thema

Sturi2011

Hallo,

ich habe jetzt gerade nach einem halben Jahr mal ein Update gefahren. Leider funktioniert der RS485 Stick nun nicht mehr.
Ein ähnliches Thema hatten wir schon mal vor ca. einem Jahr. Es handelt sich um einen einfachen RS485 USB Stick.

Ein Senden wird so geloogt:

2015.04.01 10:58:01 5: Cmd: >set FSR12_01_ch1 off<
2015.04.01 10:58:01 5: EnOcean FSR12_01_ch1 EnOcean_Set command: FSR12_01_ch1 BI
2015.04.01 10:58:01 3: EnOcean set FSR12_01_ch1 BI
2015.04.01 10:58:01 5: EnOcean FSR12_01_ch1 sent PacketType: 1 RORG: F6 DATA: 50 SenderID: AABBCC02 STATUS: 30 ODATA:
2015.04.01 10:58:01 5: TCM RS485Stick sending ESP2: A55A6B0550000000AABBCC023023
2015.04.01 10:58:01 5: SW: A55A6B0550000000AABBCC023023

Dabei stirbt fhem - perl läuft fhem reagiert nicht mehr...

Der Fehler der beim Neustart kommt ist:

2015.04.01 10:32:48 1: PERL WARNING: Use of uninitialized value $InBytes in numeric gt (>) at ./FHEM/00_TCM.pm line 554.
2015.04.01 10:47:49 1: PERL WARNING: Error in PurgeComm at ./FHEM/DevIo.pm line 371.
2015.04.01 10:47:49 1: PERL WARNING: Error in GetCommTimeouts at ./FHEM/DevIo.pm line 371.

Das Device ist so definiert:

define RS485Stick TCM ESP2 com1@9600
attr RS485Stick comType RS485
attr RS485Stick devStateIcon opened:cul@green initialized:cul@green *:cul@red
attr RS485Stick fp_Keller 415,195,0,
attr RS485Stick learningMode always
attr RS485Stick room System
attr RS485Stick sendInterval 100


Bitte mal einen Tip geben, was ich ändern muss.

Gruß Andreas

Sturi2011

Hi,

aufgefallen ist mir noch:

Das Device wird mit TYPE   TCM angezeigt.

Gruß Andreas

rudolfkoenig

Evtl. hilft "attr global stacktrace", um das Problem einzugrenzen.

Sturi2011

Hallo,

leider kommt dann auch nicht weirklich mehr...


2015.04.01 13:59:26 4: HTTP FHEMWEB:192.168.0.10:54781 GET /fhem?cmd.FSR12_01_ch1=set%20FSR12_01_ch1%20off&room=Schalter
2015.04.01 13:59:26 5: Cmd: >set FSR12_01_ch1 off<
2015.04.01 13:59:26 5: EnOcean FSR12_01_ch1 EnOcean_Set command: FSR12_01_ch1 BI
2015.04.01 13:59:26 3: EnOcean set FSR12_01_ch1 BI
2015.04.01 13:59:26 5: EnOcean FSR12_01_ch1 sent PacketType: 1 RORG: F6 DATA: 50 SenderID: AABBCC02 STATUS: 30 ODATA:
2015.04.01 13:59:26 5: TCM RS485Stick sending ESP2: A55A6B0550000000AABBCC023023
2015.04.01 13:59:26 5: SW: A55A6B0550000000AABBCC023023

dann wartet fhem auf irgendwas und reagiert nicht mehr...

Gruß Andreas

klaus.schauer

Welche 00_TCM Version war vor dem Update aktiv?

Sturi2011

Hallo,

es war:

# $Id: 00_TCM.pm 6559 2014-09-15 19:10:40Z klaus-schauer $

Gruß Andreas

klaus.schauer

Seit der Version 6559 wurden keine relevanten Änderungen an 00_TCM vorgenommen, siehe http://forum.fhem.de/index.php/topic,24480.msg175958.html#msg175958. Da müssen wir wohl woanders suchen. Ich habe aber leider im Augenblick keine Idee.

Sturi2011

Hallo,

stimmt soweit. Die neuen Enocen und TCM in der alten Installation funktionieren.
Ich habe jetzt mal versucht zu debuggen. Das Problem tritt in der DevIo.pm im SimpleWrite auf.
Er kommt bis zur Übergabe:
$hash->{USBDev}->write($msg)    if($hash->{USBDev});
Danach kommt nichts mehr...Die Übergaben sind die Selben.
Hat jemand irgendeine Idee?

Gruß Andreas

mediastudio

Hallo, ich habe nun auch ein auf Windows 7 installiertes System.
Habe auch folgende Fehlermeldungen:

Use of uninitialized value $InBytes in numeric gt (>) at ./FHEM/00_TCM.pm line 553.
Error in PurgeComm at FHEM/DevIo.pm line 362.
Unzulõssige Funktion.
Error in GetCommTimeouts at FHEM/DevIo.pm line 362.
Use of uninitialized value $temp in scalar chomp at ./FHEM/73_PRESENCE.pm line 574.
Use of uninitialized value $temp in string ne at ./FHEM/73_PRESENCE.pm line 575.
Use of uninitialized value $InBytes in numeric gt (>) at ./FHEM/00_TCM.pm line 553.
Use of uninitialized value $InBytes in numeric gt (>) at ./FHEM/00_TCM.pm line 553.
Use of uninitialized value $InBytes in numeric gt (>) at ./FHEM/00_TCM.pm line 553.
Use of uninitialized value $InBytes in numeric gt (>) at ./FHEM/00_TCM.pm line 553.
Use of uninitialized value $InBytes in numeric gt (>) at ./FHEM/00_TCM.pm line 553.
Use of uninitialized value $InBytes in numeric gt (>) at ./FHEM/00_TCM.pm line 553.
Use of uninitialized value $InBytes in numeric gt (>) at ./FHEM/00_TCM.pm line 553.
Use of uninitialized value $InBytes in numeric gt (>) at ./FHEM/00_TCM.pm line 553.
Error in PurgeComm at FHEM/DevIo.pm line 362.
Use of uninitialized value $InBytes in numeric gt (>) at ./FHEM/00_TCM.pm line 553.
Das Handle ist ung³ltig.
Error in GetCommTimeouts at FHEM/DevIo.pm line 362.
Error Closing handle 428 for \\.\com3
Das Handle ist ung³ltig.
Error closing Read Event handle 432 for \\.\com3
Das Handle ist ung³ltig.
Use of uninitialized value $temp in scalar chomp at ./FHEM/73_PRESENCE.pm line 574.
Use of uninitialized value $temp in string ne at ./FHEM/73_PRESENCE.pm line 575.
Use of uninitialized value $InBytes in numeric gt (>) at ./FHEM/00_TCM.pm line 553.
Use of uninitialized value $InBytes in numeric gt (>) at ./FHEM/00_TCM.pm line 553.

##############################################
# $Id: 00_TCM.pm 6559 2014-09-15 19:10:40Z klaus-schauer $

549 # This is relevant for windows/USB only
550   my $po = $hash->{USBDev};
551   return undef if(!$po);
552   my ($BlockingFlags, $InBytes, $OutBytes, $ErrorFlags) = $po->status;
553   return ($InBytes>0);

Im Geräte-Manager: USB Serial Port (COM3) wird angezeigt

Ausgabe in FHEM:
BaseID
00000000
DEF   
120 com3@9600
DeviceName
com3@9600
LastID
00000000
MODEL
ESP2
NAME
BscBor
NOTIFYDEV
global
NR
69
NTFY_ORDER
50-BscBor
PARTIAL
A55A8B89456E4F6365616E0D0AC4A55A8B8954434D313230200D0AC2A55A8B8956657273696F6E0D0A11A55A8B89342E302E302E300D0A79A55A8B8942647261
STATE
initialized
TYPE
TCM

woran könnte das liegen?

Sturi2011

Hi,

um das Ganze zum Abschluss zu bringen- es lag bei mir an Strawberry in Verbindung mit Win32::Serialport. Eine Umstellung auf Cygwin Perl und Device::Serialport brachte den gewünschten Effekt. Zu beachten ist, das Device::Serialport mit /dev/ttyS0 anstelle von com1 anzusprechen ist.

Es liegt auch definitiv nicht wie angenommen am TCM oder ENOCEAN Modul sondern ist auf eine Änderung in devIO zurückzuführen.

Gruß Andreas