ECMD AVR Netio Ethersex geht nach update nicht mehr

Begonnen von Maxl, 18 September 2018, 21:31:47

Vorheriges Thema - Nächstes Thema

Maxl

Hallo,

seit ich FHEM auf eine neuere Version upgedated habe läuft das AVR NETIO nicht mehr richtig.
Die Analogports können noch gelesen werden jedoch kann man keine IOs mehr schalten.
Was hat sich bei den Modulen geändert, wie bringe ich sie wieder zum laufen.

verwendete files
# $Id: 66_ECMD.pm 16372 2018-03-10 13:09:24Z
# $Id: 67_ECMDDevice.pm 12877 2016-12-26 09:15:55Z

Initialisierung
#################### AVRNET IO 1 ######################
define NETIO1 ECMD telnet 192.168.1.98:2701
attr NETIO1 classdefs ONEWIRE=/opt/fhem/onewire.classdef:RELAIS=/opt/fhem/relais.classdef:RFM12=/opt/fhem/intertechno.classdef:ADC=/opt/fhem/netioadc.classdef
attr NETIO1 eventMap /on:Activ/off:Inactiv/
attr NETIO1 icon hm-cc-rt-dn
attr NETIO1 logTraffic 5
attr NETIO1 room Interfaces
#attr NETIO1 requestSeparator �

define Relais1 ECMDDevice RELAIS 01
attr Relais1 IODev NETIO1
define Relais2 ECMDDevice RELAIS 02
attr Relais2 IODev NETIO1
define Relais3 ECMDDevice RELAIS 04
attr Relais3 IODev NETIO1
define Relais4 ECMDDevice RELAIS 08
attr Relais4 IODev NETIO1


relais.classdef wie im Beispiel
# Uebergabeparameter HEX Adresse Port
params RelaisPort
# erst alle Ports PC.. auf Ausgang setzen und dann per Hexcode schalten
set on cmd {"io set ddr 2 ff\n\000io set port 2 %RelaisPort %RelaisPort\n"}
set on expect "OK\n"
set on postproc {s/([OK\n|;]*)/success/; "$_" eq "success" ? "ok" : "error";}
set off cmd {"io set ddr 2 ff\n\000io set port 2 00 %RelaisPort\n"}
set off expect "OK\n"
set off postproc {s/([OK\n|;]*)/success/; "$_" eq "success" ? "ok" : "error";}


Logfileauszug
2018.09.18 21:12:32.475 5: Cmd: >define NETIO1 ECMD telnet 192.168.1.98:2701<
2018.09.18 21:12:32.475 5: Loading ./FHEM/66_ECMD.pm
2018.09.18 21:12:32.536 3: Opening NETIO1 device 192.168.1.98:2701
2018.09.18 21:12:32.549 3: NETIO1 device opened
2018.09.18 21:12:32.550 5: Cmd: >attr NETIO1 classdefs ONEWIRE=/opt/fhem/onewire.classdef:RELAIS=/opt/fhem/relais.classdef:RFM12=/opt/fhem/intertechno.classdef:ADC=/opt/fhem/netioadc.classdef<
2018.09.18 21:12:32.551 5: NETIO1: adding new class ONEWIRE from file /opt/fhem/onewire.classdef
2018.09.18 21:12:32.551 5: NETIO1: evaluating >params devID<
2018.09.18 21:12:32.552 5: NETIO1: parameters are devID
2018.09.18 21:12:32.552 5: NETIO1: evaluating >set messen cmd {"1w convert\n"}<
2018.09.18 21:12:32.552 5: NETIO1: set messen command defined as {"1w convert\n"}
2018.09.18 21:12:32.553 5: NETIO1: evaluating >set messen expect "OK\n"<
2018.09.18 21:12:32.553 5: NETIO1: set messen expects OK\n
2018.09.18 21:12:32.553 5: NETIO1: evaluating >get temp cmd {"1w get %devID\n"}<
2018.09.18 21:12:32.553 5: NETIO1: get temp command defined as {"1w get %devID\n"}
2018.09.18 21:12:32.554 5: NETIO1: evaluating >get temp expect "\d+.\d\n"<
2018.09.18 21:12:32.554 5: NETIO1: get temp expects \d+.\d\n
2018.09.18 21:12:32.554 5: NETIO1: adding new class RELAIS from file /opt/fhem/relais.classdef
2018.09.18 21:12:32.555 5: NETIO1: evaluating >params RelaisPort<
2018.09.18 21:12:32.555 5: NETIO1: parameters are RelaisPort
2018.09.18 21:12:32.555 5: NETIO1: evaluating >set on cmd {"io set ddr 2 ff\n\000io set port 2 %RelaisPort %RelaisPort\n"}<
2018.09.18 21:12:32.556 5: NETIO1: set on command defined as {"io set ddr 2 ff\n\000io set port 2 %RelaisPort %RelaisPort\n"}
2018.09.18 21:12:32.556 5: NETIO1: evaluating >set on expect "OK\n"<
2018.09.18 21:12:32.556 5: NETIO1: set on expects OK\n
2018.09.18 21:12:32.556 5: NETIO1: evaluating >set on postproc {s/([OK\n|;]*)/success/; "$_" eq "success" ? "ok" : "error";}<
2018.09.18 21:12:32.557 5: NETIO1: set on postprocessor defined as {s/([OK\n|;]*)/success/; "$_" eq "success" ? "ok" : "error";}
2018.09.18 21:12:32.557 5: NETIO1: evaluating >set off cmd {"io set ddr 2 ff\n\000io set port 2 00 %RelaisPort\n"}<
2018.09.18 21:12:32.557 5: NETIO1: set off command defined as {"io set ddr 2 ff\n\000io set port 2 00 %RelaisPort\n"}
2018.09.18 21:12:32.557 5: NETIO1: evaluating >set off expect "OK\n"<
2018.09.18 21:12:32.558 5: NETIO1: set off expects OK\n
2018.09.18 21:12:32.558 5: NETIO1: evaluating >set off postproc {s/([OK\n|;]*)/success/; "$_" eq "success" ? "ok" : "error";}<
2018.09.18 21:12:32.559 5: NETIO1: set off postprocessor defined as {s/([OK\n|;]*)/success/; "$_" eq "success" ? "ok" : "error";}
2018.09.18 21:12:32.560 5: NETIO1: adding new class RFM12 from file /opt/fhem/intertechno.classdef
2018.09.18 21:12:32.560 5: NETIO1: evaluating >params it_fam it_group it_dev<
2018.09.18 21:12:32.560 5: NETIO1: parameters are it_fam it_group it_dev
2018.09.18 21:12:32.560 5: NETIO1: evaluating >set on cmd {"rfm12 intertechno %it_fam %it_group %it_dev 1\n"}<
2018.09.18 21:12:32.561 5: NETIO1: set on command defined as {"rfm12 intertechno %it_fam %it_group %it_dev 1\n"}
2018.09.18 21:12:32.561 5: NETIO1: evaluating >set on expect "OK\n"<
2018.09.18 21:12:32.561 5: NETIO1: set on expects OK\n
2018.09.18 21:12:32.562 5: NETIO1: evaluating >set off cmd {"rfm12 intertechno %it_fam %it_group %it_dev 0\n"}<
2018.09.18 21:12:32.562 5: NETIO1: set off command defined as {"rfm12 intertechno %it_fam %it_group %it_dev 0\n"}
2018.09.18 21:12:32.562 5: NETIO1: evaluating >set off expect "OK\n"<
2018.09.18 21:12:32.563 5: NETIO1: set off expects OK\n
2018.09.18 21:12:32.563 5: NETIO1: adding new class ADC from file /opt/fhem/netioadc.classdef
2018.09.18 21:12:32.564 5: NETIO1: evaluating >params PortID<
2018.09.18 21:12:32.564 5: NETIO1: parameters are PortID
2018.09.18 21:12:32.564 5: NETIO1: evaluating >get value cmd {"adc get %PortID\n"}<
2018.09.18 21:12:32.564 5: NETIO1: get value command defined as {"adc get %PortID\n"}
2018.09.18 21:12:32.565 5: NETIO1: evaluating >get value expect ".*"<
2018.09.18 21:12:32.565 5: NETIO1: get value expects .*
2018.09.18 21:12:32.566 5: NETIO1: evaluating >get value postproc { my $hexval = hex(trim("$_")); my $refval = trim(AttrVal("%NAME","referenz",1024)); my $retval = $hexval*100/$refval; my $hash  = $defs{%NAME}; my $status = "off"; my $schwellwert = trim(AttrVal("%NAME","schwellwert",30));  $status = "on" if ($retval < $schwellwert);  readingsSingleUpdate($hash, "status", $status, 1);  $retval;}<
2018.09.18 21:12:32.566 5: NETIO1: get value postprocessor defined as { my $hexval = hex(trim("$_")); my $refval = trim(AttrVal("%NAME","referenz",1024)); my $retval = $hexval*100/$refval; my $hash  = $defs{%NAME}; my $status = "off"; my $schwellwert = trim(AttrVal("%NAME","schwellwert",30));  $status = "on" if ($retval < $schwellwert);  readingsSingleUpdate($hash, "status", $status, 1);  $retval;}
2018.09.18 21:12:32.567 5: NETIO1: evaluating >get portvalue cmd {"adc get %PortID\n"}<
2018.09.18 21:12:32.567 5: NETIO1: get portvalue command defined as {"adc get %PortID\n"}
2018.09.18 21:12:32.567 5: NETIO1: evaluating >get portvalue expect ".*"<
2018.09.18 21:12:32.567 5: NETIO1: get portvalue expects .*
2018.09.18 21:12:32.568 5: NETIO1: evaluating >get portvalue postproc {hex(trim("$_"))}<
2018.09.18 21:12:32.568 5: NETIO1: get portvalue postprocessor defined as {hex(trim("$_"))}


2018.09.18 21:16:02.301 4: WEB_192.168.1.41_52097 POST /fhem?cmd.Relais1=set%20Relais1%20off&room=all&XHR=1&fwcsrf=csrf_962874838701303&fw_id=585; BUFLEN:0
2018.09.18 21:16:02.302 5: Cmd: >set Relais1 off<
2018.09.18 21:16:02.304 5: ECMDDevice: Analyze command >{"io set ddr 2 ff\n\000io set port 2 00 01\n"}<
2018.09.18 21:16:02.306 5: NETIO1: sending command io set ddr 2 ff\n\000io set port 2 00 01\n (\151\157\040\163\145\164\040\144\144\162\040\062\040\146\146\012\000\151\157\040\163\145\164\040\160\157\162\164\040\062\040\060\060\040\060\061\012)
2018.09.18 21:16:02.307 5: NETIO1: write io set ddr 2 ff\n\000io set port 2 00 01\n (\151\157\040\163\145\164\040\144\144\162\040\062\040\146\146\012\000\151\157\040\163\145\164\040\160\157\162\164\040\062\040\060\060\040\060\061\012), expect OK\n
2018.09.18 21:16:02.307 5: SW: 696f207365742064647220322066660a00696f2073657420706f727420322030302030310a
2018.09.18 21:16:02.310 5: NETIO1: read OK\n (\117\113\012)
2018.09.18 21:16:02.311 5: NETIO1: received answer OK\n (\117\113\012)
2018.09.18 21:16:02.311 5: Postprocessing "OK\n (\117\113\012)" with perl command {s/([OK\n|;]*)/success/; "$_" eq "success" ? "ok" : "error";}.
2018.09.18 21:16:02.313 5: Postprocessed value is "ok (\157\153)".
2018.09.18 21:16:02.314 5: Starting notify loop for Relais1, 2 event(s), first is off: ok
2018.09.18 21:16:02.326 5: End notify loop for Relais1
2018.09.18 21:16:02.332 4: WEB: /fhem?cmd.Relais1=set%20Relais1%20off&room=all&XHR=1&fwcsrf=csrf_962874838701303&fw_id=585 / RL:20 / text/plain; charset=UTF-8 / Content-Encoding: gzip
/
2018.09.18 21:16:03.297 5: exec at command Test3
2018.09.18 21:16:03.298 5: Cmd: >set Test2 toggle<
2018.09.18 21:16:03.299 4: dummy set Test2 toggle
2018.09.18 21:16:03.300 5: Starting notify loop for Test2, 1 event(s), first is toggle
2018.09.18 21:16:03.306 5: Triggering nty_Test
2018.09.18 21:16:03.306 4: nty_Test exec IF ([Test:&STATE] eq "on") (set Test off) ELSE (set Test on)
2018.09.18 21:16:03.307 5: Cmd: >IF ([Test:&STATE] eq "on") (set Test off) ELSE (set Test on)<
2018.09.18 21:16:03.309 5: Cmd: >{if(InternalIf('Test','STATE','') eq "on"){fhem('set Test off')}else{fhem('set Test on')}}<
2018.09.18 21:16:03.310 5: Cmd: >set Test off<
2018.09.18 21:16:03.311 4: dummy set Test off
2018.09.18 21:16:03.313 5: Starting notify loop for Test, 1 event(s), first is off
2018.09.18 21:16:03.313 5: Triggering Dummy_Aus
2018.09.18 21:16:03.314 4: Dummy_Aus exec { fhem "set Relais1 off" }
2018.09.18 21:16:03.314 5: Cmd: >{ fhem "set Relais1 off" }<
2018.09.18 21:16:03.315 5: Cmd: >set Relais1 off<
2018.09.18 21:16:03.316 5: ECMDDevice: Analyze command >{"io set ddr 2 ff\n\000io set port 2 00 01\n"}<
2018.09.18 21:16:03.318 5: NETIO1: sending command io set ddr 2 ff\n\000io set port 2 00 01\n (\151\157\040\163\145\164\040\144\144\162\040\062\040\146\146\012\000\151\157\040\163\145\164\040\160\157\162\164\040\062\040\060\060\040\060\061\012)
2018.09.18 21:16:03.319 5: NETIO1: write io set ddr 2 ff\n\000io set port 2 00 01\n (\151\157\040\163\145\164\040\144\144\162\040\062\040\146\146\012\000\151\157\040\163\145\164\040\160\157\162\164\040\062\040\060\060\040\060\061\012), expect OK\n
2018.09.18 21:16:03.320 5: SW: 696f207365742064647220322066660a00696f2073657420706f727420322030302030310a
2018.09.18 21:16:03.323 5: NETIO1: read OK\n (\117\113\012)
2018.09.18 21:16:03.323 5: NETIO1: received answer OK\n (\117\113\012)
2018.09.18 21:16:03.324 5: Postprocessing "OK\n (\117\113\012)" with perl command {s/([OK\n|;]*)/success/; "$_" eq "success" ? "ok" : "error";}.
2018.09.18 21:16:03.325 5: Postprocessed value is "ok (\157\153)".
2018.09.18 21:16:03.326 5: Starting notify loop for Relais1, 2 event(s), first is off: ok
2018.09.18 21:16:03.338 5: End notify loop for Relais1
FHEM auf Raspberry mit HM, HMC und AVR Netios.

Dr. Boris Neubert

Zitat von: Maxl am 18 September 2018, 21:31:47
Was hat sich bei den Modulen geändert, wie bringe ich sie wieder zum laufen.

Was sich geändert hast, findest Du im Log und in der Datei CHANGED.

Ich sehe noch davon ab, mir die Details anzusehen. Vielen Dank aber schon, das wird sehr hilfreich, falls Du anhand der Änderungen nicht selbst darauf kommst, was die Ursache ist. Sollte das der Fall sein, möchte ich Dich bitten zu sagen, was genau das erwartete Verhalten ist und wo es abweicht und dies am Log zu demonstrieren.

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

DJFS

Und was hat sich jetzt geändert?
warum geht das alles nicht mehr? 
aus den beiden Links werde ich nicht schlau

Dr. Boris Neubert

Mein Beitrag ist vom 20. September 2018!

Wenn Du eine Frage oder Anregung hast, dann eröffne bitte ein neues Thema.

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