[gelöst HMWired/HM485]: Warte auf Initialisierung Gateway | configStatus PENDING

Begonnen von Joe_Neowood, 20 Juni 2022, 23:14:47

Vorheriges Thema - Nächstes Thema

Joe_Neowood

Hallo,

schon viele Jahre lese ich hier die wertvollen Tipps, es hat mir sehr geholfen. Heute komme ich nicht weiter:

Seit 2016 habe ich u.a. ein HomeMatic Wired RS485 LAN Gateway im Einsatz, der Adapter war jedoch in letzter Zeit nicht zuverlässig. So folge ich nun der Empfehlung im Wiki und möchte das Teil gegen einen USB-Serial Adapter mit RS485 Schnittstelle (DIGITUS DA-70157) ersetzen. Ich folge dieser Anleitung:

https://wiki.fhem.de/wiki/Serial/Netzwerk-RS485-Adapter

Ich kann den Adapter verbinden "STATE: opened", das (bereinigte) Log sieht so aus:


2022.06.20 21:24:34 3: HM485USB: Start HM485d with command line: ./FHEM/lib/HM485/HM485d/HM485d.pl --hmwId 00000001 --serialNumber SGW0123456 --device /dev/ttyUSB0 --localPort 2000
2022.06.20 21:24:34 3: HM485USB: HM485d was started with PID:  7020
2022.06.20 21:24:34 3: HM485USB: Connect to HM485d delayed for 5 seconds
2022.06.20 21:24:34 1: PERL WARNING: Use of uninitialized value $d in hash element at fhem.pl line 4736.
2022.06.20 21:24:34 3: HM485: Warte auf Initialisierung Gateway
2022.06.20 21:24:34 3: HM485: Warte auf Initialisierung Gateway
2022.06.20 21:24:34 3: HM485: Warte auf Initialisierung Gateway
2022.06.20 21:24:34 3: HM485: Warte auf Initialisierung Gateway
2022.06.20 21:24:34 3: HM485: Warte auf Initialisierung Gateway
2022.06.20 21:24:34 3: HM485: Warte auf Initialisierung Gateway
2022.06.20 21:24:43 3: HM485: Warte auf Initialisierung Gateway
2022.06.20 21:24:43 3: HM485: Warte auf Initialisierung Gateway
2022.06.20 21:24:43 3: HM485: Warte auf Initialisierung Gateway
2022.06.20 21:24:43 3: HM485: Warte auf Initialisierung Gateway
2022.06.20 21:24:43 3: HM485: Warte auf Initialisierung Gateway
2022.06.20 21:24:43 3: HM485: Warte auf Initialisierung Gateway
2022.06.20 21:24:43 3: Opening HM485USB device localhost:2000
2022.06.20 21:24:43 3: HM485USB: connected to device localhost:2000
2022.06.20 21:24:43 3: HM485USB device opened
2022.06.20 21:24:43 3: HM485USB: Lan Device Information
2022.06.20 21:24:43 3: HM485USB: Protocol-Version: 01
2022.06.20 21:24:43 3: HM485USB: Interface-Type: HMW-SOFT-GW
2022.06.20 21:24:43 3: HM485USB: Firmware-Version: 0.2.2
2022.06.20 21:24:43 3: HM485USB: Serial-Number: SGW0123456
2022.06.20 21:24:43 3: HM485USB: Initialize the interface
2022.06.20 21:24:49 3: HM485: Warte auf Initialisierung Gateway
2022.06.20 21:24:49 3: HM485: Warte auf Initialisierung Gateway
2022.06.20 21:24:49 3: HM485: Warte auf Initialisierung Gateway
2022.06.20 21:24:49 3: HM485: Warte auf Initialisierung Gateway
2022.06.20 21:24:49 3: HM485: Warte auf Initialisierung Gateway
2022.06.20 21:24:49 3: HM485: Warte auf Initialisierung Gateway


Danach wiederholt sich immer wieder im 5-Sekunden-Takt die Meldung "Warte auf Initialisierung Gateway" jeweils 6x.

Ein List von HM485USB sieht so aus, ich kann kein Problem erkennen:


Internals:
   DEF        localhost:2000
   DeviceName localhost:2000
   FD         15
   FUUID      62b0b613-f33f-9f27-ec12-ce5596cf73ff8a04
   HM485USB_MSGCNT 25
   HM485USB_TIME 2022-06-20 21:50:47
   HM485d_CommandLine ./FHEM/lib/HM485/HM485d/HM485d.pl --hmwId 00000001 --serialNumber SGW0123456 --device /dev/ttyUSB0 --localPort 2000
   HM485d_PID  7020
   HM485d_STATE started
   InterfaceType HMW-SOFT-GW
   LASTInputDev HM485USB
   Last_Sent_RAW_CMD FFFFFFFF 98 00000001 5A
   Last_Sent_RAW_CMD_State NACK
   MSGCNT     25
   NAME       HM485USB
   NR         60
   PARTIAL   
   ProtokolVersion 01
   STATE      opened
   SerialNumber SGW0123456
   TYPE       HM485_LAN
   Version    0.2.2
   currentQueueId 0
   discoveryRunning 0
   eventCount 3
   hmwId      00000001
   msgCounter 8
   queueId    10
   queueRunning 0
   READINGS:
     2022-06-20 21:24:43   state           opened
   ctrl:
     FFFFFFFF   98
   keepalive:
     ok         1
     retry      0
   sendQueue:
Attributes:
   HM485d_bind 1
   HM485d_device /dev/ttyUSB0
   HM485d_startTimeout 5
   group      HM-Schnittstellen
   hmwId      00000001
   icon       lan_rs485
   room       System


Möglicherweise gibt es Probleme mit meiner FHEM Version? Updates sind aktuell, aber in der Version steht bei einigen Stellen "No Id found for ...", insbesondere auch bei Modulen, die mit HMW zu tun haben. Das kann ich mir nicht erklären:


Latest Revision: 26154

File                     Rev   Last Change

fhem.pl                  26115 2022-06-04 09:50:00Z rudolfkoenig
96_allowed.pm            26004 2022-04-29 19:06:05Z rudolfkoenig
95_Astro.pm              25198 2021-11-07 15:42:54Z phenning
90_at.pm                 25248 2021-11-21 10:29:01Z rudolfkoenig
98_autocreate.pm         23727 2021-02-12 20:31:37Z rudolfkoenig
57_Calendar.pm           25643 2022-02-06 16:53:20Z neubert
10_CUL_HM.pm             25977 2022-04-18 14:48:41Z martinp876
98_dewpoint.pm           18846 2019-03-10 11:45:58Z hotbso
98_DOIF.pm               26020 2022-05-03 16:28:02Z Damian
98_dummy.pm              25606 2022-02-01 10:43:57Z rudolfkoenig
55_DWD_OpenData.pm       23797 2021-02-21 19:49:57Z jensb
91_eventTypes.pm         23471 2021-01-04 19:24:21Z rudolfkoenig
01_FHEMWEB.pm            25943 2022-04-10 11:34:15Z rudolfkoenig
92_FileLog.pm            26084 2022-05-24 11:22:55Z rudolfkoenig
98_help.pm               25013 2021-09-23 21:07:00Z betateilchen
10_HM485.pm                816 2019-11-15 14:00:00Z ThorstenPferdekaemper
No Id found for 00_HM485_LAN.pm
98_HMinfo.pm             25978 2022-04-18 14:50:17Z martinp876
00_HMLAN.pm              25204 2021-11-09 05:41:42Z martinp876
No Id found for hmw_io12_sw14_dr.pm
No Id found for hmw_io12_sw7_dr.pm
No Id found for hmw_io12_sw7_dr_V3_02.pm
No Id found for hmw_io_12_fm.pm
No Id found for hmw_sen_sc_12_dr.pm
38_netatmo.pm            26137 2022-06-08 16:03:39Z moises
91_notify.pm             25888 2022-03-27 10:22:58Z rudolfkoenig
73_PRESENCE.pm           20782 2019-12-19 10:51:06Z markusbloch
33_readingsGroup.pm      23844 2021-02-27 19:43:24Z justme1968
98_statistics.pm         26152 2022-06-16 05:45:59Z Beta-User
99_SUNRISE_EL.pm         24249 2021-04-14 05:45:49Z rudolfkoenig
98_SVG.pm                25876 2022-03-23 11:28:24Z rudolfkoenig
50_TelegramBot.pm        24867 2021-08-23 10:23:15Z viegener
98_telnet.pm             25754 2022-02-27 16:49:52Z rudolfkoenig
98_THRESHOLD.pm          14179 2017-05-03 20:10:16Z Damian
98_update.pm             25724 2022-02-21 17:12:17Z rudolfkoenig
99_Utils.pm              24128 2021-04-02 16:29:11Z rudolfkoenig
98_version.pm            15140 2017-09-26 09:20:09Z markusbloch
91_watchdog.pm           26108 2022-06-01 08:25:03Z rudolfkoenig
59_Weather.pm            22982 2020-10-17 12:49:38Z CoolTux
98_weblink.pm            23597 2021-01-23 17:57:05Z rudolfkoenig

AttrTemplate.pm          25155 2021-10-30 12:48:21Z rudolfkoenig
Blocking.pm              23268 2020-12-01 11:48:48Z rudolfkoenig
Color.pm                 20813 2019-12-22 18:42:10Z justme1968
No Id found for ConfigurationManager.pm
No Id found for Constants.pm
DarkSkyAPI.pm            23645 2021-01-30 17:55:57Z CoolTux
No Id found for Device.pm
DevIo.pm                 26055 2022-05-17 20:12:20Z rudolfkoenig
GPUtils.pm               19666 2019-06-20 11:17:29Z CoolTux
HMConfig.pm              25160 2021-10-30 17:38:52Z martinp876
No Id found for hmw_central.pm
No Id found for hmw_generic.pm
No Id found for hmw_io_4_fm.pm
No Id found for hmw_io_4_fm_V3_02.pm
No Id found for hmw_io_sr_fm.pm
No Id found for hmw_lc_bl1_dr.pm
No Id found for hmw_lc_bl1_dr_V3_02.pm
No Id found for hmw_lc_dim1l_dr.pm
No Id found for hmw_lc_sw2_dr.pm
No Id found for hmw_lc_sw2_dr_V3_02.pm
No Id found for hmw_virtual.pm
HttpUtils.pm             26007 2022-04-30 18:12:02Z rudolfkoenig
myUtilsTemplate.pm        7570 2015-01-14 18:31:44Z rudolfkoenig
OpenWeatherMapAPI.pm     24604 2021-06-09 18:49:19Z CoolTux
No Id found for PeeringManager.pm
RTypes.pm                10476 2016-01-12 21:03:33Z borisneubert
SetExtensions.pm         25286 2021-12-03 10:16:56Z rudolfkoenig
SubProcess.pm            14334 2017-05-20 23:11:06Z neubert
TcpServerUtils.pm        25866 2022-03-21 09:01:16Z rudolfkoenig
UConv.pm                 21159 2020-02-09 14:04:27Z loredo
No Id found for Util.pm
No Id found for XmlConverter.pm


Ich kann ein Discovery starten und im Log werden die Devices gefunden, aber nicht neu angelegt. Das scheint richtig zu sein, schließlich sind die Devices ja zuvor schon mit dem LAN Adapter angelegt gewesen:


2022.06.20 21:33:41 3: HM485USB: Discovery - found device: 0001DD57
2022.06.20 21:33:41 3: HM485USB: Discovery - found device: 0001DE6E
2022.06.20 21:33:42 3: HM485USB: Discovery - found device: 0001DF6A
2022.06.20 21:33:43 3: HM485USB: Discovery - found device: 0001E04E
2022.06.20 21:33:44 3: HM485USB: Discovery - found device: 00020E22
2022.06.20 21:33:45 3: HM485USB: Discovery - found device: 000220DB


So sieht das List für das Device mit der Adresse 000220DB aus, das Teil ist ein Schaltaktor, configStatus is PENDING.


Internals:
   DEF        000220DB
   FUUID      5f5ccf4e-f33f-9f27-095c-a9b7fc94d3e67ce1
   FailedConfigReads 0
   IODev     
   NAME       Zweifach.Schaltaktor.B
   NR         1247
   STATE      ACK
   TYPE       HM485
   channel_01 Zweifach.Schaltaktor.B.Taster1.frei
   channel_02 Zweifach.Schaltaktor.B.Taster2.frei
   channel_03 Aussen.Garten.Licht.Sch
   channel_04 Zweifach.Schaltaktor.B.Aktor2.frei
   eventCount 1
   READINGS:
     2022-02-16 06   D-deviceKey     HMW_LC_SW2_DR
     2022-02-16 06   D-fwVersion     3.06
     2022-02-16 06   D-serialNr      QEQ0199150
     2022-02-16 06   R-central_address 00000001
     2022-02-16 06   R-logging_time  2.00
     2022-06-20 21   configStatus    PENDING
     2021-02-13 08   state           ACK
     2020-09-12 15   working         off
   cache:
     sets       Unknown argument ?, choose one of  getConfig raw reset 
     01:
       allowedSets
       sets       Unknown argument ?, choose one of   
     02:
       allowedSets
       sets       Unknown argument ?, choose one of   
     03:
       allowedSets
     04:
       allowedSets
       sets       Unknown argument ?, choose one of   
     linkParams:
       actuator:
         channels   00
       sensor:
         channels   00
Attributes:
   IODev      HM485_LAN
   group      Wired.HM485.Geraete
   room       System


Wenn ich die Taster drücke, dann kommen solche Meldungen im Log:


2022.06.20 21:31:16 3: Zweifach.Schaltaktor.B: HM485_ProcessChannelState: hmwId = 000220DB No Device Key
2022.06.20 21:31:17 3: Zweifach.Schaltaktor.B: HM485_ProcessChannelState: hmwId = 000220DB No Device Key


Über Eure Hilfestellungen würde ich mich freuen!


Joe_Neowood

Ich konnte das Problem lösen, ich musste lediglich den Wiki verstehen und befolgen:  ;)

ZitatWechsel von HMW-LAN-GW zu Serial/Netzwerk-RS485-Adaptern
Der Wechsel zwischen den verschiedenen Interface-Typen geht einfach und bedarf kein neues Pairing. Ggf. müssen einige interfacespezifische Attribute in der fhem.cfg hinzugefügt bzw. gelöscht werden.

Das interfacespezifische Attribut, welches in meinem Fall zum Problem geführt hat, ist das Attribut "IoDev", welches noch von vormaligen LAN Gateway gesetzt war. Nachdem ich das neue USB Gateway eingetragen hatte, wurde alles tadellos konfiguriert und HMWired läuft wieder einwandfrei.

Hier ein entsprechendes List des obigen Devices, nachdem es funkioniert:


Internals:
   DEF        000220DB
   FUUID      5f5ccf4e-f33f-9f27-095c-a9b7fc94d3e67ce1
   FailedConfigReads 0
   IODev      HM485USB
   NAME       Zweifach.Schaltaktor.B
   NR         1247
   RawDeviceType 17
   RawFwVersion 774
   STATE      ACK
   TYPE       HM485
   channel_01 Zweifach.Schaltaktor.B.Taster1.frei
   channel_02 Zweifach.Schaltaktor.B.Taster2.frei
   channel_03 Aussen.Garten.Licht.Sch
   channel_04 Zweifach.Schaltaktor.B.Aktor2.frei
   eventCount 25
   READINGS:
     2022-06-21 07   D-deviceKey     HMW_LC_SW2_DR
     2022-06-21 07   D-fwVersion     3.06
     2022-06-21 07   D-serialNr      QEQ0199150
     2022-06-21 07   IODev           HM485USB
     2022-06-21 07   R-central_address 00000001
     2022-06-21 07   R-logging_time  2.00
     2022-06-21 07   configStatus    OK
     2021-02-13 08   state           ACK
     2020-09-12 15   working         off
   cache:
     sets       Unknown argument ?, choose one of  config getConfig raw reset 
     01:
       allowedSets press_short press_long
       sets       Unknown argument ?, choose one of  config peer href='/fhem?detail=Aussen.Garten.Licht.Sch'>Aussen.Garten.Licht.Sch,EG.Kueche.Dunstabzug.Sch,EG.Terrasse.Markise_03,EG.Wingar.Markise_03,Zweifach.Schaltaktor.A.Aktor2.frei,Zweifach.Schaltaktor.B.Aktor2.frei press_long press_short 
       peeredChannels:
     02:
       allowedSets press_short press_long
       sets       Unknown argument ?, choose one of  config peer href='/fhem?detail=Aussen.Garten.Licht.Sch'>Aussen.Garten.Licht.Sch,EG.Kueche.Dunstabzug.Sch,EG.Terrasse.Markise_03,EG.Wingar.Markise_03,Zweifach.Schaltaktor.A.Aktor2.frei,Zweifach.Schaltaktor.B.Aktor2.frei press_long press_short 
       peeredChannels:
     03:
       allowedSets on off toggle inhibit install_test
       sets       Unknown argument ?, choose one of  config inhibit install_test off on peer href='/fhem?detail=EG.Terrasse.Markise_01'>EG.Terrasse.Markise_01,EG.Terrasse.Markise_02,EG.Wingar.Markise_01,EG.Wingar.Markise_02,Zweifach.Schaltaktor.A.Taster1.frei,Zweifach.Schaltaktor.A.Taster2.frei,Zweifach.Schaltaktor.B.Taster1.frei,Zweifach.Schaltaktor.B.Taster2.frei toggle  off-till-overnight intervals on-for-timer blink on-till on-till-overnight off-for-timer off-till
       peeredChannels:
     04:
       allowedSets on off toggle inhibit install_test
       sets       Unknown argument ?, choose one of  config inhibit install_test off on peer href='/fhem?detail=EG.Terrasse.Markise_01'>EG.Terrasse.Markise_01,EG.Terrasse.Markise_02,EG.Wingar.Markise_01,EG.Wingar.Markise_02,Zweifach.Schaltaktor.A.Taster1.frei,Zweifach.Schaltaktor.A.Taster2.frei,Zweifach.Schaltaktor.B.Taster1.frei,Zweifach.Schaltaktor.B.Taster2.frei toggle  intervals on-for-timer off-till-overnight blink on-till off-for-timer off-till on-till-overnight
       peeredChannels:
     linkParams:
       actuator:
         address_start 855
         address_step 6
         channel_param channel
         channels   01 02
         count      28
         peer_param actuator
         type       link
         parameter:
           HASH(0x56e8598)
           HASH(0x56e8e70)
       sensor:
         address_start 15
         address_step 28
         channel_param channel
         channels   03 04
         count      30
         peer_param sensor
         type       link
         parameter:
           HASH(0x56f9d68)
           HASH(0x56f9f60)
           HASH(0x56f9e28)
           HASH(0x56fa9f8)
           HASH(0x5707ad8)
           HASH(0x5711fa0)
           HASH(0x570cdd0)
           HASH(0x5725648)
           HASH(0x5731248)
           HASH(0x56fa350)
           HASH(0x56f9578)
           HASH(0x574cfe8)
           HASH(0x574f110)
           HASH(0x5750240)
           HASH(0x57514c0)
           HASH(0x575faa8)
           HASH(0x57618a0)
           HASH(0x5763198)
           HASH(0x5763938)
           HASH(0x5765b08)
           HASH(0x5766ce0)
           HASH(0x57691c8)
           HASH(0x576a178)
           HASH(0x576b5e0)
           HASH(0x576ba00)
           HASH(0x576be08)
           HASH(0x576c210)
           HASH(0x576c638)
     peers:
       actuators:
       sensors:
Attributes:
   IODev      HM485USB
   group      Wired.HM485.Geraete
   room       System

Thorsten Pferdekaemper

Hi,
eigentlich war das im Wiki so gemeint, dass man direkt das existierende HM485_LAN Device umstellt. Soweit ich verstanden habe, hast Du ein neues HM485_LAN Device angelegt und dann in den ganzen HM485 Devices das Attribut IODev umgestellt. Korrekt?
Gruß,
    Thorsten
FUIP

Joe_Neowood

Hi Thorsten,

Das hast Du richtig verstanden, ich habe ein neues Device angelegt. Jetzt passt aber alles.

VG von Joe