Probleme im Zusammenspiel zwischen MAX! und Goggle Assistant

Begonnen von PingPong, 28 März 2019, 08:45:58

Vorheriges Thema - Nächstes Thema

PingPong

Hallo zusammen,

ich habe große Probleme im Zusammenspiel zwischen MAX! und dem Google Assistant.
Ihc habe das Modul  39_gassistant.pm aktiviert (https://forum.fhem.de/index.php/topic,96696.0.html. Dieses läuft soweit auch problemlos.
Sobald ich nun allerdings ein MAX! Gateway definiere, habe ich im gassistant log ständige Disconnects:
Hier einmal ein Auszug aus dem Log:
[26/03/2019, 21:20:42] [FHEM] Get refresh token...
  executing: http://127.0.0.1:8083/fhem?cmd=get%20gassistant%20refreshToken&fwcsrf=myhcconnToken&XHR=1
  executing: http://127.0.0.1:8083/fhem?cmd=setreading%20gassistant%20gassistant-fhem-connection%20connecting...&fwcsrf=myhcconnToken&XHR=1
[26/03/2019, 21:20:46] [FHEM] Found refresh token in reading
  executing: http://127.0.0.1:8083/fhem?cmd=setreading%20gassistant%20gassistant-fhem-versionAvailable%201.3.1&fwcsrf=myhcconnToken&XHR=1
Refresh tokens finished. Next refresh in 86400 seconds.
[26/03/2019, 21:20:48] [FHEM] refreshAllTokens executed
[26/03/2019, 21:20:49] [FHEM] Fetching FHEM devices...
[26/03/2019, 21:20:49] [FHEM] fetching: http://127.0.0.1:8083/fhem?cmd=jsonlist2%20room=GoogleAssistant&fwcsrf=myhcconnToken&XHR=1
[26/03/2019, 21:20:50] [FHEM] start connection executed
  executing: http://127.0.0.1:8083/fhem?cmd=setreading%20gassistant%20gassistant-fhem-lasterror%20none&fwcsrf=myhcconnToken&XHR=1
[26/03/2019, 21:20:50] [FHEM] Checking devices and attributes...
  executing: http://127.0.0.1:8083/fhem?cmd=%7BAttrVal(%22global%22%2C%22userattr%22%2C%22%22)%7D&fwcsrf=myhcconnToken&XHR=1
(node:1143) DeprecationWarning: grpc.load: Use the @grpc/proto-loader module with grpc.loadPackageDefinition instead
[26/03/2019, 21:20:51] DynamicFunctions updated
[26/03/2019, 21:20:51] SERVER FeatureLevel:{"featurelevel":2,"changelog":"implement Google Report State"}
[26/03/2019, 21:20:51] SYNC   FeatureLevel:{"featurelevel":1}
[26/03/2019, 21:20:51] >>> VERSION UPGRADE STARTED
[26/03/2019, 21:20:51] [FHEM] reloading http://127.0.0.1:8083/fhem
[26/03/2019, 21:20:51] [FHEM] Fetching FHEM devices...
[26/03/2019, 21:20:51] [FHEM] fetching: http://127.0.0.1:8083/fhem?cmd=jsonlist2%20room=GoogleAssistant&fwcsrf=myhcconnToken&XHR=1
[26/03/2019, 21:20:51] [FHEM] got: 0 results
  executing: http://127.0.0.1:8083/fhem?cmd=setreading%20gassistant%20gassistant-fhem-connection%20connected&fwcsrf=myhcconnToken&XHR=1
[26/03/2019, 21:20:52] [FHEM] got: 0 results
  executing: http://127.0.0.1:8083/fhem?cmd=setreading%20gassistant%20gassistant-fhem-connection%20connected&fwcsrf=myhcconnToken&XHR=1
[26/03/2019, 21:20:52] [FHEM] Supported Google Device Types: switch,outlet,light,thermostat,aircondition,airfreshener,airpurifier,blinds,camera,coffeemaker,dishwasher,dryer,fan,fireplace,heater,kettle,oven,refrigerator,scene,sprinkler,vacuum,washer
[26/03/2019, 21:20:52] >>> VERSION UPGRADE FINISHED - SYNC INITIATED
[26/03/2019, 21:21:32] [FHEM] longpoll ended, reconnect in: 200msec
[26/03/2019, 21:21:32] [FHEM] starting longpoll: http://127.0.0.1:8083/fhem?XHR=1&inform=type=status;addglobal=1;filter=.*;since=null;fmt=JSON×tamp=1553631692625
  executing: http://127.0.0.1:8083/fhem?cmd=jsonlist2%20TYPE%3Dgassistant&fwcsrf=myhcconnToken&XHR=1
[26/03/2019, 21:21:33] [FHEM] FHEM Google Assistant device detected: gassistant
  executing: http://127.0.0.1:8083/fhem?cmd=setreading%20gassistant%20gassistant-fhem-version%201.3.0&fwcsrf=myhcconnToken&XHR=1
  executing: http://127.0.0.1:8083/fhem?cmd=set%20gassistant%20loginURL%20https%3A%2F%2Ffhemconnector.eu.auth0.com%2Fauthorize%3Faudience%3Dhttps%3A%2F%2Feurope-west1-fhem-ga-connector.cloudfunctions.net%2F%26scope%3Doffline_access%2520openid%2520profile%26response_type%3Dcode%26client_id%3DEI0TI2Y0W1743Ico53Nvsg1FsmoZniCC%26code_challenge%3D2UX-WOZSHO24nTImfKg2OiB2phoq566lpWXRTA2305w%26code_challenge_method%3DS256%26redirect_uri%3Dhttps%3A%2F%2Feurope-west1-fhem-ga-connector.cloudfunctions.net%2Fcodelanding%2Fstart&fwcsrf=myhcconnToken&XHR=1
[26/03/2019, 21:21:33] [FHEM] Get refresh token...
  executing: http://127.0.0.1:8083/fhem?cmd=get%20gassistant%20refreshToken&fwcsrf=myhcconnToken&XHR=1
  executing: http://127.0.0.1:8083/fhem?cmd=setreading%20gassistant%20gassistant-fhem-connection%20connecting...&fwcsrf=myhcconnToken&XHR=1
[26/03/2019, 21:21:34] [FHEM] Found refresh token in reading
  executing: http://127.0.0.1:8083/fhem?cmd=setreading%20gassistant%20gassistant-fhem-versionAvailable%201.3.1&fwcsrf=myhcconnToken&XHR=1
Refresh tokens finished. Next refresh in 86400 seconds.
[26/03/2019, 21:21:35] [FHEM] refreshAllTokens executed
[26/03/2019, 21:21:36] [FHEM] Fetching FHEM devices...
[26/03/2019, 21:21:36] [FHEM] fetching: http://127.0.0.1:8083/fhem?cmd=jsonlist2%20room=GoogleAssistant&fwcsrf=myhcconnToken&XHR=1
[26/03/2019, 21:21:36] [FHEM] start connection executed
  executing: http://127.0.0.1:8083/fhem?cmd=setreading%20gassistant%20gassistant-fhem-lasterror%20none&fwcsrf=myhcconnToken&XHR=1
[26/03/2019, 21:21:36] [FHEM] Checking devices and attributes...
  executing: http://127.0.0.1:8083/fhem?cmd=%7BAttrVal(%22global%22%2C%22userattr%22%2C%22%22)%7D&fwcsrf=myhcconnToken&XHR=1
[26/03/2019, 21:21:36] [FHEM] got: 0 results
  executing: http://127.0.0.1:8083/fhem?cmd=setreading%20gassistant%20gassistant-fhem-connection%20connected&fwcsrf=myhcconnToken&XHR=1
[26/03/2019, 21:21:36] DynamicFunctions updated
[26/03/2019, 21:21:36] [FHEM] Supported Google Device Types: switch,outlet,light,thermostat,aircondition,airfreshener,airpurifier,blinds,camera,coffeemaker,dishwasher,dryer,fan,fireplace,heater,kettle,oven,refrigerator,scene,sprinkler,vacuum,washer
[26/03/2019, 21:21:36] SERVER FeatureLevel:{"featurelevel":2,"changelog":"implement Google Report State"}
[26/03/2019, 21:21:36] SYNC   FeatureLevel:{"featurelevel":1}
[26/03/2019, 21:21:36] >>> VERSION UPGRADE STARTED
[26/03/2019, 21:21:36] [FHEM] reloading http://127.0.0.1:8083/fhem
[26/03/2019, 21:21:36] [FHEM] Fetching FHEM devices...
[26/03/2019, 21:21:36] [FHEM] fetching: http://127.0.0.1:8083/fhem?cmd=jsonlist2%20room=GoogleAssistant&fwcsrf=myhcconnToken&XHR=1
[26/03/2019, 21:21:36] [FHEM] got: 0 results
  executing: http://127.0.0.1:8083/fhem?cmd=setreading%20gassistant%20gassistant-fhem-connection%20connected&fwcsrf=myhcconnToken&XHR=1
[26/03/2019, 21:21:36] >>> VERSION UPGRADE FINISHED - SYNC INITIATED
[26/03/2019, 21:22:10] Got SIGTERM, shutting down...
  executing: http://127.0.0.1:8083/fhem?cmd=setreading%20gassistant%20gassistant-fhem-connection%20disconnected&fwcsrf=myhcconnToken&XHR=1


Das Problem wurde auch schon im Modulbereich für gassistant diskutiert:

https://forum.fhem.de/index.php/topic,98794.0.html


Ich habe meine fhem Instanz nun auch schon mehrfach neu aufgesetzt - das Problem tritt immer wieder auf und ist in meiner aktuellen Instanz reproduzierbar.
Hat hier vielleicht noch jemand Ideen, wie man das Problem weiter eingrenzen und beheben könnte?

Wzut

Zitat von: PingPong am 28 März 2019, 08:45:58
Sobald ich nun allerdings ein MAX! Gateway definiere
und wo ist das list des "Gateways" ?
Maintainer der Module: MAX, MPD, UbiquitiMP, UbiquitiOut, SIP, BEOK, readingsWatcher

PingPong

Na hier :-)
Internals:
   DEF        192.168.178.66
   DeviceName 192.168.178.66:62910
   FD         101
   FUUID      5c9c8a4c-f33f-e87a-c799-0416fd6b778afb55
   INTERVAL   60
   NAME       MAX_Gateway
   NR         379
   PARTIAL   
   STATE      opened
   TYPE       MAXLAN
   addr       12386f
   clockset   3
   cubeTimeDifference 0
   dutycycle    4 %
   fwversion  0113
   pairmode   0
   persistent 1
   serial     MME0005316
   READINGS:
     2019-03-28 10:28:36   dutycycle       4
     2019-03-28 10:28:35   state           opened
Attributes:
   group      Gateways
   icon       text_max
   room       11_System->01_System,20_DeviceGroups->04_MAX!


Wobei...
Kleines Update: Ich hatte gestern alle meine MAX! Devices noch in fhem enthalten, nachdem ich das Gateway gelöscht hatte. In dieser Konstellation trat das Problem sofort wieder auf, nachdem ich das Gateway hinzugefügt hatte.
Jetzt hatte ich heute morgen erst die Devices gelöscht und anschließend das Gateway hinzugefügt.
Jetzt tritt das Problem aktuell nicht mehr auf.

Ich werde jetzt mal alle Devices wieder hinzufügen und schauen, ...

Wzut

wenn es rappelt hast du dann schon mal mit den beiden Parametern pollintervall und ondemand gespielt ?
Maintainer der Module: MAX, MPD, UbiquitiMP, UbiquitiOut, SIP, BEOK, readingsWatcher

PingPong

Das "Rappeln" habe ich unabhöngig vom Parameter "ondemand". Mit dem Pollintervall habe ich noch keine Erfahrungen.
Ich habe jetzt mal angefangen, meine Devices manuell zu definieren (keine autocreate, da der doofe Würfel ja eh alles wieder vergisst).
Ich habe das Gateway und ein paar weitere Devices hinzugefügt, ohne dass das Problem erneut aufgetreten ist.
Beim Hnzufügen eines weiteren Devices ist der Fehler erneut aufgetreten und er konnte durch das Löschen des Devices wieder behoben werden.
Ich werde heute Abend mal versuchen, ob ich das reproduzieren kann.

PingPong

So, es geht weiter :-(
Also fhem lief ohne Probleme bzw. Reconnects im google Assistant Modul.
Dann füge ich ein Device zu MAX hinzu:
Internals:
   CFGFN     
   DEF        WallMountedThermostat 192ddd
   FUUID      5c9d22f3-f33f-e87a-4da8-1d8a6e91f457290f
   IODev      MAX_Gateway
   LASTInputDev MAX_Gateway
   MAX_Gateway_MSGCNT 6
   MAX_Gateway_TIME 2019-03-28 20:45:11
   MSGCNT     6
   NAME       MAX_192ddd
   NR         3296
   STATE      19.0 °C
   TYPE       MAX
   addr       192ddd
   backend    MAX_Gateway
   rferror    0
   type       WallMountedThermostat
   READINGS:
     2019-03-28 20:45:11   MAXLAN_error    0
     2019-03-28 20:45:11   MAXLAN_errorInCommand
     2019-03-28 20:45:11   MAXLAN_initialized 1
     2019-03-28 20:45:11   MAXLAN_isAnswer 0
     2019-03-28 20:45:11   MAXLAN_valid    1
     2019-03-28 20:45:11   battery         ok
     2019-03-28 20:45:11   batteryState    ok
     2019-03-28 20:45:11   desiredTemperature 19.0
     2019-03-28 20:45:11   displayActualTemperature 1
     2019-03-28 20:39:57   groupid         0
     2019-03-28 20:45:11   mode            manual
     2019-03-28 20:45:11   state           19.0 °C
     2019-03-28 20:45:11   temperature     21.8
   internals:
     interfaces thermostat;temperature;battery
Attributes:
   IODev      MAX_Gateway


und sofort sind wieder Reconnects im google Assistant log:
[28/03/2019, 20:41:12] [FHEM] got: 1 results
  executing: http://127.0.0.1:8083/fhem?cmd=setreading%20gassistant%20gassistant-fhem-connection%20connected&fwcsrf=myhcconnToken&XHR=1
[28/03/2019, 20:41:13] update reading: HUEDevice19:colormode = ct
[28/03/2019, 20:41:13] update reading: HUEDevice19:ct = 250 (4000K)
[28/03/2019, 20:41:13] update reading: HUEDevice19:hue = 0
[28/03/2019, 20:41:13] update reading: HUEDevice19:onoff = 0
[28/03/2019, 20:41:13] update reading: HUEDevice19:pct = 0
[28/03/2019, 20:41:13] update reading: HUEDevice19:reachable = 1
[28/03/2019, 20:41:13] update reading: HUEDevice19:rgb = ffe4ce
[28/03/2019, 20:41:13] update reading: HUEDevice19:sat = 0
  executing: http://127.0.0.1:8083/fhem?cmd=setreading%20gassistant%20gassistant-fhem-connection%20connected&fwcsrf=myhcconnToken&XHR=1
[28/03/2019, 20:41:13] update reading: HUEDevice19:colormode = ct
[28/03/2019, 20:41:13] update reading: HUEDevice19:ct = 250 (4000K)
[28/03/2019, 20:41:13] update reading: HUEDevice19:hue = 0
[28/03/2019, 20:41:13] update reading: HUEDevice19:onoff = 0
[28/03/2019, 20:41:13] update reading: HUEDevice19:pct = 0
[28/03/2019, 20:41:13] update reading: HUEDevice19:reachable = 1
[28/03/2019, 20:41:13] update reading: HUEDevice19:rgb = ffe4ce
[28/03/2019, 20:41:13] update reading: HUEDevice19:sat = 0
[28/03/2019, 20:41:13] >>> VERSION UPGRADE FINISHED - SYNC INITIATED
reportstateall initiated
reportstateall initiated
[28/03/2019, 20:42:04] [FHEM] longpoll ended, reconnect in: 200msec
[28/03/2019, 20:42:04] [FHEM] starting longpoll: http://127.0.0.1:8083/fhem?XHR=1&inform=type=status;addglobal=1;filter=.*;since=1553793751.636;fmt=JSON×tamp=1553802124608
  executing: http://127.0.0.1:8083/fhem?cmd=jsonlist2%20TYPE%3Dgassistant&fwcsrf=myhcconnToken&XHR=1
[28/03/2019, 20:42:09] [FHEM] FHEM Google Assistant device detected: gassistant
  executing: http://127.0.0.1:8083/fhem?cmd=setreading%20gassistant%20gassistant-fhem-version%201.3.0&fwcsrf=myhcconnToken&XHR=1
  executing: http://127.0.0.1:8083/fhem?cmd=set%20gassistant%20loginURL%20https%3A%2F%2Ffhemconnector.eu.auth0.com%2Fauthorize%3Faudience%3Dhttps%3A%2F%2Feurope-west1-fhem-ga-connector.cloudfunctions.net%2F%26scope%3Doffline_access%2520openid%2520profile%26response_type%3Dcode%26client_id%3DEI0TI2Y0W1743Ico53Nvsg1FsmoZniCC%26code_challenge%3DekG7pZXM3wW40JMEY-GBQGTn-wN7CykVkvv92x4porE%26code_challenge_method%3DS256%26redirect_uri%3Dhttps%3A%2F%2Feurope-west1-fhem-ga-connector.cloudfunctions.net%2Fcodelanding%2Fstart&fwcsrf=myhcconnToken&XHR=1
[28/03/2019, 20:42:09] [FHEM] Get refresh token...
  executing: http://127.0.0.1:8083/fhem?cmd=get%20gassistant%20refreshToken&fwcsrf=myhcconnToken&XHR=1
  executing: http://127.0.0.1:8083/fhem?cmd=setreading%20gassistant%20gassistant-fhem-connection%20connecting...&fwcsrf=myhcconnToken&XHR=1
[28/03/2019, 20:42:10] [FHEM] Found refresh token in reading
  executing: http://127.0.0.1:8083/fhem?cmd=setreading%20gassistant%20gassistant-fhem-versionAvailable%201.3.1&fwcsrf=myhcconnToken&XHR=1
Refresh tokens finished. Next refresh in 86400 seconds.
[28/03/2019, 20:42:12] [FHEM] refreshAllTokens executed
[28/03/2019, 20:42:13] [FHEM] Fetching FHEM devices...
[28/03/2019, 20:42:13] [FHEM] fetching: http://127.0.0.1:8083/fhem?cmd=jsonlist2%20room=30_Sprachassistent-%3E03_GoogleAssistant&fwcsrf=myhcconnToken&XHR=1
[28/03/2019, 20:42:13] [FHEM] start connection executed
  executing: http://127.0.0.1:8083/fhem?cmd=setreading%20gassistant%20gassistant-fhem-lasterror%20none&fwcsrf=myhcconnToken&XHR=1
[28/03/2019, 20:42:13] [FHEM] Checking devices and attributes...
  executing: http://127.0.0.1:8083/fhem?cmd=%7BAttrVal(%22global%22%2C%22userattr%22%2C%22%22)%7D&fwcsrf=myhcconnToken&XHR=1
[28/03/2019, 20:42:13] [FHEM] got: 1 results
[28/03/2019, 20:42:13] DynamicFunctions updated
[28/03/2019, 20:42:13] [FHEM] Supported Google Device Types: switch,outlet,light,thermostat,aircondition,airfreshener,airpurifier,blinds,camera,coffeemaker,dishwasher,dryer,fan,fireplace,heater,kettle,oven,refrigerator,scene,sprinkler,vacuum,washer
[28/03/2019, 20:42:13] SERVER FeatureLevel:{"featurelevel":2,"changelog":"implement Google Report State"}
[28/03/2019, 20:42:13] SYNC   FeatureLevel:{"featurelevel":1}
[28/03/2019, 20:42:13] >>> VERSION UPGRADE STARTED
[28/03/2019, 20:42:13] [FHEM] reloading http://127.0.0.1:8083/fhem
[28/03/2019, 20:42:13] [FHEM] Fetching FHEM devices...
[28/03/2019, 20:42:13] [FHEM] fetching: http://127.0.0.1:8083/fhem?cmd=jsonlist2%20room=30_Sprachassistent-%3E03_GoogleAssistant&fwcsrf=myhcconnToken&XHR=1
[28/03/2019, 20:42:13] [FHEM] got: 1 results
  executing: http://127.0.0.1:8083/fhem?cmd=setreading%20gassistant%20gassistant-fhem-connection%20connected&fwcsrf=myhcconnToken&XHR=1
[28/03/2019, 20:42:14] update reading: HUEDevice19:colormode = ct
[28/03/2019, 20:42:14] update reading: HUEDevice19:ct = 250 (4000K)
[28/03/2019, 20:42:14] update reading: HUEDevice19:hue = 0
[28/03/2019, 20:42:14] update reading: HUEDevice19:onoff = 0
[28/03/2019, 20:42:14] update reading: HUEDevice19:pct = 0
[28/03/2019, 20:42:14] update reading: HUEDevice19:reachable = 1
[28/03/2019, 20:42:14] update reading: HUEDevice19:rgb = ffe4ce
[28/03/2019, 20:42:14] update reading: HUEDevice19:sat = 0
  executing: http://127.0.0.1:8083/fhem?cmd=setreading%20gassistant%20gassistant-fhem-connection%20connected&fwcsrf=myhcconnToken&XHR=1
[28/03/2019, 20:42:14] update reading: HUEDevice19:colormode = ct
[28/03/2019, 20:42:14] update reading: HUEDevice19:ct = 250 (4000K)
[28/03/2019, 20:42:14] update reading: HUEDevice19:hue = 0
[28/03/2019, 20:42:14] update reading: HUEDevice19:onoff = 0
[28/03/2019, 20:42:14] update reading: HUEDevice19:pct = 0
[28/03/2019, 20:42:14] update reading: HUEDevice19:reachable = 1
[28/03/2019, 20:42:14] update reading: HUEDevice19:rgb = ffe4ce
[28/03/2019, 20:42:14] update reading: HUEDevice19:sat = 0
[28/03/2019, 20:42:14] >>> VERSION UPGRADE FINISHED - SYNC INITIATED


Sobald ich das Device wieder lösche, enden die Reconnects.

PingPong

Hmm. Also an dem hinzugefügten Device scheint es auch nicht zu liegen.
Habe mal ein anderes hinzugefügt. Auch hier tritt das gleiche Problem auf.
Ich bin mit meinem Latein am Ende :-(
Habt Ihr noch Ideen?

PingPong


Ma_Bo

Nur mal so in den Raum geworfen:
Kann es sein, das es an der Reihenfolge in der config liegt...?

Das Gateway sollte als erstes kommen, danach die Devices und dann evtl. Google Assistant
Evtl. auch ne andere Reihenfolge mal probieren...

Ist halt nur so ne Idee...
Ich weiss, dass es Probleme bei Homematic gibt, wenn das Gateway nicht vor den Devices steht, aber in wie weit das mit MAX und Google Assistant gilt...?
Eigentlich hat das eine mit dem anderen nix zu tun, aber ein Versuch ist es wert...

Grüße Marcel
NUC mit FHEM, HM Heizungsthermostate, HM Wandthermostate, Intertechno Funksteckdosen, 10" Tablet als Wanddisplay, KeyMatic, Fensterkontakte, Fensterkontakte umgebaut als Wassermelder und Briefkastenmelder, Aussenthermostat, Anwesenheitssteuerung über Fritz Box, Google Home usw. usw.

PingPong

Hallo Marcel,

danke für Deine Anregung.
Habe gerade mal durch die config geschaut. Meiner Meinung nach alles in der richtigen Reihenfolge :-(

VG
Marc