FHEM Forum

FHEM => Anfängerfragen => Thema gestartet von: NeuFehm am 13 August 2014, 22:45:53

Titel: ECMD serielle Schnittstelle überwachen
Beitrag von: NeuFehm am 13 August 2014, 22:45:53
Rasp und fhem hängen per /ttyAMA0 an einem rs485-Bus.
Mit Hilfe von ECMD und ECMD-Device kann ich die Geräte steuern und erhalte auch entsprechende Rückmeldungen.
Nun sollen die Schalter im Bus fhem steuern, also ich möchte erreichen, dass die Events im Event-Monitor von fhem sichtbar werden.

Meiner Meinung nach benötige ich ein Prozess, der dauerhaft am Bus lauscht.
Habt Ihr Handlungsideen?

PS.: Ich habe keinerlei Funk-Kram ;)
Titel: Antw:ECMD serielle Schnittstelle überwachen
Beitrag von: NeuFehm am 14 August 2014, 07:48:58
Evtl. brauch ich auch einen Systemprozess, der aktiv nach fhem meldet, wenn auf der Schnittstelle die Post abgeht. ;)
Hat noch jemand einen Denkansatz?
Titel: Antw:ECMD serielle Schnittstelle überwachen
Beitrag von: Carsten am 14 August 2014, 15:34:09
Ich habs noch nicht ausprobiert, aber eigentlich lauscht das ECMD doch schon permanent am Bus.

Auszug aus der CommandRef:

reading <reading> match "<regex>"

Declares a new reading named <reading>. A spontaneous data transmission from the physical device that matches the Perl regular expression <regex> is evaluated to become the value of the named reading. All ECMDDevice devices belonging to the ECMD device with readings with matching regular expressions will receive an update of the said readings.

reading <reading> postproc { <perl special> }

Declares a postprocessor for the reading <reading>. The data received for the named reading is processed by the Perl code <perl command>. This works analogously to the postproc spec for set and get commands.


Ich glaub, das hat Boris Neubert Anfang des Jahres hinzugefügt.