Unterschied zwischen scheinbar Gleichem finden

Begonnen von NeuFehm, 22 Dezember 2015, 21:59:48

Vorheriges Thema - Nächstes Thema

NeuFehm

Hey Leute, hab mal ne ganz schwere Aufgabe.

ich versuche mich gerade an Readings.

Der Aufbau
Fhem mit EMCD an einen RS485-BUS, ebenfalls ein RELAIS und ein Schalter

Das Phenomen
Wenn ich mit FHEM direkt das Relais schalte, dann erkennt FHEM die Antwort.
Wenn der Schalter das Relais schaltet, dann erkennt FHEM die Antwort nicht,
obwohl sie lt. Logfile die Gleiche ist.

WOW, wie geht das denn?

Hier das logfile:
# FHEM Schalter schickt per classdef an Relais Schaltbefehl,
# Relais antwortet mit !M(E\005\001\001\r\n
2015.12.22 21:41:11 5: mylampe: Spontaneously received "!M"
2015.12.22 21:41:11 5: mylampe dispatch !M
2015.12.22 21:41:11 5: mylampe: Spontaneously received "(E\005\001\001\r\n"
2015.12.22 21:41:11 5: mylampe dispatch (E

# classdef reading: reading on match "!M\(E\005\001\001\r\n" matched!
2015.12.22 21:41:11 5: mylampe: match regex !M\(E\005\001\001\r\n for reading on of device Testlicht3 with class mylampedevice

# Schalter schickt Schaltbefehl an Relais,
# Relais antwortet mit !M(E\005\001\001\r\n (wie oben)
2015.12.22 21:42:37 5: mylampe: Spontaneously received "!M"
2015.12.22 21:42:37 5: mylampe dispatch !M
2015.12.22 21:42:37 5: mylampe: Spontaneously received "(E\005\001\001\r\n"
2015.12.22 21:42:37 5: mylampe dispatch (E

# classdef reading: reading on match "!M\(E\005\001\001\r\n" matched NICHT!

Gibt es vlt. aus welchem Grund irgendwelche unterschiedlichen Signalwege?
Wird das Signal erst verarbeitet und dann interprediert und bei FHEM
erst interprediert und dann verarbeitet?
Irgendwo müssen unterschiedliche Signal-Verarbeitungen hinterlegt sein.
Seltsam ja auch, dass er im log in der einen Zeile schreibt: \005\001\001 und
schon eine Zeile weiter  (am besten diese komplette Zeile hier in einen Editor kopieren, dann sieht man die unsichtbaren Zeichen "00 05" "00 01" "00 01"
habe sie mal am Ende des Textes als * skizziert)
Das brachte mich auf die Idee der unterschiedlichen Signal-/Interpredationswege.
Habe aber keine Ahnung, was hier falsch läuft. Kann jemand helfen?

*
__    __   __
|00| |00| |00|
|05| |01| |01|
....   ....    ....
Raspberry Pi B+
RS 485 Schnittstellen: DIGITUS DA-70157, LINKSPTITE RS485/GPIO Shield for Raspberry Pi
RS485 Geräte: Ultraschallsensor für Zisternenfüllstand (Eigenbau), 4x8 Relais-M-Mastermodule (Eigenbau), 6 T-Module (Schalter und 3 analoge Eingänge) (Eigenbau)
sonstige Hardware: 2 Relay Modul

Dr. Boris Neubert

Bitte define nebst aller Attribute aus der Konfiguration und classdef hier posten.
Danke
Boris
Globaler Moderator, Developer, aktives Mitglied des FHEM e.V. (Marketing, Verwaltung)
Bitte keine unaufgeforderten privaten Nachrichten!

NeuFehm

die DEFINE:
------------------------------
# Lampe definieren
define mylampe ECMD serial /dev/ttyUSB0@9600
attr mylampe classdefs mylampedevice=/opt/fhem/lampe.classdef
attr mylampe partial 1
attr mylampe verbose 5
deleteattr mylampe requestSeparator


define Testlicht ECMDDevice mylampedevice 40 1 5
attr Testlicht IODev mylampe
attr Testlicht room Test

define Testlicht2 ECMDDevice mylampedevice 40 2 1
attr Testlicht2 IODev mylampe
attr Testlicht2 room Test

define Testlicht3 ECMDDevice mylampedevice 40 3 1
attr Testlicht3 IODev mylampe
attr Testlicht3 room Test

------------------
und die classdef
------------------
params M_Adresse M_Relais M_Schalttyp
set off cmd {chr(35).chr(77).chr(%M_Adresse).chr(69).chr(%M_Schalttyp).chr(%M_Relais).chr(0).chr(13).chr(10)}
set on cmd {chr(35).chr(77).chr(%M_Adresse).chr(69).chr(%M_Schalttyp).chr(%M_Relais).chr(1).chr(13).chr(10)}
reading on match "!M\(E\005\001\001\r\n"
reading off match "!M\(E\005\001\000\r\n"
reading on postproc {fhem "setstate Testlicht3 on"}
reading off postproc {fhem "setstate Testlicht3 off"}


Raspberry Pi B+
RS 485 Schnittstellen: DIGITUS DA-70157, LINKSPTITE RS485/GPIO Shield for Raspberry Pi
RS485 Geräte: Ultraschallsensor für Zisternenfüllstand (Eigenbau), 4x8 Relais-M-Mastermodule (Eigenbau), 6 T-Module (Schalter und 3 analoge Eingänge) (Eigenbau)
sonstige Hardware: 2 Relay Modul

Dr. Boris Neubert

Hallo,

in 67_ECMDDevice ist ab Zeile 317 die Routine ECMDDevice_Parse(). Darin findet Du eine Reihe von Debug-Befehlen, die alle mit # auskommentiert sind. Erstelle eine Sicherungskopie der Datei und entferne dann in dieser Routine die # vor allen Debug-Befehlen. Bitte mit

reload 67_ECMDDevice.pm

neu laden und dann die Situation aus dem Eröffnungspost nachstellen und den relevanten Teil des Logs wieder hier posten. Bitte den Code im Post in code-Tags einbinden (das #-Zeichen über der Editor-Box, in der Du Deine Antwort schreibst).

Grüße
Boris
Globaler Moderator, Developer, aktives Mitglied des FHEM e.V. (Marketing, Verwaltung)
Bitte keine unaufgeforderten privaten Nachrichten!

NeuFehm

#4
Hier der Inhalt des Logs wenn ich:

1. Teil den physischen Schalter "on" schalte
und
2. Teil den FHEM-Schalter "on" schalte

# physischer Schalter "on"
(Hier sendet der Schalter ein "#M(E\005\001\001\r\n" an das Relais, welches mit "!M(E\005\001\001\r\n" antwortet)

2016.01.02 12:27:43 5: mylampe: Spontaneously received "#M"
2016.01.02 12:27:43 5: mylampe dispatch #M
2016.01.02 12:27:43 1: DEBUG>mylampe: partial message "#M(E\005\001\001\r\n!M(E\005\001\001\r\n#M(E\005\001\001\r\n!M(E\005\001\000\r\n" recorded at 1451734063.59866
2016.01.02 12:27:43 1: DEBUG>mylampe: partial message expired.
2016.01.02 12:27:43 1: DEBUG>mylampe: analyzing "#M".
2016.01.02 12:27:43 1: DEBUG>mylampe: trying to find a match for "#M"
2016.01.02 12:27:43 1: DEBUG>  Checking device Testlicht3 with class mylampedevice...
2016.01.02 12:27:43 1: DEBUG>   Trying to find a match in class mylampedevice...
2016.01.02 12:27:43 1: DEBUG>      Trying to match reading on with regular expression "!M\(E\005\001\001\r\n" (device Testlicht3, classdef mylampedevice, reading on).
2016.01.02 12:27:43 1: DEBUG>      Trying to match reading off with regular expression "M\(E\005\001\000\r\n" (device Testlicht3, classdef mylampedevice, reading off).
2016.01.02 12:27:43 1: DEBUG>  Checking device Testlicht2 with class mylampedevice...
2016.01.02 12:27:43 1: DEBUG>   Trying to find a match in class mylampedevice...
2016.01.02 12:27:43 1: DEBUG>      Trying to match reading on with regular expression "!M\(E\005\001\001\r\n" (device Testlicht2, classdef mylampedevice, reading on).
2016.01.02 12:27:43 1: DEBUG>      Trying to match reading off with regular expression "M\(E\005\001\000\r\n" (device Testlicht2, classdef mylampedevice, reading off).
2016.01.02 12:27:43 1: DEBUG>  Checking device Testlicht with class mylampedevice...
2016.01.02 12:27:43 1: DEBUG>   Trying to find a match in class mylampedevice...
2016.01.02 12:27:43 1: DEBUG>      Trying to match reading on with regular expression "!M\(E\005\001\001\r\n" (device Testlicht, classdef mylampedevice, reading on).
2016.01.02 12:27:43 1: DEBUG>      Trying to match reading off with regular expression "M\(E\005\001\000\r\n" (device Testlicht, classdef mylampedevice, reading off).
2016.01.02 12:27:43 1: DEBUG>mylampe: partial message "#M" kept.
2016.01.02 12:27:43 5: mylampe: Spontaneously received "(E\005\001\001\r\n"
2016.01.02 12:27:43 5: mylampe dispatch (E

2016.01.02 12:27:43 1: DEBUG>mylampe: partial message "#M" recorded at 1451734063.63408
2016.01.02 12:27:43 1: DEBUG>mylampe: analyzing "#M(E\005\001\001\r\n".
2016.01.02 12:27:43 1: DEBUG>mylampe: trying to find a match for "#M(E\005\001\001\r\n"
2016.01.02 12:27:43 1: DEBUG>  Checking device Testlicht3 with class mylampedevice...
2016.01.02 12:27:43 1: DEBUG>   Trying to find a match in class mylampedevice...
2016.01.02 12:27:43 1: DEBUG>      Trying to match reading on with regular expression "!M\(E\005\001\001\r\n" (device Testlicht3, classdef mylampedevice, reading on).
2016.01.02 12:27:43 1: DEBUG>      Trying to match reading off with regular expression "M\(E\005\001\000\r\n" (device Testlicht3, classdef mylampedevice, reading off).
2016.01.02 12:27:43 1: DEBUG>  Checking device Testlicht2 with class mylampedevice...
2016.01.02 12:27:43 1: DEBUG>   Trying to find a match in class mylampedevice...
2016.01.02 12:27:43 1: DEBUG>      Trying to match reading on with regular expression "!M\(E\005\001\001\r\n" (device Testlicht2, classdef mylampedevice, reading on).
2016.01.02 12:27:43 1: DEBUG>      Trying to match reading off with regular expression "M\(E\005\001\000\r\n" (device Testlicht2, classdef mylampedevice, reading off).
2016.01.02 12:27:43 1: DEBUG>  Checking device Testlicht with class mylampedevice...
2016.01.02 12:27:43 1: DEBUG>   Trying to find a match in class mylampedevice...
2016.01.02 12:27:43 1: DEBUG>      Trying to match reading on with regular expression "!M\(E\005\001\001\r\n" (device Testlicht, classdef mylampedevice, reading on).
2016.01.02 12:27:43 1: DEBUG>      Trying to match reading off with regular expression "M\(E\005\001\000\r\n" (device Testlicht, classdef mylampedevice, reading off).
2016.01.02 12:27:43 1: DEBUG>mylampe: partial message "#M(E\005\001\001\r\n" kept.
2016.01.02 12:27:43 5: mylampe: Spontaneously received "!M"
2016.01.02 12:27:43 5: mylampe dispatch !M
2016.01.02 12:27:43 1: DEBUG>mylampe: partial message "#M(E\005\001\001\r\n" recorded at 1451734063.67144
2016.01.02 12:27:43 1: DEBUG>mylampe: analyzing "#M(E\005\001\001\r\n!M".
2016.01.02 12:27:43 1: DEBUG>mylampe: trying to find a match for "#M(E\005\001\001\r\n!M"
2016.01.02 12:27:43 1: DEBUG>  Checking device Testlicht3 with class mylampedevice...
2016.01.02 12:27:43 1: DEBUG>   Trying to find a match in class mylampedevice...
2016.01.02 12:27:43 1: DEBUG>      Trying to match reading on with regular expression "!M\(E\005\001\001\r\n" (device Testlicht3, classdef mylampedevice, reading on).
2016.01.02 12:27:43 1: DEBUG>      Trying to match reading off with regular expression "M\(E\005\001\000\r\n" (device Testlicht3, classdef mylampedevice, reading off).
2016.01.02 12:27:43 1: DEBUG>  Checking device Testlicht2 with class mylampedevice...
2016.01.02 12:27:43 1: DEBUG>   Trying to find a match in class mylampedevice...
2016.01.02 12:27:43 1: DEBUG>      Trying to match reading on with regular expression "!M\(E\005\001\001\r\n" (device Testlicht2, classdef mylampedevice, reading on).
2016.01.02 12:27:43 1: DEBUG>      Trying to match reading off with regular expression "M\(E\005\001\000\r\n" (device Testlicht2, classdef mylampedevice, reading off).
2016.01.02 12:27:43 1: DEBUG>  Checking device Testlicht with class mylampedevice...
2016.01.02 12:27:43 1: DEBUG>   Trying to find a match in class mylampedevice...
2016.01.02 12:27:43 1: DEBUG>      Trying to match reading on with regular expression "!M\(E\005\001\001\r\n" (device Testlicht, classdef mylampedevice, reading on).
2016.01.02 12:27:43 1: DEBUG>      Trying to match reading off with regular expression "M\(E\005\001\000\r\n" (device Testlicht, classdef mylampedevice, reading off).
2016.01.02 12:27:43 1: DEBUG>mylampe: partial message "#M(E\005\001\001\r\n!M" kept.
2016.01.02 12:27:43 5: mylampe: Spontaneously received "(E\005\001\001\r\n"
2016.01.02 12:27:43 5: mylampe dispatch (E

2016.01.02 12:27:43 1: DEBUG>mylampe: partial message "#M(E\005\001\001\r\n!M" recorded at 1451734063.7069
2016.01.02 12:27:43 1: DEBUG>mylampe: analyzing "#M(E\005\001\001\r\n!M(E\005\001\001\r\n".
2016.01.02 12:27:43 1: DEBUG>mylampe: trying to find a match for "#M(E\005\001\001\r\n!M(E\005\001\001\r\n"
2016.01.02 12:27:43 1: DEBUG>  Checking device Testlicht3 with class mylampedevice...
2016.01.02 12:27:43 1: DEBUG>   Trying to find a match in class mylampedevice...
2016.01.02 12:27:43 1: DEBUG>      Trying to match reading on with regular expression "!M\(E\005\001\001\r\n" (device Testlicht3, classdef mylampedevice, reading on).
2016.01.02 12:27:43 1: DEBUG>      Trying to match reading off with regular expression "M\(E\005\001\000\r\n" (device Testlicht3, classdef mylampedevice, reading off).
2016.01.02 12:27:43 1: DEBUG>  Checking device Testlicht2 with class mylampedevice...
2016.01.02 12:27:43 1: DEBUG>   Trying to find a match in class mylampedevice...
2016.01.02 12:27:43 1: DEBUG>      Trying to match reading on with regular expression "!M\(E\005\001\001\r\n" (device Testlicht2, classdef mylampedevice, reading on).
2016.01.02 12:27:43 1: DEBUG>      Trying to match reading off with regular expression "M\(E\005\001\000\r\n" (device Testlicht2, classdef mylampedevice, reading off).
2016.01.02 12:27:43 1: DEBUG>  Checking device Testlicht with class mylampedevice...
2016.01.02 12:27:43 1: DEBUG>   Trying to find a match in class mylampedevice...
2016.01.02 12:27:43 1: DEBUG>      Trying to match reading on with regular expression "!M\(E\005\001\001\r\n" (device Testlicht, classdef mylampedevice, reading on).
2016.01.02 12:27:43 1: DEBUG>      Trying to match reading off with regular expression "M\(E\005\001\000\r\n" (device Testlicht, classdef mylampedevice, reading off).
2016.01.02 12:27:43 1: DEBUG>mylampe: partial message "#M(E\005\001\001\r\n!M(E\005\001\001\r\n" kept.


# FHEM Schalter "Testlicht" an

2016.01.02 12:28:42 5: mylampe: sending command "#M(E\005\001\001\r\n"
2016.01.02 12:28:42 5: SW: 234d28450501010d0a
2016.01.02 12:28:42 5: mylampe: Spontaneously received "!"
2016.01.02 12:28:42 5: mylampe dispatch !
2016.01.02 12:28:42 1: DEBUG>mylampe: partial message "#M(E\005\001\001\r\n!M(E\005\001\000\r\n" recorded at 1451734122.25774
2016.01.02 12:28:42 1: DEBUG>mylampe: partial message expired.
2016.01.02 12:28:42 1: DEBUG>mylampe: analyzing "!".
2016.01.02 12:28:42 1: DEBUG>mylampe: trying to find a match for "!"
2016.01.02 12:28:42 1: DEBUG>  Checking device Testlicht3 with class mylampedevice...
2016.01.02 12:28:42 1: DEBUG>   Trying to find a match in class mylampedevice...
2016.01.02 12:28:42 1: DEBUG>      Trying to match reading on with regular expression "!M\(E\005\001\001\r\n" (device Testlicht3, classdef mylampedevice, reading on).
2016.01.02 12:28:42 1: DEBUG>      Trying to match reading off with regular expression "M\(E\005\001\000\r\n" (device Testlicht3, classdef mylampedevice, reading off).
2016.01.02 12:28:42 1: DEBUG>  Checking device Testlicht2 with class mylampedevice...
2016.01.02 12:28:42 1: DEBUG>   Trying to find a match in class mylampedevice...
2016.01.02 12:28:42 1: DEBUG>      Trying to match reading on with regular expression "!M\(E\005\001\001\r\n" (device Testlicht2, classdef mylampedevice, reading on).
2016.01.02 12:28:42 1: DEBUG>      Trying to match reading off with regular expression "M\(E\005\001\000\r\n" (device Testlicht2, classdef mylampedevice, reading off).
2016.01.02 12:28:42 1: DEBUG>  Checking device Testlicht with class mylampedevice...
2016.01.02 12:28:42 1: DEBUG>   Trying to find a match in class mylampedevice...
2016.01.02 12:28:42 1: DEBUG>      Trying to match reading on with regular expression "!M\(E\005\001\001\r\n" (device Testlicht, classdef mylampedevice, reading on).
2016.01.02 12:28:42 1: DEBUG>      Trying to match reading off with regular expression "M\(E\005\001\000\r\n" (device Testlicht, classdef mylampedevice, reading off).
2016.01.02 12:28:42 1: DEBUG>mylampe: partial message "!" kept.
2016.01.02 12:28:42 5: mylampe: Spontaneously received "M(E\005\001\001\r\n"
2016.01.02 12:28:42 5: mylampe dispatch M(E

2016.01.02 12:28:42 1: DEBUG>mylampe: partial message "!" recorded at 1451734122.29402
2016.01.02 12:28:42 1: DEBUG>mylampe: analyzing "!M(E\005\001\001\r\n".
2016.01.02 12:28:42 1: DEBUG>mylampe: trying to find a match for "!M(E\005\001\001\r\n"
2016.01.02 12:28:42 1: DEBUG>  Checking device Testlicht3 with class mylampedevice...
2016.01.02 12:28:42 1: DEBUG>   Trying to find a match in class mylampedevice...
2016.01.02 12:28:42 1: DEBUG>      Trying to match reading on with regular expression "!M\(E\005\001\001\r\n" (device Testlicht3, classdef mylampedevice, reading on).
2016.01.02 12:28:42 5: mylampe: match regex !M\(E\005\001\001\r\n for reading on of device Testlicht3 with class mylampedevice
2016.01.02 12:28:42 1: DEBUG>      Trying to match reading off with regular expression "M\(E\005\001\000\r\n" (device Testlicht3, classdef mylampedevice, reading off).
2016.01.02 12:28:42 1: DEBUG>  Checking device Testlicht2 with class mylampedevice...
2016.01.02 12:28:42 1: DEBUG>   Trying to find a match in class mylampedevice...
2016.01.02 12:28:42 1: DEBUG>      Trying to match reading on with regular expression "!M\(E\005\001\001\r\n" (device Testlicht2, classdef mylampedevice, reading on).
2016.01.02 12:28:42 5: mylampe: match regex !M\(E\005\001\001\r\n for reading on of device Testlicht2 with class mylampedevice
2016.01.02 12:28:42 1: DEBUG>      Trying to match reading off with regular expression "M\(E\005\001\000\r\n" (device Testlicht2, classdef mylampedevice, reading off).
2016.01.02 12:28:42 1: DEBUG>  Checking device Testlicht with class mylampedevice...
2016.01.02 12:28:42 1: DEBUG>   Trying to find a match in class mylampedevice...
2016.01.02 12:28:42 1: DEBUG>      Trying to match reading on with regular expression "!M\(E\005\001\001\r\n" (device Testlicht, classdef mylampedevice, reading on).
2016.01.02 12:28:42 5: mylampe: match regex !M\(E\005\001\001\r\n for reading on of device Testlicht with class mylampedevice
2016.01.02 12:28:42 1: DEBUG>      Trying to match reading off with regular expression "M\(E\005\001\000\r\n" (device Testlicht, classdef mylampedevice, reading off).


Übrigens steht im Linux-Log statt beispielsweise
2016.01.02 12:28:42 5: mylampe dispatch M(E

das so:
2016.01.02 12:28:42 5: mylampe dispatch M(E^E^A^A^M


Weiß nicht ob das relvant ist....

Ich habe das Gefühl, das der Schalter "mehr" sendet als Fhem. Werde also in die Richtung nochmal forschen.
Raspberry Pi B+
RS 485 Schnittstellen: DIGITUS DA-70157, LINKSPTITE RS485/GPIO Shield for Raspberry Pi
RS485 Geräte: Ultraschallsensor für Zisternenfüllstand (Eigenbau), 4x8 Relais-M-Mastermodule (Eigenbau), 6 T-Module (Schalter und 3 analoge Eingänge) (Eigenbau)
sonstige Hardware: 2 Relay Modul

Dr. Boris Neubert

Hallo,

Problem erkannt!

FHEM empfängt "#..." vom Schalter. Weil das Datagramm nicht gematcht wird, wird es zwischengespeichert, weil es der erste Teil eines längeren Datagramms sein könnte (partial). Wenn dann die Antwort von der Lampe eintrifft, wird versucht, die Konkatenation der beiden Datagramme zu matchen. Das führt zu nichts.

Bitte erweitere die Classdef so, dass auch die Datagramme vom Schalter gematcht werden. Dadurch gelangen sie nicht in den partial-Puffer.

Damit sollte es klappen.

Viele Grüße
Boris
Globaler Moderator, Developer, aktives Mitglied des FHEM e.V. (Marketing, Verwaltung)
Bitte keine unaufgeforderten privaten Nachrichten!

NeuFehm

Okey... Das klingt hoffnungsvoll ;)
Wird "partial" irgendwann verworfen? (ist das die Zeitangabe in der definition: "attr mylampe partial 1" also 1 Sekunde behalten, wenn nicht gematched?)
Raspberry Pi B+
RS 485 Schnittstellen: DIGITUS DA-70157, LINKSPTITE RS485/GPIO Shield for Raspberry Pi
RS485 Geräte: Ultraschallsensor für Zisternenfüllstand (Eigenbau), 4x8 Relais-M-Mastermodule (Eigenbau), 6 T-Module (Schalter und 3 analoge Eingänge) (Eigenbau)
sonstige Hardware: 2 Relay Modul

Dr. Boris Neubert

Globaler Moderator, Developer, aktives Mitglied des FHEM e.V. (Marketing, Verwaltung)
Bitte keine unaufgeforderten privaten Nachrichten!

NeuFehm

Ich habe meine classdef gändert:

reading on_go match "\#M\(E\001\001\001\r\n"
reading on_done match "!M\(E\001\001\001\r\n"
reading off_go match "\#M\(E\001\001\000\r\n"
reading off_done match "!M\(E\001\001\000\r\n"


wenn ich dann ein "#M(E\001\001\001\r\n" sende, erhalte ich im log:

2016.01.02 17:11:18 5: mylampe: Spontaneously received "#"
2016.01.02 17:11:18 5: mylampe dispatch #
2016.01.02 17:11:18 1: DEBUG>mylampe: partial message "" recorded at 1451751078.76543
2016.01.02 17:11:18 1: DEBUG>mylampe: analyzing "#".
2016.01.02 17:11:18 1: DEBUG>mylampe: trying to find a match for "#"
2016.01.02 17:11:18 1: DEBUG>  Checking device Testlicht3 with class mylampedevice...
2016.01.02 17:11:18 1: DEBUG>   Trying to find a match in class mylampedevice...
2016.01.02 17:11:18 1: DEBUG>      Trying to match reading on with regular expression "" (device Testlicht3, classdef mylampedevice, reading on).
2016.01.02 17:11:18 1: DEBUG>      Trying to match reading off_go with regular expression "reading off_done match "!M\(E\001\001\000\r\n" (device Testlicht3, classdef mylampedevice, reading off_go).
2016.01.02 17:11:18 1: DEBUG>      Trying to match reading on_go with regular expression "reading on_done match "!M\(E\001\001\001\r\n" (device Testlicht3, classdef mylampedevice, reading on_go).
2016.01.02 17:11:18 1: DEBUG>      Trying to match reading off with regular expression "" (device Testlicht3, classdef mylampedevice, reading off).
2016.01.02 17:11:18 1: DEBUG>  Checking device Testlicht2 with class mylampedevice...
2016.01.02 17:11:18 1: DEBUG>   Trying to find a match in class mylampedevice...
2016.01.02 17:11:18 1: DEBUG>      Trying to match reading on with regular expression "" (device Testlicht2, classdef mylampedevice, reading on).
2016.01.02 17:11:18 1: DEBUG>      Trying to match reading off_go with regular expression "reading off_done match "!M\(E\001\001\000\r\n" (device Testlicht2, classdef mylampedevice, reading off_go).
2016.01.02 17:11:18 1: DEBUG>      Trying to match reading on_go with regular expression "reading on_done match "!M\(E\001\001\001\r\n" (device Testlicht2, classdef mylampedevice, reading on_go).
2016.01.02 17:11:18 1: DEBUG>      Trying to match reading off with regular expression "" (device Testlicht2, classdef mylampedevice, reading off).
2016.01.02 17:11:18 1: DEBUG>  Checking device Testlicht with class mylampedevice...
2016.01.02 17:11:18 1: DEBUG>   Trying to find a match in class mylampedevice...
2016.01.02 17:11:18 1: DEBUG>      Trying to match reading on with regular expression "" (device Testlicht, classdef mylampedevice, reading on).
2016.01.02 17:11:18 1: DEBUG>      Trying to match reading off_go with regular expression "reading off_done match "!M\(E\001\001\000\r\n" (device Testlicht, classdef mylampedevice, reading off_go).
2016.01.02 17:11:18 1: DEBUG>      Trying to match reading on_go with regular expression "reading on_done match "!M\(E\001\001\001\r\n" (device Testlicht, classdef mylampedevice, reading on_go).
2016.01.02 17:11:18 1: DEBUG>      Trying to match reading off with regular expression "" (device Testlicht, classdef mylampedevice, reading off).
2016.01.02 17:11:18 1: DEBUG>mylampe: partial message "#" kept.
2016.01.02 17:11:18 5: mylampe: Spontaneously received "M(E\001\001\001\r\n!M(E\001\001\001\r\n"
2016.01.02 17:11:18 5: mylampe dispatch M(E^A^A^A^M
!M(E^A^A^A^M

2016.01.02 17:11:18 1: DEBUG>mylampe: partial message "#" recorded at 1451751078.82344
2016.01.02 17:11:18 1: DEBUG>mylampe: analyzing "#M(E\001\001\001\r\n!M(E\001\001\001\r\n".
2016.01.02 17:11:18 1: DEBUG>mylampe: trying to find a match for "#M(E\001\001\001\r\n!M(E\001\001\001\r\n"
2016.01.02 17:11:18 1: DEBUG>  Checking device Testlicht3 with class mylampedevice...
2016.01.02 17:11:18 1: DEBUG>   Trying to find a match in class mylampedevice...
2016.01.02 17:11:18 1: DEBUG>      Trying to match reading on with regular expression "" (device Testlicht3, classdef mylampedevice, reading on).
2016.01.02 17:11:18 1: DEBUG>      Trying to match reading off_go with regular expression "reading off_done match "!M\(E\001\001\000\r\n" (device Testlicht3, classdef mylampedevice, reading off_go).
2016.01.02 17:11:18 1: DEBUG>      Trying to match reading on_go with regular expression "reading on_done match "!M\(E\001\001\001\r\n" (device Testlicht3, classdef mylampedevice, reading on_go).
2016.01.02 17:11:18 1: DEBUG>      Trying to match reading off with regular expression "" (device Testlicht3, classdef mylampedevice, reading off).
2016.01.02 17:11:18 1: DEBUG>  Checking device Testlicht2 with class mylampedevice...
2016.01.02 17:11:18 1: DEBUG>   Trying to find a match in class mylampedevice...
2016.01.02 17:11:18 1: DEBUG>      Trying to match reading on with regular expression "" (device Testlicht2, classdef mylampedevice, reading on).
2016.01.02 17:11:18 1: DEBUG>      Trying to match reading off_go with regular expression "reading off_done match "!M\(E\001\001\000\r\n" (device Testlicht2, classdef mylampedevice, reading off_go).
2016.01.02 17:11:18 1: DEBUG>      Trying to match reading on_go with regular expression "reading on_done match "!M\(E\001\001\001\r\n" (device Testlicht2, classdef mylampedevice, reading on_go).
2016.01.02 17:11:18 1: DEBUG>      Trying to match reading off with regular expression "" (device Testlicht2, classdef mylampedevice, reading off).
2016.01.02 17:11:18 1: DEBUG>  Checking device Testlicht with class mylampedevice...
2016.01.02 17:11:18 1: DEBUG>   Trying to find a match in class mylampedevice...
2016.01.02 17:11:18 1: DEBUG>      Trying to match reading on with regular expression "" (device Testlicht, classdef mylampedevice, reading on).
2016.01.02 17:11:18 1: DEBUG>      Trying to match reading off_go with regular expression "reading off_done match "!M\(E\001\001\000\r\n" (device Testlicht, classdef mylampedevice, reading off_go).
2016.01.02 17:11:18 1: DEBUG>      Trying to match reading on_go with regular expression "reading on_done match "!M\(E\001\001\001\r\n" (device Testlicht, classdef mylampedevice, reading on_go).
2016.01.02 17:11:18 1: DEBUG>      Trying to match reading off with regular expression "" (device Testlicht, classdef mylampedevice, reading off).
2016.01.02 17:11:18 1: DEBUG>mylampe: partial message "#M(E\001\001\001\r\n!M(E\001\001\001\r\n" kept.


Warum sind die Regex-Parts, die mit # beginnen wie "auskommentiert":
2016.01.02 17:11:18 1: DEBUG>      Trying to match reading off with regular expression "" (device Testlicht, classdef mylampedevice, reading off).

Und nicht wie bei der Antwort:
2016.01.02 17:11:18 1: DEBUG>      Trying to match reading on_go with regular expression "reading on_done match "!M\(E\001\001\001\r\n" (device Testlicht, classdef mylampedevice, reading on_go).

Vlt. ist das das Problem?
Raspberry Pi B+
RS 485 Schnittstellen: DIGITUS DA-70157, LINKSPTITE RS485/GPIO Shield for Raspberry Pi
RS485 Geräte: Ultraschallsensor für Zisternenfüllstand (Eigenbau), 4x8 Relais-M-Mastermodule (Eigenbau), 6 T-Module (Schalter und 3 analoge Eingänge) (Eigenbau)
sonstige Hardware: 2 Relay Modul

Dr. Boris Neubert

Das nächste Problem ist, dass der Rest vom ersten Datagramm und das zweite Datagramm zusammen geklebt sind.

Daher benutzt Du bitte das Attribut split und berücksichtigst beim Match, dass das Ergebnis den Separator, den Du bei split angegeben hast, nicht mehr enthält.

Du kannst als Separator wohl \r\n benutzen.

Das Protokoll macht das alles gut nachvollziehbar.

Grüße
Boris
Globaler Moderator, Developer, aktives Mitglied des FHEM e.V. (Marketing, Verwaltung)
Bitte keine unaufgeforderten privaten Nachrichten!

NeuFehm

#10
ich schau mal nach "split"
Raspberry Pi B+
RS 485 Schnittstellen: DIGITUS DA-70157, LINKSPTITE RS485/GPIO Shield for Raspberry Pi
RS485 Geräte: Ultraschallsensor für Zisternenfüllstand (Eigenbau), 4x8 Relais-M-Mastermodule (Eigenbau), 6 T-Module (Schalter und 3 analoge Eingänge) (Eigenbau)
sonstige Hardware: 2 Relay Modul

Dr. Boris Neubert

Globaler Moderator, Developer, aktives Mitglied des FHEM e.V. (Marketing, Verwaltung)
Bitte keine unaufgeforderten privaten Nachrichten!

NeuFehm

Relevanter Auszug aus der fhem.cfg:

define mylampe ECMD serial /dev/ttyUSB0@9600
attr mylampe classdefs mylampedevice=/opt/fhem/lampe.classdef
attr mylampe partial 1
attr mylampe verbose 5
deleteattr mylampe requestSeparator
attr mylampe split \r\n


Und hier das logfile.
2016.01.02 19:38:57 5: mylampe: Spontaneously received "#"
2016.01.02 19:38:57 5: mylampe dispatch #
2016.01.02 19:38:57 1: DEBUG>mylampe: partial message "" recorded at 1451759937.42597
2016.01.02 19:38:57 1: DEBUG>mylampe: analyzing "#".
2016.01.02 19:38:57 1: DEBUG>mylampe: trying to find a match for "#"
2016.01.02 19:38:57 1: DEBUG>  Checking device Testlicht3 with class mylampedevice...
2016.01.02 19:38:57 1: DEBUG>   Trying to find a match in class mylampedevice...
2016.01.02 19:38:57 1: DEBUG>      Trying to match reading on with regular expression "" (device Testlicht3, classdef mylampedevice, reading on).
2016.01.02 19:38:57 1: DEBUG>      Trying to match reading off_go with regular expression "reading off_done match "!M\(E\001\001\000\r\n" (device Testlicht3, classdef mylampedevice, reading off_go).
2016.01.02 19:38:57 1: DEBUG>      Trying to match reading on_go with regular expression "reading on_done match "!M\(E\001\001\001\r\n" (device Testlicht3, classdef mylampedevice, reading on_go).
2016.01.02 19:38:57 1: DEBUG>      Trying to match reading off with regular expression "" (device Testlicht3, classdef mylampedevice, reading off).
2016.01.02 19:38:57 1: DEBUG>  Checking device Testlicht2 with class mylampedevice...
2016.01.02 19:38:57 1: DEBUG>   Trying to find a match in class mylampedevice...
2016.01.02 19:38:57 1: DEBUG>      Trying to match reading on with regular expression "" (device Testlicht2, classdef mylampedevice, reading on).
2016.01.02 19:38:57 1: DEBUG>      Trying to match reading off_go with regular expression "reading off_done match "!M\(E\001\001\000\r\n" (device Testlicht2, classdef mylampedevice, reading off_go).
2016.01.02 19:38:57 1: DEBUG>      Trying to match reading on_go with regular expression "reading on_done match "!M\(E\001\001\001\r\n" (device Testlicht2, classdef mylampedevice, reading on_go).
2016.01.02 19:38:57 1: DEBUG>      Trying to match reading off with regular expression "" (device Testlicht2, classdef mylampedevice, reading off).
2016.01.02 19:38:57 1: DEBUG>  Checking device Testlicht with class mylampedevice...
2016.01.02 19:38:57 1: DEBUG>   Trying to find a match in class mylampedevice...
2016.01.02 19:38:57 1: DEBUG>      Trying to match reading on with regular expression "" (device Testlicht, classdef mylampedevice, reading on).
2016.01.02 19:38:57 1: DEBUG>      Trying to match reading off_go with regular expression "reading off_done match "!M\(E\001\001\000\r\n" (device Testlicht, classdef mylampedevice, reading off_go).
2016.01.02 19:38:57 1: DEBUG>      Trying to match reading on_go with regular expression "reading on_done match "!M\(E\001\001\001\r\n" (device Testlicht, classdef mylampedevice, reading on_go).
2016.01.02 19:38:57 1: DEBUG>      Trying to match reading off with regular expression "" (device Testlicht, classdef mylampedevice, reading off).
2016.01.02 19:38:57 1: DEBUG>mylampe: partial message "#" kept.
2016.01.02 19:38:57 5: mylampe: Spontaneously received "M(E\001\001\001\r\n!M(E\001\001\001\r\n"
2016.01.02 19:38:57 5: mylampe dispatch M(E
!M(E

2016.01.02 19:38:57 1: DEBUG>mylampe: partial message "#" recorded at 1451759937.48461
2016.01.02 19:38:57 1: DEBUG>mylampe: analyzing "#M(E\001\001\001\r\n!M(E\001\001\001\r\n".
2016.01.02 19:38:57 1: DEBUG>mylampe: trying to find a match for "#M(E\001\001\001"
2016.01.02 19:38:57 1: DEBUG>  Checking device Testlicht3 with class mylampedevice...
2016.01.02 19:38:57 1: DEBUG>   Trying to find a match in class mylampedevice...
2016.01.02 19:38:57 1: DEBUG>      Trying to match reading on with regular expression "" (device Testlicht3, classdef mylampedevice, reading on).
2016.01.02 19:38:57 1: DEBUG>      Trying to match reading off_go with regular expression "reading off_done match "!M\(E\001\001\000\r\n" (device Testlicht3, classdef mylampedevice, reading off_go).
2016.01.02 19:38:57 1: DEBUG>      Trying to match reading on_go with regular expression "reading on_done match "!M\(E\001\001\001\r\n" (device Testlicht3, classdef mylampedevice, reading on_go).
2016.01.02 19:38:57 1: DEBUG>      Trying to match reading off with regular expression "" (device Testlicht3, classdef mylampedevice, reading off).
2016.01.02 19:38:57 1: DEBUG>  Checking device Testlicht2 with class mylampedevice...
2016.01.02 19:38:57 1: DEBUG>   Trying to find a match in class mylampedevice...
2016.01.02 19:38:57 1: DEBUG>      Trying to match reading on with regular expression "" (device Testlicht2, classdef mylampedevice, reading on).
2016.01.02 19:38:57 1: DEBUG>      Trying to match reading off_go with regular expression "reading off_done match "!M\(E\001\001\000\r\n" (device Testlicht2, classdef mylampedevice, reading off_go).
2016.01.02 19:38:57 1: DEBUG>      Trying to match reading on_go with regular expression "reading on_done match "!M\(E\001\001\001\r\n" (device Testlicht2, classdef mylampedevice, reading on_go).
2016.01.02 19:38:57 1: DEBUG>      Trying to match reading off with regular expression "" (device Testlicht2, classdef mylampedevice, reading off).
2016.01.02 19:38:57 1: DEBUG>  Checking device Testlicht with class mylampedevice...
2016.01.02 19:38:57 1: DEBUG>   Trying to find a match in class mylampedevice...
2016.01.02 19:38:57 1: DEBUG>      Trying to match reading on with regular expression "" (device Testlicht, classdef mylampedevice, reading on).
2016.01.02 19:38:57 1: DEBUG>      Trying to match reading off_go with regular expression "reading off_done match "!M\(E\001\001\000\r\n" (device Testlicht, classdef mylampedevice, reading off_go).
2016.01.02 19:38:57 1: DEBUG>      Trying to match reading on_go with regular expression "reading on_done match "!M\(E\001\001\001\r\n" (device Testlicht, classdef mylampedevice, reading on_go).
2016.01.02 19:38:57 1: DEBUG>      Trying to match reading off with regular expression "" (device Testlicht, classdef mylampedevice, reading off).
2016.01.02 19:38:57 1: DEBUG>mylampe: trying to find a match for "!M(E\001\001\001"
2016.01.02 19:38:57 1: DEBUG>  Checking device Testlicht3 with class mylampedevice...
2016.01.02 19:38:57 1: DEBUG>   Trying to find a match in class mylampedevice...
2016.01.02 19:38:57 1: DEBUG>      Trying to match reading on with regular expression "" (device Testlicht3, classdef mylampedevice, reading on).
2016.01.02 19:38:57 1: DEBUG>      Trying to match reading off_go with regular expression "reading off_done match "!M\(E\001\001\000\r\n" (device Testlicht3, classdef mylampedevice, reading off_go).
2016.01.02 19:38:57 1: DEBUG>      Trying to match reading on_go with regular expression "reading on_done match "!M\(E\001\001\001\r\n" (device Testlicht3, classdef mylampedevice, reading on_go).
2016.01.02 19:38:57 1: DEBUG>      Trying to match reading off with regular expression "" (device Testlicht3, classdef mylampedevice, reading off).
2016.01.02 19:38:57 1: DEBUG>  Checking device Testlicht2 with class mylampedevice...
2016.01.02 19:38:57 1: DEBUG>   Trying to find a match in class mylampedevice...
2016.01.02 19:38:57 1: DEBUG>      Trying to match reading on with regular expression "" (device Testlicht2, classdef mylampedevice, reading on).
2016.01.02 19:38:57 1: DEBUG>      Trying to match reading off_go with regular expression "reading off_done match "!M\(E\001\001\000\r\n" (device Testlicht2, classdef mylampedevice, reading off_go).
2016.01.02 19:38:57 1: DEBUG>      Trying to match reading on_go with regular expression "reading on_done match "!M\(E\001\001\001\r\n" (device Testlicht2, classdef mylampedevice, reading on_go).
2016.01.02 19:38:57 1: DEBUG>      Trying to match reading off with regular expression "" (device Testlicht2, classdef mylampedevice, reading off).
2016.01.02 19:38:57 1: DEBUG>  Checking device Testlicht with class mylampedevice...
2016.01.02 19:38:57 1: DEBUG>   Trying to find a match in class mylampedevice...
2016.01.02 19:38:57 1: DEBUG>      Trying to match reading on with regular expression "" (device Testlicht, classdef mylampedevice, reading on).
2016.01.02 19:38:57 1: DEBUG>      Trying to match reading off_go with regular expression "reading off_done match "!M\(E\001\001\000\r\n" (device Testlicht, classdef mylampedevice, reading off_go).
2016.01.02 19:38:57 1: DEBUG>      Trying to match reading on_go with regular expression "reading on_done match "!M\(E\001\001\001\r\n" (device Testlicht, classdef mylampedevice, reading on_go).
2016.01.02 19:38:57 1: DEBUG>      Trying to match reading off with regular expression "" (device Testlicht, classdef mylampedevice, reading off).
2016.01.02 19:38:57 1: DEBUG>mylampe: partial message "!M(E\001\001\001" kept.


Habe das Gefühl, dass er wenigstens schon mal trennt und mehr Prüfungen durchführt.
Allerdings ist "with regular expression """ immer noch leer...

Danke für Deine Hilfe!
Raspberry Pi B+
RS 485 Schnittstellen: DIGITUS DA-70157, LINKSPTITE RS485/GPIO Shield for Raspberry Pi
RS485 Geräte: Ultraschallsensor für Zisternenfüllstand (Eigenbau), 4x8 Relais-M-Mastermodule (Eigenbau), 6 T-Module (Schalter und 3 analoge Eingänge) (Eigenbau)
sonstige Hardware: 2 Relay Modul

NeuFehm

Ach und dann müsste ich die regex kürzen....!?
Raspberry Pi B+
RS 485 Schnittstellen: DIGITUS DA-70157, LINKSPTITE RS485/GPIO Shield for Raspberry Pi
RS485 Geräte: Ultraschallsensor für Zisternenfüllstand (Eigenbau), 4x8 Relais-M-Mastermodule (Eigenbau), 6 T-Module (Schalter und 3 analoge Eingänge) (Eigenbau)
sonstige Hardware: 2 Relay Modul

NeuFehm

Wenn ich "attr mylampe partial 1" auskommentiere, erhalte ich:

2016.01.02 20:09:00 5: mylampe: Spontaneously received "#"
2016.01.02 20:09:00 5: mylampe dispatch #
2016.01.02 20:09:00 1: DEBUG>mylampe: analyzing "#".
2016.01.02 20:09:00 1: DEBUG>mylampe: trying to find a match for "#"
2016.01.02 20:09:00 1: DEBUG>  Checking device Testlicht3 with class mylampedevice...
2016.01.02 20:09:00 1: DEBUG>   Trying to find a match in class mylampedevice...
2016.01.02 20:09:00 1: DEBUG>      Trying to match reading on with regular expression "" (device Testlicht3, classdef mylampedevice, reading on).
2016.01.02 20:09:00 1: DEBUG>      Trying to match reading off_go with regular expression "reading off_done match "!M\(E\001\001\000" (device Testlicht3, classdef mylampedevice, reading off_go).
2016.01.02 20:09:00 1: DEBUG>      Trying to match reading on_go with regular expression "reading on_done match "!M\(E\001\001\001" (device Testlicht3, classdef mylampedevice, reading on_go).
2016.01.02 20:09:00 1: DEBUG>      Trying to match reading off with regular expression "" (device Testlicht3, classdef mylampedevice, reading off).
2016.01.02 20:09:00 1: DEBUG>  Checking device Testlicht2 with class mylampedevice...
2016.01.02 20:09:00 1: DEBUG>   Trying to find a match in class mylampedevice...
2016.01.02 20:09:00 1: DEBUG>      Trying to match reading on with regular expression "" (device Testlicht2, classdef mylampedevice, reading on).
2016.01.02 20:09:00 1: DEBUG>      Trying to match reading off_go with regular expression "reading off_done match "!M\(E\001\001\000" (device Testlicht2, classdef mylampedevice, reading off_go).
2016.01.02 20:09:00 1: DEBUG>      Trying to match reading on_go with regular expression "reading on_done match "!M\(E\001\001\001" (device Testlicht2, classdef mylampedevice, reading on_go).
2016.01.02 20:09:00 1: DEBUG>      Trying to match reading off with regular expression "" (device Testlicht2, classdef mylampedevice, reading off).
2016.01.02 20:09:00 1: DEBUG>  Checking device Testlicht with class mylampedevice...
2016.01.02 20:09:00 1: DEBUG>   Trying to find a match in class mylampedevice...
2016.01.02 20:09:00 1: DEBUG>      Trying to match reading on with regular expression "" (device Testlicht, classdef mylampedevice, reading on).
2016.01.02 20:09:00 1: DEBUG>      Trying to match reading off_go with regular expression "reading off_done match "!M\(E\001\001\000" (device Testlicht, classdef mylampedevice, reading off_go).
2016.01.02 20:09:00 1: DEBUG>      Trying to match reading on_go with regular expression "reading on_done match "!M\(E\001\001\001" (device Testlicht, classdef mylampedevice, reading on_go).
2016.01.02 20:09:00 1: DEBUG>      Trying to match reading off with regular expression "" (device Testlicht, classdef mylampedevice, reading off).
2016.01.02 20:09:00 5: mylampe: Spontaneously received "M(E\001\001\001\r\n"
2016.01.02 20:09:00 5: mylampe dispatch M(E

2016.01.02 20:09:00 1: DEBUG>mylampe: analyzing "M(E\001\001\001\r\n".
2016.01.02 20:09:00 1: DEBUG>mylampe: trying to find a match for "M(E\001\001\001"
2016.01.02 20:09:00 1: DEBUG>  Checking device Testlicht3 with class mylampedevice...
2016.01.02 20:09:00 1: DEBUG>   Trying to find a match in class mylampedevice...
2016.01.02 20:09:00 1: DEBUG>      Trying to match reading on with regular expression "" (device Testlicht3, classdef mylampedevice, reading on).
2016.01.02 20:09:00 1: DEBUG>      Trying to match reading off_go with regular expression "reading off_done match "!M\(E\001\001\000" (device Testlicht3, classdef mylampedevice, reading off_go).
2016.01.02 20:09:00 1: DEBUG>      Trying to match reading on_go with regular expression "reading on_done match "!M\(E\001\001\001" (device Testlicht3, classdef mylampedevice, reading on_go).
2016.01.02 20:09:00 1: DEBUG>      Trying to match reading off with regular expression "" (device Testlicht3, classdef mylampedevice, reading off).
2016.01.02 20:09:00 1: DEBUG>  Checking device Testlicht2 with class mylampedevice...
2016.01.02 20:09:00 1: DEBUG>   Trying to find a match in class mylampedevice...
2016.01.02 20:09:00 1: DEBUG>      Trying to match reading on with regular expression "" (device Testlicht2, classdef mylampedevice, reading on).
2016.01.02 20:09:00 1: DEBUG>      Trying to match reading off_go with regular expression "reading off_done match "!M\(E\001\001\000" (device Testlicht2, classdef mylampedevice, reading off_go).
2016.01.02 20:09:00 1: DEBUG>      Trying to match reading on_go with regular expression "reading on_done match "!M\(E\001\001\001" (device Testlicht2, classdef mylampedevice, reading on_go).
2016.01.02 20:09:00 1: DEBUG>      Trying to match reading off with regular expression "" (device Testlicht2, classdef mylampedevice, reading off).
2016.01.02 20:09:00 1: DEBUG>  Checking device Testlicht with class mylampedevice...
2016.01.02 20:09:00 1: DEBUG>   Trying to find a match in class mylampedevice...
2016.01.02 20:09:00 1: DEBUG>      Trying to match reading on with regular expression "" (device Testlicht, classdef mylampedevice, reading on).
2016.01.02 20:09:00 1: DEBUG>      Trying to match reading off_go with regular expression "reading off_done match "!M\(E\001\001\000" (device Testlicht, classdef mylampedevice, reading off_go).
2016.01.02 20:09:00 1: DEBUG>      Trying to match reading on_go with regular expression "reading on_done match "!M\(E\001\001\001" (device Testlicht, classdef mylampedevice, reading on_go).
2016.01.02 20:09:00 1: DEBUG>      Trying to match reading off with regular expression "" (device Testlicht, classdef mylampedevice, reading off).
2016.01.02 20:09:00 5: mylampe: Spontaneously received "!M(E\001\001\001\r\n"
2016.01.02 20:09:00 5: mylampe dispatch !M(E

2016.01.02 20:09:00 1: DEBUG>mylampe: analyzing "!M(E\001\001\001\r\n".
2016.01.02 20:09:00 1: DEBUG>mylampe: trying to find a match for "!M(E\001\001\001"
2016.01.02 20:09:00 1: DEBUG>  Checking device Testlicht3 with class mylampedevice...
2016.01.02 20:09:00 1: DEBUG>   Trying to find a match in class mylampedevice...
2016.01.02 20:09:00 1: DEBUG>      Trying to match reading on with regular expression "" (device Testlicht3, classdef mylampedevice, reading on).
2016.01.02 20:09:00 1: DEBUG>      Trying to match reading off_go with regular expression "reading off_done match "!M\(E\001\001\000" (device Testlicht3, classdef mylampedevice, reading off_go).
2016.01.02 20:09:00 1: DEBUG>      Trying to match reading on_go with regular expression "reading on_done match "!M\(E\001\001\001" (device Testlicht3, classdef mylampedevice, reading on_go).
2016.01.02 20:09:00 1: DEBUG>      Trying to match reading off with regular expression "" (device Testlicht3, classdef mylampedevice, reading off).
2016.01.02 20:09:00 1: DEBUG>  Checking device Testlicht2 with class mylampedevice...
2016.01.02 20:09:00 1: DEBUG>   Trying to find a match in class mylampedevice...
2016.01.02 20:09:00 1: DEBUG>      Trying to match reading on with regular expression "" (device Testlicht2, classdef mylampedevice, reading on).
2016.01.02 20:09:00 1: DEBUG>      Trying to match reading off_go with regular expression "reading off_done match "!M\(E\001\001\000" (device Testlicht2, classdef mylampedevice, reading off_go).
2016.01.02 20:09:00 1: DEBUG>      Trying to match reading on_go with regular expression "reading on_done match "!M\(E\001\001\001" (device Testlicht2, classdef mylampedevice, reading on_go).
2016.01.02 20:09:00 1: DEBUG>      Trying to match reading off with regular expression "" (device Testlicht2, classdef mylampedevice, reading off).
2016.01.02 20:09:00 1: DEBUG>  Checking device Testlicht with class mylampedevice...
2016.01.02 20:09:00 1: DEBUG>   Trying to find a match in class mylampedevice...
2016.01.02 20:09:00 1: DEBUG>      Trying to match reading on with regular expression "" (device Testlicht, classdef mylampedevice, reading on).
2016.01.02 20:09:00 1: DEBUG>      Trying to match reading off_go with regular expression "reading off_done match "!M\(E\001\001\000" (device Testlicht, classdef mylampedevice, reading off_go).
2016.01.02 20:09:00 1: DEBUG>      Trying to match reading on_go with regular expression "reading on_done match "!M\(E\001\001\001" (device Testlicht, classdef mylampedevice, reading on_go).
2016.01.02 20:09:00 1: DEBUG>      Trying to match reading off with regular expression "" (device Testlicht, classdef mylampedevice, reading off).


Sieht so aus, als wenn das "#" noch irgend eine "magische" Funktion in FHEM hat.
Raspberry Pi B+
RS 485 Schnittstellen: DIGITUS DA-70157, LINKSPTITE RS485/GPIO Shield for Raspberry Pi
RS485 Geräte: Ultraschallsensor für Zisternenfüllstand (Eigenbau), 4x8 Relais-M-Mastermodule (Eigenbau), 6 T-Module (Schalter und 3 analoge Eingänge) (Eigenbau)
sonstige Hardware: 2 Relay Modul