39_gassistant.pm (Google Assistant, Google Home)

Begonnen von dominik, 29 Januar 2019, 21:59:53

Vorheriges Thema - Nächstes Thema

MarvinLu

Guten Abend Dominik,
Vielen Dank für die Antwort!
Ersteres trifft zu. Ich habe bereits ein paar Geräte in meinem Assistant Konto hinterlegt (z.B. ein paar Steckdosen, einen Staubsaugerroboter,...) und frage mich jetzt ob ich diese jetzt auch über fhem steuern kann. Andersrum funktioniert es ja auch. Ich bin mir nur nicht sicher, ob fhem die Geräte vernünftig interpretieren kann..
Und noch eine weitere Frage: Gibt es eine Möglichkeit automatisch die Räume aus fhem in gHome zu übernehmen? Oder muss ich die händisch zuweisen, nachdem ich sie erfolgreich importiert habe?
Liebe Grüße und einen schönen Abend noch,
Marvin

dominik

Wenn du Geraete in Home aus anderen Systemen (Mi Home, Hue, etc.) einbindest, kannst du diese nicht aus FHEM steuern. Daher ist eher zu empfehlen alles in FHEM zu integrieren und dann mit gassistant zu Home zu verbinden.

Raeume kannst du mit dem Attribut realRoom definieren. Das Attribut wird aber nur beim ERSTEN MAL von Google ausgewertet, du musst also einmal den Account unlinken und dann wieder neu linken in der Home App.
fhempy -  https://github.com/fhempy/fhempy: GoogleCast, Tuya, UPnP, Ring, EQ3BT, Nespresso, Xiaomi, Spotify, Object Detection, ...
Kaffeespende: https://paypal.me/todominik

MarvinLu

Ersteres dachte ich mir schon. Danke trotzdem :)

Danke für den Hinweis, das werde ich mir morgen anschauen!

Liebe Grüße und danke dir!

neo_owl

Hallo Gemeinde,

erstmal vielen Dank für das tolle Modul, es funktioniert bisher sehr gut, leider bekomme ich eine Kleinigkeit nicht hin...

Der Status meiner 433 MHz Steckdosen wird nicht als Update an Google übertragen, andere Geräte wie Homematic-Schalter, Shelly oder dummys jedoch schon.
Habe schon so an ziemlich allen Attributen gedreht, bisher ohne Erfolg. Per Sprache kann ich die Geräte schalten egal welchen Status sie haben, allerdings
werden die Geräte im Home Hub falsch angezeigt.

Ich habe mal einen Screenshots eines der Geräte angehängt.

Vielen Dank im Voraus.

Gruß
    Patrick
FHEM 5.9 auf AMD C420 mit Debian Buster
433MHz Steckdosen, HomeMatic, Shelly, HUE, Zwave, TP-Link, Google Home und diverses andere

dominik

Hi,
starte bitte mal gassistant in FHEM neu. Falls das Device spaeter hinzugefuegt wurde, habe ich noch einen Bug drin, dass dann der Status nicht aktualisiert wird. Das ist mir gestern aufgefallen.
fhempy -  https://github.com/fhempy/fhempy: GoogleCast, Tuya, UPnP, Ring, EQ3BT, Nespresso, Xiaomi, Spotify, Object Detection, ...
Kaffeespende: https://paypal.me/todominik

neo_owl

#1115
Hi,

wow das war schnell, neu gestartet hatte ich schon nutzte das Modul schon ne Woche,
beim Start werden die readings übertragen...

[2019-8-8 00:13:43] [FHEM] update reading: 433_Kommode:state = off

allerdings nachher beim schalten nicht.

andere Geräte übertragen wie es sein soll...

[2019-8-8 00:17:40] [FHEM] update reading: LS_Bad_Spiegel:state = on
[2019-8-8 00:17:41] reportstate: LS_Bad_Spiegel

Gruß
   Patrick
FHEM 5.9 auf AMD C420 mit Debian Buster
433MHz Steckdosen, HomeMatic, Shelly, HUE, Zwave, TP-Link, Google Home und diverses andere

dominik

Probier mal das event-on-change-reading zu entfernen.
fhempy -  https://github.com/fhempy/fhempy: GoogleCast, Tuya, UPnP, Ring, EQ3BT, Nespresso, Xiaomi, Spotify, Object Detection, ...
Kaffeespende: https://paypal.me/todominik

neo_owl

Guten Morgen Dominik,

habe ich probiert leider ohne Erfolg, das habe ich auch nur mal zum probieren gemacht.

Meine normalen 433 sehen so aus wie in GenShellSwitch.PNG lassen sich per Sprache schalten,
leider wird wenn ich Sie anders als über Google schalte der Status nicht übertragen.

Dies geht bei dummy und z.B. Shelly Aktoren (siehe Bilder).

Mir stellt sich die Frage wie gassistent ermittelt wann und was er übertragen soll,
dann könnte ich das wenn es möglich ist einbauen oder anpassen.

Gruß
   Patrick
FHEM 5.9 auf AMD C420 mit Debian Buster
433MHz Steckdosen, HomeMatic, Shelly, HUE, Zwave, TP-Link, Google Home und diverses andere

erotikbaer

Also, hatte jetzt mal alles rebootet und gassistant-fhem in der Konsole gestartet und jetzt kommt eine Fehlermeldung.
Loading cli.js...
Loading version.js...
Loading server.js...
Loading user.js...
Loading logger.js...
Loading fhem.js...
Loading database.js...
/usr/local/lib/node_modules/gassistant-fhem/node_modules/vm2/lib/main.js:451
throw this._internal.Decontextify.value(e);
^

Error: Failed to load gRPC binary module because it was not installed for the current system
Expected directory: node-v57-freebsd-x64-unknown
Found: [node-v67-freebsd-x64-unknown]
This problem can often be fixed by running "npm rebuild" on the current system
Original error: Cannot find module '/usr/local/lib/node_modules/gassistant-fhem/node_modules/grpc/src/node/extension_binary/node-v57-freebsd-x64-unknown/grpc_node.node'
    at Object.<anonymous> (/usr/local/lib/node_modules/gassistant-fhem/node_modules/grpc/src/grpc_extension.js:53:17)
    at Module._compile (module.js:653:30)
    at Object.Module._extensions..js (module.js:664:10)
    at Module.load (module.js:566:32)
    at tryModuleLoad (module.js:506:12)
    at Function.Module._load (module.js:498:3)
    at Module.require (module.js:597:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/gassistant-fhem/node_modules/grpc/src/client_interceptors.js:144:12)
    at Module._compile (module.js:653:30)


Das schaue ich mir nun mal an, wenn jemand eine Idee für die Lösung hat, gern her damit :-)

Gesendet von meinem SM-N950F mit Tapatalk


erotikbaer

Habe jetzt im gassistant-fhem Verzeichnis ein npm rebuild gemacht, das läuft dann eine Weile und dann kommt:
  CXX(target) Release/obj.target/grpc_node/ext/byte_buffer.o
error: unknown warning option '-Wno-cast-function-type'; did you mean
      '-Wno-bad-function-cast'? [-Werror,-Wunknown-warning-option]
gmake: *** [grpc_node.target.mk:180: Release/obj.target/grpc_node/ext/byte_buffer.o] Error 1
gmake: Leaving directory '/usr/local/lib/node_modules/gassistant-fhem/node_modules/grpc/build'
gyp ERR! build error
gyp ERR! stack Error: `gmake` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at emitTwo (events.js:126:13)
gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System FreeBSD 11.2-STABLE
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--library=static_library" "--module=/usr/local/lib/node_modules/gassistant-fhem/node_modules/grpc/src/node/extension_binary/node-v57-freebsd-x64-unknown/grpc_node.node" "--module_name=grpc_node" "--module_path=/usr/local/lib/node_modules/gassistant-fhem/node_modules/grpc/src/node/extension_binary/node-v57-freebsd-x64-unknown" "--napi_version=4" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v57"
gyp ERR! cwd /usr/local/lib/node_modules/gassistant-fhem/node_modules/grpc
gyp ERR! node -v v8.16.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --library=static_library --module=/usr/local/lib/node_modules/gassistant-fhem/node_modules/grpc/src/node/extension_binary/node-v57-freebsd-x64-unknown/grpc_node.node --module_name=grpc_node --module_path=/usr/local/lib/node_modules/gassistant-fhem/node_modules/grpc/src/node/extension_binary/node-v57-freebsd-x64-unknown --napi_version=4 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v57' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/gassistant-fhem/node_modules/grpc/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at emitTwo (events.js:126:13)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:915:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
node-pre-gyp ERR! System FreeBSD 11.2-STABLE
node-pre-gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/gassistant-fhem/node_modules/grpc/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" "--library=static_library"
node-pre-gyp ERR! cwd /usr/local/lib/node_modules/gassistant-fhem/node_modules/grpc
node-pre-gyp ERR! node -v v8.16.0
node-pre-gyp ERR! node-pre-gyp -v v0.12.0
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --library=static_library --module=/usr/local/lib/node_modules/gassistant-fhem/node_modules/grpc/src/node/extension_binary/node-v57-freebsd-x64-unknown/grpc_node.node --module_name=grpc_node --module_path=/usr/local/lib/node_modules/gassistant-fhem/node_modules/grpc/src/node/extension_binary/node-v57-freebsd-x64-unknown --napi_version=4 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v57' (1)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! grpc@1.20.0 install: `node-pre-gyp install --fallback-to-build --library=static_library`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the grpc@1.20.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2019-08-08T22_18_56_412Z-debug.log


Gesendet von meinem SM-N950F mit Tapatalk


dominik

Versuch mal remove grpc und gassistant-fhem und dann gassistant-fhem wieder installieren. Die grpc Binary passt nicht, wenn das nicht geht, dann
https://wiki.fhem.de/wiki/Google_Assistant_FHEM_Connect#FAQs
Fort die erste Antwort zu RPi Zero.

@Patrick, da muss ich noch genauer schauen. Mach ich am Wochenende und melde mich dann.
fhempy -  https://github.com/fhempy/fhempy: GoogleCast, Tuya, UPnP, Ring, EQ3BT, Nespresso, Xiaomi, Spotify, Object Detection, ...
Kaffeespende: https://paypal.me/todominik

neo_owl

Hi Dominik,

wäre super wenn du da was findest, vielleicht klappt das ja ohne das ich die ganze Geräte auf ein dummy umbauen muss.

Gruß
   Patrick
FHEM 5.9 auf AMD C420 mit Debian Buster
433MHz Steckdosen, HomeMatic, Shelly, HUE, Zwave, TP-Link, Google Home und diverses andere

dominik

Kannst du mal das Device umbenennen damit 433 nicht vorne dran steht. Ist aktuell der einzige Unterschied den ich sehe.
fhempy -  https://github.com/fhempy/fhempy: GoogleCast, Tuya, UPnP, Ring, EQ3BT, Nespresso, Xiaomi, Spotify, Object Detection, ...
Kaffeespende: https://paypal.me/todominik

neo_owl

Hallo,

das hat leider nichts gebracht, habe mal ein Workarround versucht ich habe ein dummy im Raum GoogleAssistant angelegt und schalte das richtige device mit DOIF
dann wird der Status korrekt übermittelt.

[2019-8-10 14:36:02] [FHEM] update reading: 433_Kommode:state = on
[2019-8-10 14:36:03] reportstate: 433_Kommode

Damit ist das Modul für mich jetzt voll und ganz nutzbar. Muss halt nur ein paar Geräte anpassen.

Vielen Dank für die Mühe und das tolle Modul.
FHEM 5.9 auf AMD C420 mit Debian Buster
433MHz Steckdosen, HomeMatic, Shelly, HUE, Zwave, TP-Link, Google Home und diverses andere

MarvinLu

#1124
Hallo Dominik,
ich bräuchte nochmal deine Hilfe..

Zitat von: dominik am 07 August 2019, 23:10:48
Wenn du Geraete in Home aus anderen Systemen (Mi Home, Hue, etc.) einbindest, kannst du diese nicht aus FHEM steuern. Daher ist eher zu empfehlen alles in FHEM zu integrieren und dann mit gassistant zu Home zu verbinden.

Raeume kannst du mit dem Attribut realRoom definieren. Das Attribut wird aber nur beim ERSTEN MAL von Google ausgewertet, du musst also einmal den Account unlinken und dann wieder neu linken in der Home App.

Und zwar geht es um 2 Dinge:

  • Die Erkennung in gHome des realRooms funktioniert nicht. Der Raum wird leider nicht in der App angelegt. Kannst du anhand des Gerätes (siehe list) erkennen, was ich falsch gemacht habe?
  • Das Thermostat (Soll- und Ist-Temperatur über einen Dummy abgefragt und beeinflusst) wird in der App nicht als Thermostat angezeigt, sondern als Schalter. Eine Verbindung kommt leider auch nicht zustande.. Der Assistens sagt dazu: gassistant-fhem-lastServerError No mappings (e.g. on/off) found for thermostat_SZ

List des Thermostates:

Internals:
   DEF       
   FUUID      5d505c92-f33f-dc26-aa21-1850be6ef8e8d458
   NAME       thermostat_SZ
   NR         144
   STATE      24.3 °C
   TYPE       dummy
   READINGS:
     2019-08-11 22:05:27   ist-temp        24.3
     2019-08-11 22:00:14   soll-temp       23.0
Attributes:
   genericDeviceType thermostat
   group      Heizung
   icon       sani_heating
   readingList ist-temp soll-temp
   realRoom   Schlafzimmer
   room       2_Schlafzimmer,GoogleAssistant
   setList    soll-temp:slider,5,0.5,30,1
   stateFormat {sprintf("%.1f"." °C",ReadingsVal("thermostat_SZ","ist-temp",0))}
   webCmd     soll-temp


List des Assistenten:
Internals:
   FD         35
   FUUID      5d4b034e-f33f-dc26-33bc-9b0ed1a702b6720a
   LAST_START 2019-08-11 21:45:09
   LAST_STOP  2019-08-11 21:45:09
   NAME       gassistant
   NOTIFYDEV  global,global:npmjs.*gassistant-fhem.*
   NR         139
   NTFY_ORDER 50-gassistant
   PID        4639
   STARTS     2
   STATE      running /usr/bin/gassistant-fhem
   TYPE       gassistant
   currentlogfile ./log/gassistant-2019-08-12.log
   logfile    ./log/gassistant-%Y-%m-%d.log
   CoProcess:
     cmdFn      gassistant_getCMD
     name       gassistant-fhem
     state      running /usr/bin/gassistant-fhem
   READINGS:
     2019-08-11 21:45:09   gassistant-fhem running /usr/bin/gassistant-fhem
     2019-08-12 07:46:39   gassistant-fhem-connection connected
     2019-08-12 07:47:45   gassistant-fhem-googleSync Google SYNC finished
     2019-08-12 07:46:36   gassistant-fhem-lastServerError No mappings (e.g. on/off) found for thermostat_SZ
     2019-08-11 21:45:19   gassistant-fhem-lasterror none
     2019-08-07 19:25:48   gassistant-fhem-uid google-oauth2|115970530198450915559
     2019-08-12 07:47:45   gassistant-fhem-usedFeatureLevel 3
     2019-08-11 21:45:15   gassistant-fhem-version 2.0.0
     2019-08-11 21:45:15   gassistant-fhem-versionAvailable 2.0.0
     2019-08-11 21:45:15   gassistantFHEM.loginURL <html><a href="https://fhemconnector.eu.auth0.com/authorize?audience=https://europe-west1-fhem-ga-connector.cloudfunctions.net/&scope=offline_access%20openid%20profile&response_type=code&client_id=EI0TI2Y0W1743Ico53Nvsg1FsmoZniCC&code_challenge=NAUaYhLdGk45jdda2ixNX5nYSVo4udHeuUbgbsrJM00&code_challenge_method=S256&redirect_uri=https://europe-west1-fhem-ga-connector.cloudfunctions.net/codelanding/start" target="_blank">Click here to login (new window/tab)</a><br></html>
     2019-08-07 19:25:47   gassistantFHEM.refreshToken crypt:054527236c325e55001c065d5a101c233117362d0844560c614854045e0e45534161332d7f2d5c405b3e730c1d
Attributes:
   devStateIcon stopped:control_home@red:start stopping:control_on_off@orange running.*:control_on_off@green:stop
   gassistantFHEM-auth crypt:7b5311125c0d7b4d0c2e5905020142090300031b43
   gassistantFHEM-config ./gassistant-fhem.cfg
   gassistantFHEM-log ./log/gassistant-%Y-%m-%d.log
   nrarchive  10
   room       GoogleAssistant
   stateFormat gassistant-fhem


EDIT
Den Fehler bei der Erkennung des realRooms habe ich gestern noch gefunden, das funktioniert jetzt.

Für deine Hilfe wäre ich dir sehr dankbar!

Liebe Grüße,
Marvin