(gelöst) ECMD: Empfang nur des ersten Zeichens

Begonnen von Niel, 02 Januar 2017, 16:57:06

Vorheriges Thema - Nächstes Thema

Niel

Edit: Problem gelöst. attr partial 3 hat geholfen.

Hallo!

Ich habe ein Opentherm-Gateway, welches auf die Anfrage "PS=1" alle Zustandsdaten der Heizung sendet. Hier die Antwort (Das "PS: 1" gehört zur Antwort):

ZitatPS: 1
00000011/00000100,45.00,00000011/00000011,100.00,0/0,22.00,0.00,1.300.00,67.00,49.00,3.00,62.00,70/40,90/20,47.00,90.00,0,0,0,0,17390,42730,2196,0

Mein ECMD empfängt aber immer nur das erste Zeichen, also das "P":

Log:
2017.01.02 17:07:18 5: Cmd: >get OT_Gateway OT P<
2017.01.02 17:07:18 5: ECMDDevice: Analyze command >{"PS=1".chr(13)}<
2017.01.02 17:07:18 5: OTGW: sending command "PS=1\r"
2017.01.02 17:07:18 5: OTGW: write "PS=1\r", expect PS: 1\r\n*.\r\n
2017.01.02 17:07:18 5: SW: 50533d310d
2017.01.02 17:07:18 5: OTGW: read "P"
2017.01.02 17:07:18 1: OTGW: unexpected answer "P" received (wrote "PS=1\r", expected PS: 1\r\n*.\r\n)
2017.01.02 17:07:18 5: OTGW: received answer "P"
2017.01.02 17:07:18 5: Triggering OT_Gateway (2 changes)
2017.01.02 17:07:18 5: Notify loop for OT_Gateway OT: P
2017.01.02 17:07:18 5: statistics Statistik_EHZ_PV: Notify.261 Notification of 'OT_Gateway' received. Device not monitored.
2017.01.02 17:07:18 5: statistics Statistik_EHZ_ZR: Notify.261 Notification of 'OT_Gateway' received. Device not monitored.
2017.01.02 17:07:18 4: name: /fhem?detail=OT_Gateway&dev.getOT_Gateway=OT_Gateway&cmd.getOT_Gateway=get&arg.getOT_Gateway=OT&val.getOT_Gateway=P&XHR=1&addLinks=1 / RL:26 / text/plain; charset=UTF-8 / Content-Encoding: gzip
/
2017.01.02 17:07:18 5: OTGW: read "S: 1\r\n000000"
2017.01.02 17:07:18 5: OTGW: Spontaneously received "S: 1\r\n000000"
2017.01.02 17:07:18 5: OTGW dispatch S: 1
000000
2017.01.02 17:07:18 5: OTGW: read "11/00000000,45.00,00000"
2017.01.02 17:07:18 5: OTGW: Spontaneously received "11/00000000,45.00,00000"
2017.01.02 17:07:18 5: OTGW dispatch 11/00000000,45.00,00000
2017.01.02 17:07:18 5: OTGW: read "01"
2017.01.02 17:07:18 5: OTGW: Spontaneously received "01"
2017.01.02 17:07:18 5: OTGW dispatch 01
2017.01.02 17:07:18 5: OTGW: read "1/"
2017.01.02 17:07:18 5: OTGW: Spontaneously received "1/"
2017.01.02 17:07:18 5: OTGW dispatch 1/
2017.01.02 17:07:18 5: OTGW: read "0"
2017.01.02 17:07:18 5: OTGW: Spontaneously received "0"
2017.01.02 17:07:18 5: OTGW dispatch 0
2017.01.02 17:07:18 5: OTGW: read "00"
2017.01.02 17:07:18 5: OTGW: Spontaneously received "00"
2017.01.02 17:07:18 5: OTGW dispatch 00
2017.01.02 17:07:18 5: OTGW: read "00"
2017.01.02 17:07:18 5: OTGW: Spontaneously received "00"
2017.01.02 17:07:18 5: OTGW dispatch 00
2017.01.02 17:07:18 5: OTGW: read "01"
2017.01.02 17:07:18 5: OTGW: Spontaneously received "01"
2017.01.02 17:07:18 5: OTGW dispatch 01
2017.01.02 17:07:18 5: OTGW: read "1,"
2017.01.02 17:07:18 5: OTGW: Spontaneously received "1,"
2017.01.02 17:07:18 5: OTGW dispatch 1,
2017.01.02 17:07:18 5: OTGW: read "10"
2017.01.02 17:07:18 5: OTGW: Spontaneously received "10"
2017.01.02 17:07:18 5: OTGW dispatch 10
2017.01.02 17:07:18 5: OTGW: read "0."
2017.01.02 17:07:18 5: OTGW: Spontaneously received "0."
2017.01.02 17:07:18 5: OTGW dispatch 0.
2017.01.02 17:07:18 5: OTGW: read "0"
2017.01.02 17:07:18 5: OTGW: Spontaneously received "0"
2017.01.02 17:07:18 5: OTGW dispatch 0
2017.01.02 17:07:18 5: OTGW: read "0,"
2017.01.02 17:07:18 5: OTGW: Spontaneously received "0,"
2017.01.02 17:07:18 5: OTGW dispatch 0,
2017.01.02 17:07:18 5: OTGW: read "0/"
2017.01.02 17:07:18 5: OTGW: Spontaneously received "0/"
2017.01.02 17:07:18 5: OTGW dispatch 0/
2017.01.02 17:07:18 4: parsing....

2017.01.02 17:07:18 5: OTGW: read "0,2"
2017.01.02 17:07:18 5: OTGW: Spontaneously received "0,2"
2017.01.02 17:07:18 5: OTGW dispatch 0,2
2017.01.02 17:07:18 4: parsing....

2017.01.02 17:07:18 5: OTGW: read "2."
2017.01.02 17:07:18 5: OTGW: Spontaneously received "2."
2017.01.02 17:07:18 5: OTGW dispatch 2.
2017.01.02 17:07:19 5: OTGW: read "00"
2017.01.02 17:07:19 5: OTGW: Spontaneously received "00"
2017.01.02 17:07:19 5: OTGW dispatch 00
2017.01.02 17:07:19 4: parsing....

2017.01.02 17:07:19 5: OTGW: read ",0."
2017.01.02 17:07:19 5: OTGW: Spontaneously received ",0."
2017.01.02 17:07:19 5: OTGW dispatch ,0.
2017.01.02 17:07:19 4: parsing....

2017.01.02 17:07:19 5: OTGW: read "00"
2017.01.02 17:07:19 5: OTGW: Spontaneously received "00"
2017.01.02 17:07:19 5: OTGW dispatch 00
2017.01.02 17:07:19 5: OTGW: read ","
2017.01.02 17:07:19 5: OTGW: Spontaneously received ","
2017.01.02 17:07:19 5: OTGW dispatch ,
2017.01.02 17:07:19 4: parsing....

2017.01.02 17:07:19 5: OTGW: read "1."
2017.01.02 17:07:19 5: OTGW: Spontaneously received "1."
2017.01.02 17:07:19 5: OTGW dispatch 1.
2017.01.02 17:07:19 4: parsing....

2017.01.02 17:07:19 5: OTGW: read "30,"
2017.01.02 17:07:19 5: OTGW: Spontaneously received "30,"
2017.01.02 17:07:19 5: OTGW dispatch 30,
2017.01.02 17:07:19 4: parsing....

2017.01.02 17:07:19 5: OTGW: read "0."
2017.01.02 17:07:19 5: OTGW: Spontaneously received "0."
2017.01.02 17:07:19 5: OTGW dispatch 0.
2017.01.02 17:07:19 5: OTGW: read "00"
2017.01.02 17:07:19 5: OTGW: Spontaneously received "00"
2017.01.02 17:07:19 5: OTGW dispatch 00
2017.01.02 17:07:19 4: parsing....

2017.01.02 17:07:19 5: OTGW: read ",38"
2017.01.02 17:07:19 5: OTGW: Spontaneously received ",38"
2017.01.02 17:07:19 5: OTGW dispatch ,38
2017.01.02 17:07:19 4: parsing....

2017.01.02 17:07:19 5: OTGW: read ".0"
2017.01.02 17:07:19 5: OTGW: Spontaneously received ".0"
2017.01.02 17:07:19 5: OTGW dispatch .0
2017.01.02 17:07:19 5: OTGW: read "0,"
2017.01.02 17:07:19 5: OTGW: Spontaneously received "0,"
2017.01.02 17:07:19 5: OTGW dispatch 0,
2017.01.02 17:07:19 4: parsing....

2017.01.02 17:07:19 5: OTGW: read "50"
2017.01.02 17:07:19 5: OTGW: Spontaneously received "50"
2017.01.02 17:07:19 5: OTGW dispatch 50
2017.01.02 17:07:19 5: OTGW: read ".00"
2017.01.02 17:07:19 5: OTGW: Spontaneously received ".00"
2017.01.02 17:07:19 5: OTGW dispatch .00
2017.01.02 17:07:19 4: parsing....

2017.01.02 17:07:19 5: OTGW: read ",2"
2017.01.02 17:07:19 5: OTGW: Spontaneously received ",2"
2017.01.02 17:07:19 5: OTGW dispatch ,2
2017.01.02 17:07:19 5: OTGW: read "."
2017.01.02 17:07:19 5: OTGW: Spontaneously received "."
2017.01.02 17:07:19 5: OTGW dispatch .
2017.01.02 17:07:19 4: parsing....

2017.01.02 17:07:19 5: OTGW: read "00,"
2017.01.02 17:07:19 5: OTGW: Spontaneously received "00,"
2017.01.02 17:07:19 5: OTGW dispatch 00,
2017.01.02 17:07:19 4: parsing....

2017.01.02 17:07:19 5: OTGW: read "36"
2017.01.02 17:07:19 5: OTGW: Spontaneously received "36"
2017.01.02 17:07:19 5: OTGW dispatch 36
2017.01.02 17:07:19 5: OTGW: read ".0"
2017.01.02 17:07:19 5: OTGW: Spontaneously received ".0"
2017.01.02 17:07:19 5: OTGW dispatch .0
2017.01.02 17:07:19 4: parsing....

2017.01.02 17:07:19 5: OTGW: read "0,7"
2017.01.02 17:07:19 5: OTGW: Spontaneously received "0,7"
2017.01.02 17:07:19 5: OTGW dispatch 0,7
2017.01.02 17:07:19 4: parsing....

2017.01.02 17:07:19 5: OTGW: read "0/"
2017.01.02 17:07:19 5: OTGW: Spontaneously received "0/"
2017.01.02 17:07:19 5: OTGW dispatch 0/
2017.01.02 17:07:19 5: OTGW: read "40"
2017.01.02 17:07:19 5: OTGW: Spontaneously received "40"
2017.01.02 17:07:19 5: OTGW dispatch 40
2017.01.02 17:07:19 4: parsing....

2017.01.02 17:07:19 5: OTGW: read ",90"
2017.01.02 17:07:19 5: OTGW: Spontaneously received ",90"
2017.01.02 17:07:19 5: OTGW dispatch ,90
2017.01.02 17:07:19 4: parsing....

2017.01.02 17:07:19 5: OTGW: read "/2"
2017.01.02 17:07:19 5: OTGW: Spontaneously received "/2"
2017.01.02 17:07:19 5: OTGW dispatch /2
2017.01.02 17:07:19 5: OTGW: read "0,"
2017.01.02 17:07:19 5: OTGW: Spontaneously received "0,"
2017.01.02 17:07:19 5: OTGW dispatch 0,
2017.01.02 17:07:19 4: parsing....

2017.01.02 17:07:19 5: OTGW: read "47."
2017.01.02 17:07:19 5: OTGW: Spontaneously received "47."
2017.01.02 17:07:19 5: OTGW dispatch 47.
2017.01.02 17:07:19 4: parsing....

2017.01.02 17:07:19 5: OTGW: read "00"
2017.01.02 17:07:19 5: OTGW: Spontaneously received "00"
2017.01.02 17:07:19 5: OTGW dispatch 00
2017.01.02 17:07:19 5: OTGW: read ","
2017.01.02 17:07:19 5: OTGW: Spontaneously received ","
2017.01.02 17:07:19 5: OTGW dispatch ,
2017.01.02 17:07:19 4: parsing....

2017.01.02 17:07:19 5: OTGW: read "90."
2017.01.02 17:07:19 5: OTGW: Spontaneously received "90."
2017.01.02 17:07:19 5: OTGW dispatch 90.
2017.01.02 17:07:19 4: parsing....

2017.01.02 17:07:19 5: OTGW: read "00"
2017.01.02 17:07:19 5: OTGW: Spontaneously received "00"
2017.01.02 17:07:19 5: OTGW dispatch 00
2017.01.02 17:07:19 5: OTGW: read ",0"
2017.01.02 17:07:19 5: OTGW: Spontaneously received ",0"
2017.01.02 17:07:19 5: OTGW dispatch ,0
2017.01.02 17:07:19 4: parsing....

2017.01.02 17:07:19 5: OTGW: read ",0,"
2017.01.02 17:07:19 5: OTGW: Spontaneously received ",0,"
2017.01.02 17:07:19 5: OTGW dispatch ,0,
2017.01.02 17:07:19 4: parsing....

2017.01.02 17:07:19 5: OTGW: read "0,"
2017.01.02 17:07:19 5: OTGW: Spontaneously received "0,"
2017.01.02 17:07:19 5: OTGW dispatch 0,
2017.01.02 17:07:19 5: OTGW: read "0,"
2017.01.02 17:07:19 5: OTGW: Spontaneously received "0,"
2017.01.02 17:07:19 5: OTGW dispatch 0,
2017.01.02 17:07:19 4: parsing....

2017.01.02 17:07:19 5: OTGW: read "173"
2017.01.02 17:07:19 5: OTGW: Spontaneously received "173"
2017.01.02 17:07:19 5: OTGW dispatch 173
2017.01.02 17:07:19 5: OTGW: read "90"
2017.01.02 17:07:19 5: OTGW: Spontaneously received "90"
2017.01.02 17:07:19 5: OTGW dispatch 90
2017.01.02 17:07:19 4: parsing....

2017.01.02 17:07:19 5: OTGW: read ",42"
2017.01.02 17:07:19 5: OTGW: Spontaneously received ",42"
2017.01.02 17:07:19 5: OTGW dispatch ,42
2017.01.02 17:07:19 4: parsing....

2017.01.02 17:07:19 5: OTGW: read "73"
2017.01.02 17:07:19 5: OTGW: Spontaneously received "73"
2017.01.02 17:07:19 5: OTGW dispatch 73
2017.01.02 17:07:19 5: OTGW: read "0,"
2017.01.02 17:07:19 5: OTGW: Spontaneously received "0,"
2017.01.02 17:07:19 5: OTGW dispatch 0,
2017.01.02 17:07:19 4: parsing....

2017.01.02 17:07:19 5: OTGW: read "21"
2017.01.02 17:07:19 5: OTGW: Spontaneously received "21"
2017.01.02 17:07:19 5: OTGW dispatch 21
2017.01.02 17:07:19 4: parsing....

2017.01.02 17:07:19 5: OTGW: read "96"
2017.01.02 17:07:19 5: OTGW: Spontaneously received "96"
2017.01.02 17:07:19 5: OTGW dispatch 96
2017.01.02 17:07:19 5: OTGW: read ",0"
2017.01.02 17:07:19 5: OTGW: Spontaneously received ",0"
2017.01.02 17:07:19 5: OTGW dispatch ,0
2017.01.02 17:07:19 4: parsing....

2017.01.02 17:07:19 5: OTGW: read "\r\n"
2017.01.02 17:07:19 5: OTGW: Spontaneously received "\r\n"
2017.01.02 17:07:19 5: OTGW dispatch


Hier das define:

define OTGW ECMD serial /dev/serial/by-id/usb-Silicon_Labs_CP2102_USB_to_UART_Bridge_Controller_2109-if00-port0@9600
attr OTGW classdefs OT.class=/opt/fhem/FHEM/otgw.classdef
attr OTGW logTraffic 5
define OT_Gateway ECMDDevice OT.class
attr OT_Gateway IODev OTGW
attr OT_Gateway verbose 5


und die otgw.class:

Zitatget OT cmd {"PS=1".chr(13)}
get OT expect "PS: 1\r\n*.\r\n"

Ich habe schon verschiedenste Formen des expect ausprobiert, alle brachten aber das gleiche Ergebnis.

Hat jemand einen Tipp oder kann mir einen Schubs in die richtige Richtung geben?

Danke und Gruß

Niel


franky08

Und was war es nun? Vlt. sucht ja ein anderer User auch mal nach diesem Fehler.

VG
Frank
Debian Bookworm auf HUNSN / Debian Bullseye auf 2.ter HUNSN F2F an 2x RaspiB
mit FHEM aktuell
22Zoll ViewSonic als Infodislay (WVC)
3xHMLAN mit vccu, raspmatic_rpi3, HMIP-HCU1