FHEM Forum

FHEM - Anwendungen => Multimedia => Thema gestartet von: petschni am 02 November 2016, 14:42:02

Titel: Logitech Harmony Link - authentication failed aber connected
Beitrag von: petschni am 02 November 2016, 14:42:02
Hallo,

ich habe hier einen Logitech Harmony Link Hub (Produktnummer: 815-000072) und würde ihn gerne mit FHEM verwenden.

Das Anlegen mittels "define HarmonyLink harmony username password IP" wirft einen Fehler im Log bezüglich der Authentication. Allerdings zeigt es danach an, dass es verbunden wäre. Das Passwort ist soweit auch korrekt. Weitere Aktionen wie "get HarmonyLink activities" geben dann aber nur leere Werte zurück. Gibt es noch weitere Möglichkeiten das zu debuggen?

Danke schon einmal vorab.
Peter

Define Log
2016.11.02 14:29:15 4: WEB_IP4 POST /fhem&fw_id=68&room=Kinderzimmer&cmd=define+HarmonyLink+harmony+xxxxx+xxxxxxx+IPHARMONY; BUFLEN:0
2016.11.02 14:29:15 5: Cmd: >define HarmonyLink harmony xxxxx xxxxx IPHARMONY<
2016.11.02 14:29:15 5: Triggering HarmonyLink (1 changes)
2016.11.02 14:29:15 5: Starting notify loop for HarmonyLink, first event Disconnected
2016.11.02 14:29:15 4: HarmonyLink: connect
2016.11.02 14:29:15 4: HttpUtils url=https://svcs.myharmony.com/CompositeSecurityServices/Security.svc/json/GetUserAuthToken
2016.11.02 14:29:16 4: https://svcs.myharmony.com/CompositeSecurityServices/Security.svc/json/GetUserAuthToken: HTTP response code 200
2016.11.02 14:29:16 4: HttpUtils https://svcs.myharmony.com/CompositeSecurityServices/Security.svc/json/GetUserAuthToken: Got data, length: 125
2016.11.02 14:29:16 4: HarmonyLink: {"GetUserAuthTokenResult":{"AccountId":0,"UserAuthToken":"xxxxxx"}}
2016.11.02 14:29:16 3: HarmonyLink: connected
2016.11.02 14:29:16 5: Triggering HarmonyLink (1 changes)
2016.11.02 14:29:16 5: Starting notify loop for HarmonyLink, first event Connected
2016.11.02 14:29:16 4: HarmonyLink: send: <stream:stream to='connect.logitech.com' xmlns:stream='http://etherx.jabber.org/streams' xmlns='jabber:client' xml:lang='en' version='1.0'>
2016.11.02 14:29:16 5: Triggering global (1 changes)
2016.11.02 14:29:16 5: Starting notify loop for global, first event DEFINED HarmonyLink
2016.11.02 14:29:16 4: WEB_IP4 GET /fhem?detail=HarmonyLink&fw_id=68; BUFLEN:0
2016.11.02 14:29:16 4: name: /fhem?detail=HarmonyLink&fw_id=68 / RL:2861 / text/html; charset=UTF-8 / Content-Encoding: gzip
/
2016.11.02 14:29:16 4: WEB_IP4 GET /fhem?cmd={ReadingsVal(%22HarmonyLink%22,%22command%22,%22%22)}&XHR=1; BUFLEN:0
2016.11.02 14:29:16 5: Cmd: >{ReadingsVal("HarmonyLink","command","")}<
2016.11.02 14:29:16 4: name: /fhem?cmd={ReadingsVal(%22HarmonyLink%22,%22command%22,%22%22)}&XHR=1 / RL:21 / text/plain; charset=UTF-8 / Content-Encoding: gzip
/
2016.11.02 14:29:16 4: Connection accepted from WEB_IP5
2016.11.02 14:29:16 4: WEB_IP5 GET /fhem?cmd={AttrVal(%22HarmonyLink%22,%22room%22,%22%22)}&XHR=1; BUFLEN:0
2016.11.02 14:29:16 5: Cmd: >{AttrVal("HarmonyLink","room","")}<
2016.11.02 14:29:16 4: name: /fhem?cmd={AttrVal(%22HarmonyLink%22,%22room%22,%22%22)}&XHR=1 / RL:21 / text/plain; charset=UTF-8 / Content-Encoding: gzip
/
2016.11.02 14:29:16 4: HarmonyLink: send: <auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>xxxxx</auth>
2016.11.02 14:29:16 4: Connection accepted from WEB_IP2
2016.11.02 14:29:16 4: WEB_IP2 GET /fhem?XHR=1&inform=type=status;filter=HarmonyLink;since=1478093355;fmt=JSON&fw_id=68×tamp=1478093356927; BUFLEN:0
2016.11.02 14:29:16 5: HarmonyLink: tag: failure, attr:  xmlns='urn:ietf:params:xml:ns:xmpp-sasl'
2016.11.02 14:29:16 4: HarmonyLink: unknown (no cdata): <failure xmlns='urn:ietf:params:xml:ns:xmpp-sasl'><not-authorized/></failure>
2016.11.02 14:29:18 4: WEB_IP4 POST /fhem?cmd=save&XHR=1&fw_id=68; BUFLEN:0
2016.11.02 14:29:18 5: Cmd: >save<
2016.11.02 14:29:18 5: Triggering global (1 changes)
2016.11.02 14:29:18 5: Starting notify loop for global, first event SAVE
2016.11.02 14:29:18 4: name: /fhem?cmd=save&XHR=1&fw_id=68 / RL:68 / text/plain; charset=UTF-8 / Content-Encoding: gzip
Titel: Antw:Logitech Harmony Link - authentication failed aber connected
Beitrag von: justme1968 am 02 November 2016, 15:19:34
ich weiß nicht wie kompatibel dein hub ist. so viel ich weiß gibt es den nur in den usa?

ist er in der harmony desktop app zu sehen?

geht es wenn du user und password im define wh lässt?

setz mal verbose für den hub auf 5 und mach ein modify auf das device.

und zeig ein list.

gruss
  andre
Titel: Antw:Logitech Harmony Link - authentication failed aber connected
Beitrag von: petschni am 02 November 2016, 17:32:29
Zitat von: justme1968 am 02 November 2016, 15:19:34
ich weiß nicht wie kompatibel dein hub ist. so viel ich weiß gibt es den nur in den usa?
Ja genau - das war damals ein Import aus den USA, da es hier kein vergleichbares Modell gab.


Zitat
ist er in der harmony desktop app zu sehen?
Ja dort ist er sichtbar.


Zitat
und zeig ein list.
Internals:
   CFGFN
   CONNECTS   164
   ConnectionState Connected
   DEF        crypt:xxx crypt:xxx IP
   FD         5
   LAST_CONNECT 2016-11-02 17:21:03
   LAST_DISCONNECT 2016-11-02 17:21:01
   NAME       HarmonyLink
   NOTIFYDEV  global
   NR         70
   NTFY_ORDER 50-HarmonyLink
   STATE      Connected
   TYPE       harmony
   ip         IP
   Readings:
     2016-11-02 17:21:03   state           Connected
   Helper:
     AccountId  0
     PARTIAL
     UserAuthToken xxxxx
     password   crypt:xxxx
     username   crypt:xxxx
Attributes:





Zitat
geht es wenn du user und password im define wh lässt?
Das führt leider auch zu einem "not-authorized" - siehe log.

2016.11.02 17:24:36 4: WEB_IP1 POST /fhem&fw_id=127&cmd=define+HarmonyLink+harmony+IPHarmony; BUFLEN:0
2016.11.02 17:24:36 5: Cmd: >define HarmonyLink harmony IPHarmony<
2016.11.02 17:24:36 5: Triggering HarmonyLink (1 changes)
2016.11.02 17:24:36 5: Starting notify loop for HarmonyLink, first event Disconnected
2016.11.02 17:24:36 4: HarmonyLink: connect
2016.11.02 17:24:36 3: HarmonyLink: connected
2016.11.02 17:24:36 5: Triggering HarmonyLink (1 changes)
2016.11.02 17:24:36 5: Starting notify loop for HarmonyLink, first event Connected
2016.11.02 17:24:36 4: HarmonyLink: send: <stream:stream to='connect.logitech.com' xmlns:stream='http://etherx.jabber.org/streams' xmlns='jabber:client' xml:lang='en' version='1.0'>
2016.11.02 17:24:36 5: Triggering global (1 changes)
2016.11.02 17:24:36 5: Starting notify loop for global, first event DEFINED HarmonyLink
2016.11.02 17:24:36 4: WEB_IP1 GET /fhem?detail=HarmonyLink&fw_id=127; BUFLEN:0
2016.11.02 17:24:36 4: name: /fhem?detail=HarmonyLink&fw_id=127 / RL:2787 / text/html; charset=UTF-8 / Content-Encoding: gzip
/
2016.11.02 17:24:36 4: HarmonyLink: send: <auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>xxxx==</auth>
2016.11.02 17:24:36 5: HarmonyLink: tag: failure, attr:  xmlns='urn:ietf:params:xml:ns:xmpp-sasl'
2016.11.02 17:24:36 4: HarmonyLink: unknown (no cdata): <failure xmlns='urn:ietf:params:xml:ns:xmpp-sasl'><not-authorized/></failure>
2016.11.02 17:24:36 4: WEB_192.168.83.68_65352 GET /fhem?cmd={AttrVal(%22HarmonyLink%22,%22room%22,%22%22)}&XHR=1; BUFLEN:0
2016.11.02 17:24:36 5: Cmd: >{AttrVal("HarmonyLink","room","")}<
2016.11.02 17:24:36 4: name: /fhem?cmd={AttrVal(%22HarmonyLink%22,%22room%22,%22%22)}&XHR=1 / RL:21 / text/plain; charset=UTF-8 / Content-Encoding: gzip
/
2016.11.02 17:24:36 4: WEB_IP1 GET /fhem?cmd={ReadingsVal(%22HarmonyLink%22,%22command%22,%22%22)}&XHR=1; BUFLEN:0
2016.11.02 17:24:36 5: Cmd: >{ReadingsVal("HarmonyLink","command","")}<
2016.11.02 17:24:36 4: name: /fhem?cmd={ReadingsVal(%22HarmonyLink%22,%22command%22,%22%22)}&XHR=1 / RL:21 / text/plain; charset=UTF-8 / Content-Encoding: gzip
/
2016.11.02 17:24:36 4: WEB_IP2 GET /fhem?XHR=1&inform=type=status;filter=HarmonyLink;since=1478103875;fmt=JSON&fw_id=127×tamp=1478103877024; BUFLEN:0
2016.11.02 17:24:38 4: WEB_IP1 POST /fhem?cmd=save&XHR=1&fw_id=127; BUFLEN:0
2016.11.02 17:24:38 5: Cmd: >save<
2016.11.02 17:24:38 5: Triggering global (1 changes)
2016.11.02 17:24:38 5: Starting notify loop for global, first event SAVE
2016.11.02 17:24:38 4: name: /fhem?cmd=save&XHR=1&fw_id=127 / RL:68 / text/plain; charset=UTF-8 / Content-Encoding: gzip
/
2016.11.02 17:24:42 4: Connection closed for WEB_IP2: EOF


Ein list danach ergibt folgendes:
Internals:
   CFGFN
   CONNECTS   4
   ConnectionState Connected
   DEF        IPHarmony
   FD         5
   LAST_CONNECT 2016-11-02 17:27:43
   LAST_DISCONNECT 2016-11-02 17:27:41
   NAME       HarmonyLink
   NOTIFYDEV  global
   NR         131
   NTFY_ORDER 50-HarmonyLink
   STATE      Connected
   TYPE       harmony
   ip         IPHarmony
   Readings:
     2016-11-02 17:27:43   state           Connected
   Helper:
     PARTIAL
     UserAuthToken
Attributes:


Zitat
setz mal verbose für den hub auf 5 und mach ein modify auf das device.
Das Modify erzeugt folgenden log:
2016.11.02 17:29:20 4: WEB_IP1_49385 POST /fhem?detail=HarmonyLink&detail=HarmonyLink&val.modifyHarmonyLink=IPHarmony&cmd.modifyHarmonyLink=modify+HarmonyLink; BUFLEN:0
2016.11.02 17:29:20 5: Cmd: >modify HarmonyLink IPHarmony<
2016.11.02 17:29:20 5: Triggering HarmonyLink (1 changes)
2016.11.02 17:29:20 5: Starting notify loop for HarmonyLink, first event Disconnected
2016.11.02 17:29:21 2: HarmonyLink: disconnect
2016.11.02 17:29:21 4: HarmonyLink: connect
2016.11.02 17:29:21 3: HarmonyLink: connected
2016.11.02 17:29:21 5: Triggering HarmonyLink (1 changes)
2016.11.02 17:29:21 5: Starting notify loop for HarmonyLink, first event Connected
2016.11.02 17:29:21 4: HarmonyLink: send: <stream:stream to='connect.logitech.com' xmlns:stream='http://etherx.jabber.org/streams' xmlns='jabber:client' xml:lang='en' version='1.0'>
2016.11.02 17:29:21 5: Triggering global (1 changes)
2016.11.02 17:29:21 5: Starting notify loop for global, first event MODIFIED HarmonyLink
2016.11.02 17:29:21 4: WEB_IP1_49385 GET /fhem?detail=HarmonyLink&fw_id=; BUFLEN:0
2016.11.02 17:29:21 4: name: /fhem?detail=HarmonyLink&fw_id= / RL:2802 / text/html; charset=UTF-8 / Content-Encoding: gzip
/
2016.11.02 17:29:21 4: HarmonyLink: send: <auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>xxx==</auth>
2016.11.02 17:29:21 5: HarmonyLink: tag: failure, attr:  xmlns='urn:ietf:params:xml:ns:xmpp-sasl'
2016.11.02 17:29:21 4: HarmonyLink: unknown (no cdata): <failure xmlns='urn:ietf:params:xml:ns:xmpp-sasl'><not-authorized/></failure>
2016.11.02 17:29:21 4: WEB_IP1_49385 GET /fhem?cmd={ReadingsVal(%22HarmonyLink%22,%22command%22,%22%22)}&XHR=1; BUFLEN:0
2016.11.02 17:29:21 5: Cmd: >{ReadingsVal("HarmonyLink","command","")}<
2016.11.02 17:29:21 4: name: /fhem?cmd={ReadingsVal(%22HarmonyLink%22,%22command%22,%22%22)}&XHR=1 / RL:21 / text/plain; charset=UTF-8 / Content-Encoding: gzip
/
2016.11.02 17:29:21 4: Connection accepted from WEB_IP1_49397
2016.11.02 17:29:21 4: Connection accepted from WEB_IP1_49398
2016.11.02 17:29:21 4: WEB_IP1_49397 GET /fhem?cmd={AttrVal(%22HarmonyLink%22,%22room%22,%22%22)}&XHR=1; BUFLEN:0
2016.11.02 17:29:21 5: Cmd: >{AttrVal("HarmonyLink","room","")}<
2016.11.02 17:29:21 4: name: /fhem?cmd={AttrVal(%22HarmonyLink%22,%22room%22,%22%22)}&XHR=1 / RL:21 / text/plain; charset=UTF-8 / Content-Encoding: gzip
/
2016.11.02 17:29:21 4: WEB_IP1_49398 GET /fhem?XHR=1&inform=type=status;filter=HarmonyLink;since=1478104160;fmt=JSON&fw_id=137×tamp=1478104161444; BUFLEN:0
2016.11.02 17:29:24 4: WEB_IP1_49385 POST /fhem?cmd=save&XHR=1&fw_id=137; BUFLEN:0
2016.11.02 17:29:24 5: Cmd: >save<
2016.11.02 17:29:24 5: Triggering global (1 changes)
2016.11.02 17:29:24 5: Starting notify loop for global, first event SAVE
2016.11.02 17:29:24 4: name: /fhem?cmd=save&XHR=1&fw_id=137 / RL:68 / text/plain; charset=UTF-8 / Content-Encoding: gzip
/
2016.11.02 17:29:26 4: Connection closed for WEB_IP1_49398: EOF