39_gassistant.pm (Google Assistant, Google Home)

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

Vorheriges Thema - Nächstes Thema

lucca111

Hallo nochmal,

ich habe jetzt eine zweite Installation auf ein neues Gerät zum testen gemacht. Also wie im Wiki alles nochmal von vorn.
Ich hatte bei der Installation des gassistanten auch die Warnungen das einige Sachen deprecated sind. Dies ist aber nicht das Problem.
Fehler sind dabei keine aufgetreten. Im Raum GoggleAssistant war nur automatisch das dummy Testlight.
Hurra, es wurde auch in der HandApp angezeigt. Jetzt funktioniert bei mir wieder alles. Auch der Fehler "ERROR: https://europe-west1-fhem-ga-connector.cloudfunctions.net/api/3.0/genmappings => 500:"
taucht nicht mehr auf. Ich hoffe es hilft jemanden weiter.
Schöne Weihnachten Lucca

Gisbert

#2926
Dieser Beitrag hat sich erledigt

Frohe Weihnachten Dominik,

gassistant hat bei mir den Dienst quittiert - ich bin ratlos, was ich jetzt machen kann.
Das Reading gassistant-fhem wechselt kurz in running ..., nur um in der nächsten Sekunde stopped anzuzeigen.

Ich hab dann gassistant gelöscht, rereadcfg durchgeführt und gassistant neu definiert - leider ohne Erfolg.

Unter Punkt 6 steht:
ZitatCa. 30s warten bis ein Reading gassistantFHEM.loginURL erscheint. Wenn der Link nicht erscheint, dann bitte im Log nachsehen woran es liegt (/opt/fhem/log/gassistant-fhem-*). Gerne dann im Forum posten wenn du nicht weiter kommst.
Es erscheint kein Reading, jedenfalls keins mit sinnvolem Inhalt.

logfile:
Loading cli.js...
Loading version.js...
Loading server.js...
Loading user.js...
Loading logger.js...
Loading fhem.js...
Loading database.js...
Loading localhandleQUERY.js...
Loading utils.js...
Loading localserver.js...
Loading localhandleEXECUTE.js...
[12/25/2022, 12:59:16 PM] using ./gassistant-fhem.cfg
[12/25/2022, 12:59:16 PM] There was a problem reading your config.json file.
[12/25/2022, 12:59:16 PM] Please try pasting your config.json file here to validate it: http://jsonlint.com
[12/25/2022, 12:59:16 PM]

/usr/lib/node_modules/gassistant-fhem/node_modules/vm2/lib/contextify.js:230
throw Decontextify.value(e);
^
SyntaxError [Error]: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at Server._loadConfig (/usr/lib/node_modules/gassistant-fhem/lib/remote-server.js:50:21)
    at new Server (/usr/lib/node_modules/gassistant-fhem/lib/remote-server.js:24:23)
    at Object.base.construct (/usr/lib/node_modules/gassistant-fhem/node_modules/vm2/lib/contextify.js:237:33)
    at Object.base.construct (/usr/lib/node_modules/gassistant-fhem/node_modules/vm2/lib/contextify.js:635:31)
    at module.exports (/usr/lib/node_modules/gassistant-fhem/lib/remote-cli.js:29:16)
    at Object.base.apply (/usr/lib/node_modules/gassistant-fhem/node_modules/vm2/lib/contextify.js:228:34)
    at /usr/lib/node_modules/gassistant-fhem/bin/gassistant-fhem:40:26
    at /usr/lib/node_modules/gassistant-fhem/node_modules/ps-node/lib/index.js:183:7
    at ChildProcess.<anonymous> (/usr/lib/node_modules/gassistant-fhem/node_modules/ps-node/lib/index.js:97:9)


ein list:
define gassistant gassistant
attr gassistant devStateIcon { my $error = ReadingsVal($name,"gassistant-fhem-lastServerError","none") eq "none"?"10px-kreis-gruen":"10px-kreis-rot";;;; my $onoff = substr(ReadingsVal($name, "gassistant-fhem", "running"),0,7) eq "running"?"control_on_off\@green":"control_on_off\@red";;;; my $reload = ReadingsVal($name, "gassistant-fhem-connection", "connected") eq "connected"?"audio_repeat\@green":"audio_repeat\@orange";;;;"<div><a>".FW_makeImage($error)."</a> <a href=\"/fhem?cmd.dummy=set $name reload&XHR=1\">".FW_makeImage($reload, "reload")."</a><a href=\"/fhem?cmd.dummy=set $name restart&XHR=1\">&nbsp;;&nbsp;;".FW_makeImage($onoff, "restart")."</a></div>"}
attr gassistant gassistantFHEM-config ./gassistant-fhem.cfg
attr gassistant gassistantFHEM-log ./log/gassistant-%Y-%m-%d.log
attr gassistant icon gassistant
attr gassistant nrarchive 10
attr gassistant room GoogleAssistant
attr gassistant stateFormat gassistant-fhem-connection
#   CFGFN     
#   FUUID      63a839c6-f33f-e986-49c8-14284778971dcfdc
#   LAST_START 2022-12-25 13:19:37
#   LAST_STOP  2022-12-25 13:19:40
#   NAME       gassistant
#   NOTIFYDEV  global,global:npmjs.*gassistant-fhem.*
#   NR         1352
#   NTFY_ORDER 50-gassistant
#   STARTS     58
#   STATE      gassistant-fhem-connection
#   TYPE       gassistant
#   eventCount 120
#   logfile    ./log/gassistant-%Y-%m-%d.log
#   CoProcess:
#     cmdFn      gassistant_getCMD
#     name       gassistant-fhem
#     state      stopped
#   READINGS:
#     2022-12-25 13:19:40   gassistant-fhem stopped
#     2022-12-25 12:58:03   gassistantFHEM.loginURL Waiting for login url from gassistant-fhem
#     2022-12-25 12:53:42   gassistantFHEM.refreshToken crypt:536b7d09423468525f674265781c667e616e576a0a054828001c415250606b5b696c7a5d040a5a57647353626e
#   helper:
#     bm:
#       gassistant_Attr:
#         cnt        6
#         dmx        -1000
#         dtot       0
#         dtotcnt    0
#         mTS        25.12. 12:53:42
#         max        0.094785213470459
#         tot        0.0949337482452393
#         mAr:
#           set
#           gassistant
#           gassistantFHEM-log
#           ./log/gassistant-%Y-%m-%d.log
#       gassistant_Define:
#         cnt        1
#         dmx        -1000
#         dtot       0
#         dtotcnt    0
#         mTS        25.12. 12:53:43
#         max        0.619142055511475
#         tot        0.619142055511475
#         mAr:
#           HASH(0x55f8943fabe8)
#           gassistant gassistant
#       gassistant_Get:
#         cnt        5
#         dmx        -1000
#         dtot       0
#         dtotcnt    0
#         mTS        25.12. 12:53:43
#         max        4.41074371337891e-05
#         tot        0.000143051147460938
#         mAr:
#           HASH(0x55f8943fabe8)
#           gassistant
#           ?
#       gassistant_Notify:
#         cnt        3
#         dmx        -1000
#         dtot       0
#         dtotcnt    0
#         mTS        25.12. 12:57:03
#         max        3.40938568115234e-05
#         tot        9.20295715332031e-05
#         mAr:
#           HASH(0x55f8943fabe8)
#           HASH(0x55f891f86f20)
#       gassistant_Read:
#         cnt        976
#         dmx        -1000
#         dtot       0
#         dtotcnt    0
#         mTS        25.12. 12:58:04
#         max        0.173074007034302
#         tot        2.53676629066467
#         mAr:
#           HASH(0x55f8943fabe8)
#       gassistant_Set:
#         cnt        45
#         dmx        -1000
#         dtot       0
#         dtotcnt    0
#         mTS        25.12. 12:58:03
#         max        0.128221035003662
#         tot        0.130505323410034
#         mAr:
#           HASH(0x55f8943fabe8)
#           gassistant
#           restart
#
setstate gassistant gassistant-fhem-connection
setstate gassistant 2022-12-25 13:19:40 gassistant-fhem stopped
setstate gassistant 2022-12-25 12:58:03 gassistantFHEM.loginURL Waiting for login url from gassistant-fhem
setstate gassistant 2022-12-25 12:53:42 gassistantFHEM.refreshToken crypt:536b7d09423468525f674265781c667e616e576a0a054828001c415250606b5b696c7a5d040a5a57647353626e


Viele Grüße Gisbert
Aktuelles FHEM | PROXMOX | Fujitsu Futro S740 | Debian 12 | UniFi | Homematic, VCCU, HMUART | ESP8266 | ATtiny85 | Wasser-, Stromzähler | Wlan-Kamera | SIGNALduino, Flamingo Rauchmelder FA21/22RF | RHASSPY

Gisbert

#2927
Dieser Beitrag hat sich ebensfalls erledigt.

Hallo Dominik,

ich hab gassistant gelöscht, alle log-files gelöscht, Fhem neu gestartet und gassistant neu definiert.
Die Punkte 1-9 im Wiki habe ich befolgt und in Fhem sieht eigentlich alles gut aus.
Allerdings taucht das definierte dummy device nicht in Home Assistant auf.

In Home Assitant ist "Mit mir verknüpft": gassistant. Klickt man drauf steht: "Reagiert nicht" und "Offline"

Hier ist der log-file:
Loading cli.js...
Loading version.js...
Loading server.js...
Loading user.js...
Loading logger.js...
Loading fhem.js...
Loading database.js...
Loading localhandleQUERY.js...
Loading utils.js...
Loading localserver.js...
Loading localhandleEXECUTE.js...
[12/26/2022, 7:48:47 AM] using ./gassistant-fhem.cfg
[12/26/2022, 7:48:47 AM] ---
[12/26/2022, 7:48:47 AM] config:
{"gassistant":{"description":"FHEM Connect"},"connections":[{"name":"FHEM","server":"127.0.0.1","port":"8083","webname":"fhem","filter":"room=GoogleAssistant"}]}
[12/26/2022, 7:48:47 AM] ---
[12/26/2022, 7:48:47 AM] Google Assistant FHEM Connect 3.0.4 started
[12/26/2022, 7:48:47 AM] Fetching FHEM connections...
[12/26/2022, 7:48:47 AM] [FHEM] starting longpoll: https://127.0.0.1:8083/fhem?XHR=1&inform=type=status;addglobal=1;filter=.*;since=null;fmt=JSON×tamp=1672037327587
(node:447596) Warning: Accessing non-existent property '_system' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
[12/26/2022, 7:48:48 AM] [FHEM] longpoll error: Error: self signed certificate, retry in: 5000msec
[12/26/2022, 7:48:53 AM] [FHEM] starting longpoll: https://127.0.0.1:8083/fhem?XHR=1&inform=type=status;addglobal=1;filter=.*;since=null;fmt=JSON×tamp=1672037333115
[12/26/2022, 7:48:53 AM] [FHEM] longpoll error: Error: self signed certificate, retry in: 10000msec
[12/26/2022, 7:49:03 AM] [FHEM] starting longpoll: https://127.0.0.1:8083/fhem?XHR=1&inform=type=status;addglobal=1;filter=.*;since=null;fmt=JSON×tamp=1672037343162
[12/26/2022, 7:49:03 AM] [FHEM] longpoll error: Error: self signed certificate, retry in: 15000msec
[12/26/2022, 7:49:18 AM] [FHEM] starting longpoll: https://127.0.0.1:8083/fhem?XHR=1&inform=type=status;addglobal=1;filter=.*;since=null;fmt=JSON×tamp=1672037358206
[12/26/2022, 7:49:18 AM] [FHEM] longpoll error: Error: self signed certificate, retry in: 20000msec
[12/26/2022, 7:49:38 AM] [FHEM] starting longpoll: https://127.0.0.1:8083/fhem?XHR=1&inform=type=status;addglobal=1;filter=.*;since=null;fmt=JSON×tamp=1672037378255
[12/26/2022, 7:49:38 AM] [FHEM] longpoll error: Error: self signed certificate, retry in: 25000msec
[12/26/2022, 7:50:03 AM] [FHEM] starting longpoll: https://127.0.0.1:8083/fhem?XHR=1&inform=type=status;addglobal=1;filter=.*;since=null;fmt=JSON×tamp=1672037403305
[12/26/2022, 7:50:03 AM] [FHEM] longpoll error: Error: self signed certificate, retry in: 30000msec
[12/26/2022, 7:50:33 AM] [FHEM] starting longpoll: https://127.0.0.1:8083/fhem?XHR=1&inform=type=status;addglobal=1;filter=.*;since=null;fmt=JSON×tamp=1672037433357
[12/26/2022, 7:50:33 AM] [FHEM] longpoll error: Error: self signed certificate, retry in: 30000msec
[12/26/2022, 7:51:03 AM] [FHEM] starting longpoll: https://127.0.0.1:8083/fhem?XHR=1&inform=type=status;addglobal=1;filter=.*;since=null;fmt=JSON×tamp=1672037463422
[12/26/2022, 7:51:03 AM] [FHEM] longpoll error: Error: self signed certificate, retry in: 30000msec
[12/26/2022, 7:51:33 AM] [FHEM] starting longpoll: https://127.0.0.1:8083/fhem?XHR=1&inform=type=status;addglobal=1;filter=.*;since=null;fmt=JSON×tamp=1672037493490
[12/26/2022, 7:51:33 AM] [FHEM] longpoll error: Error: self signed certificate, retry in: 30000msec
[12/26/2022, 7:51:42 AM] Got SIGTERM, shutting down...
Loading cli.js...
Loading version.js...
Loading server.js...
Loading user.js...
Loading logger.js...
Loading fhem.js...
Loading database.js...
Loading localhandleQUERY.js...
Loading utils.js...
Loading localserver.js...
Loading localhandleEXECUTE.js...
[12/26/2022, 7:51:45 AM] using ./gassistant-fhem.cfg
[12/26/2022, 7:51:45 AM] ---
[12/26/2022, 7:51:45 AM] config:
{"gassistant":{"description":"FHEM Connect"},"connections":[{"name":"FHEM","server":"127.0.0.1","port":"8083","webname":"fhem","filter":"room=GoogleAssistant"}]}
[12/26/2022, 7:51:45 AM] ---
[12/26/2022, 7:51:45 AM] Google Assistant FHEM Connect 3.0.4 started
[12/26/2022, 7:51:45 AM] Fetching FHEM connections...
[12/26/2022, 7:51:45 AM] [FHEM] starting longpoll: https://127.0.0.1:8083/fhem?XHR=1&inform=type=status;addglobal=1;filter=.*;since=null;fmt=JSON×tamp=1672037505918
(node:447738) Warning: Accessing non-existent property '_system' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
[12/26/2022, 7:51:46 AM] [FHEM]   executing: https://127.0.0.1:8083/fhem?cmd=jsonlist2%20TYPE%3Dgassistant&fwcsrf=csrf_147963372645083&XHR=1
[12/26/2022, 7:51:46 AM] [FHEM] FHEM Google Assistant device detected: gassistant
[12/26/2022, 7:51:46 AM] [FHEM]   executing: https://127.0.0.1:8083/fhem?cmd=setreading%20gassistant%20gassistant-fhem-version%203.0.4&fwcsrf=csrf_147963372645083&XHR=1
[12/26/2022, 7:51:46 AM] [FHEM]   executing: https://127.0.0.1:8083/fhem?cmd=setreading%20gassistant%20gassistant-fhem-lastServerError%20none&fwcsrf=csrf_147963372645083&XHR=1
[12/26/2022, 7:51:46 AM] [FHEM]   executing: https://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%3D2J5CtURs5eJB8Vn--ddWijNWCt_JYHFpoH71b9oDziY%26code_challenge_method%3DS256%26redirect_uri%3Dhttps%3A%2F%2Feurope-west1-fhem-ga-connector.cloudfunctions.net%2Fcodelanding%2Fstart&fwcsrf=csrf_147963372645083&XHR=1
[12/26/2022, 7:51:46 AM] [FHEM] Get refresh token...
[12/26/2022, 7:51:46 AM] [FHEM]   executing: https://127.0.0.1:8083/fhem?cmd=get%20gassistant%20refreshToken&fwcsrf=csrf_147963372645083&XHR=1
[12/26/2022, 7:51:47 AM] [FHEM]   executing: https://127.0.0.1:8083/fhem?cmd=setreading%20gassistant%20gassistant-fhem-connection%20connecting...&fwcsrf=csrf_147963372645083&XHR=1
[12/26/2022, 7:51:47 AM] [FHEM] Found refresh token in reading
[12/26/2022, 7:51:47 AM] [FHEM]   executing: https://127.0.0.1:8083/fhem?cmd=setreading%20gassistant%20gassistant-fhem-versionAvailable%203.0.5&fwcsrf=csrf_147963372645083&XHR=1
[12/26/2022, 7:51:48 AM] Refresh tokens finished. Next refresh in 86400 seconds.
[12/26/2022, 7:51:48 AM] [FHEM] refreshAllTokens executed
[12/26/2022, 7:51:49 AM] Start Connection and listen for Firebase
[12/26/2022, 7:51:49 AM] [FHEM]   executing: https://127.0.0.1:8083/fhem?cmd=setreading%20gassistant%20gassistant-fhem-localHome%20inactive&fwcsrf=csrf_147963372645083&XHR=1
[12/26/2022, 7:51:50 AM] [LOCAL] FHEM Connect Google local home server running on port 37000
[12/26/2022, 7:51:50 AM] [FHEM] Fetching FHEM devices...
[12/26/2022, 7:51:50 AM] [FHEM] fetching: https://127.0.0.1:8083/fhem?cmd=jsonlist2%20room=GoogleAssistant&fwcsrf=csrf_147963372645083&XHR=1
[12/26/2022, 7:51:51 AM] [FHEM]   executing: https://127.0.0.1:8083/fhem?cmd=setreading%20gassistant%20gassistant-fhem-lasterror%20none&fwcsrf=csrf_147963372645083&XHR=1
[12/26/2022, 7:51:51 AM] [FHEM] Checking devices and attributes...
[12/26/2022, 7:51:51 AM] [FHEM]   executing: https://127.0.0.1:8083/fhem?cmd=%7BAttrVal(%22global%22%2C%22userattr%22%2C%22%22)%7D&fwcsrf=csrf_147963372645083&XHR=1
[12/26/2022, 7:51:51 AM] [FHEM] Connection: OK
[12/26/2022, 7:51:51 AM] SERVER FeatureLevel:{"featurelevel":3,"changelog":"performance optimizations"}
[12/26/2022, 7:51:51 AM] SYNC   FeatureLevel:{"featurelevel":3}
[12/26/2022, 7:51:51 AM] [LOCAL] Bonjour successfully published
[12/26/2022, 7:51:51 AM] [LOCAL] Local Home ready
[12/26/2022, 7:51:51 AM] [FHEM] got: 1 results
[12/26/2022, 7:51:51 AM] [FHEM] Supported Google Device Types: aircondition,coffeemaker,ac_unit,aircooler,airfreshener,airpurifier,audio_video_receiver,awning,bathtub,bed,blender,blinds,boiler,camera,carbon_monoxide_detector,charger,closet,coffee_maker,cooktop,curtain,dehumidifier,dehydrator,dishwasher,door,drawer,dryer,fan,faucet,fireplace,freezer,fryer,garage,gate,grill,heater,hood,humidifier,kettle,light,lock,remotecontrol,mop,mower,microwave,multicooker,network,outlet,oven,pergola,petfeeder,pressurecooker,radiator,refrigerator,router,scene,sensor,securitysystem,settop,shutter,shower,smoke_detector,sousvide,speaker,streaming_box,streaming_stick,streaming_soundbar,soundbar,sprinkler,standmixer,switch,tv,thermostat,vacuum,valve,washer,waterheater,waterpurifier,watersoftener,window,yogurtmaker
[12/26/2022, 7:51:52 AM] [FHEM]   executing: https://127.0.0.1:8083/fhem?cmd=setreading%20gassistant%20gassistant-fhem-connection%20connected&fwcsrf=csrf_147963372645083&XHR=1
[12/26/2022, 7:51:52 AM] GOOGLE MSG RECEIVED: {"msg":"UPDATE_SYNCFEATURELEVEL","featurelevel":3,"ts":1672037512383}
[12/26/2022, 7:51:52 AM] Received firestore2fhem: {"msg":"UPDATE_SYNCFEATURELEVEL","featurelevel":3,"ts":1672037512383}
[12/26/2022, 7:51:52 AM] [FHEM]   executing: https://127.0.0.1:8083/fhem?cmd=setreading%20gassistant%20gassistant-fhem-usedFeatureLevel%203&fwcsrf=csrf_147963372645083&XHR=1
[12/26/2022, 7:51:52 AM] [FHEM]   executing: https://127.0.0.1:8083/fhem?cmd=setreading%20gassistant%20gassistant-fhem-googleSync%20Google%20SYNC%20finished&fwcsrf=csrf_147963372645083&XHR=1
[12/26/2022, 7:58:50 AM] GOOGLE MSG RECEIVED: {"msg":"UPDATE_SYNCFEATURELEVEL","ts":1672037930321,"featurelevel":3}
[12/26/2022, 7:58:50 AM] Received firestore2fhem: {"msg":"UPDATE_SYNCFEATURELEVEL","ts":1672037930321,"featurelevel":3}
[12/26/2022, 7:58:50 AM] [FHEM]   executing: https://127.0.0.1:8083/fhem?cmd=setreading%20gassistant%20gassistant-fhem-usedFeatureLevel%203&fwcsrf=csrf_147963372645083&XHR=1
[12/26/2022, 7:58:50 AM] [FHEM]   executing: https://127.0.0.1:8083/fhem?cmd=setreading%20gassistant%20gassistant-fhem-googleSync%20Google%20SYNC%20finished&fwcsrf=csrf_147963372645083&XHR=1
[12/26/2022, 8:00:09 AM] GOOGLE MSG RECEIVED: {"ts":1672038009533,"msg":"UPDATE_SYNCFEATURELEVEL","featurelevel":3}
[12/26/2022, 8:00:09 AM] Received firestore2fhem: {"ts":1672038009533,"msg":"UPDATE_SYNCFEATURELEVEL","featurelevel":3}
[12/26/2022, 8:00:09 AM] [FHEM]   executing: https://127.0.0.1:8083/fhem?cmd=setreading%20gassistant%20gassistant-fhem-usedFeatureLevel%203&fwcsrf=csrf_147963372645083&XHR=1
[12/26/2022, 8:00:09 AM] [FHEM]   executing: https://127.0.0.1:8083/fhem?cmd=setreading%20gassistant%20gassistant-fhem-googleSync%20Google%20SYNC%20finished&fwcsrf=csrf_147963372645083&XHR=1


Das ist das gassistant-list:
define gassistant gassistant
attr gassistant devStateIcon { my $error = ReadingsVal($name,"gassistant-fhem-lastServerError","none") eq "none"?"10px-kreis-gruen":"10px-kreis-rot";;;; my $onoff = substr(ReadingsVal($name, "gassistant-fhem", "running"),0,7) eq "running"?"control_on_off\@green":"control_on_off\@red";;;; my $reload = ReadingsVal($name, "gassistant-fhem-connection", "connected") eq "connected"?"audio_repeat\@green":"audio_repeat\@orange";;;;"<div><a>".FW_makeImage($error)."</a> <a href=\"/fhem?cmd.dummy=set $name reload&XHR=1\">".FW_makeImage($reload, "reload")."</a><a href=\"/fhem?cmd.dummy=set $name restart&XHR=1\">&nbsp;;&nbsp;;".FW_makeImage($onoff, "restart")."</a></div>"}
attr gassistant gassistantFHEM-auth crypt:51514a57015c42005a524b0702
attr gassistant gassistantFHEM-config ./gassistant-fhem.cfg
attr gassistant gassistantFHEM-log ./log/gassistant-%Y-%m-%d.log
attr gassistant icon gassistant
attr gassistant nrarchive 10
attr gassistant room GoogleAssistant
attr gassistant stateFormat gassistant-fhem-connection
#   CFGFN      ./FHEM/mygassistant.cfg
#   FUUID      63a943cb-f33f-e986-9a98-662e96b1c90ed3a8
#   NAME       gassistant
#   NOTIFYDEV  global,global:npmjs.*gassistant-fhem.*
#   NR         1282
#   NTFY_ORDER 50-gassistant
#   STATE      active
#   TYPE       gassistant
#   eventCount 6
#   logfile    ./log/gassistant-%Y-%m-%d.log
#   CoProcess:
#     cmdFn      gassistant_getCMD
#     name       gassistant-fhem
#   READINGS:
#     2022-12-26 07:51:42   gassistant-fhem running /usr/bin/gassistant-fhem
#     2022-12-26 07:51:52   gassistant-fhem-connection connected
#     2022-12-26 08:00:09   gassistant-fhem-googleSync Google SYNC finished
#     2022-12-26 07:51:47   gassistant-fhem-lastServerError none
#     2022-12-26 07:51:51   gassistant-fhem-lasterror none
#     2022-12-26 07:51:50   gassistant-fhem-localHome inactive
#     2022-12-26 08:00:09   gassistant-fhem-usedFeatureLevel 3
#     2022-12-26 07:51:47   gassistant-fhem-version 3.0.4
#     2022-12-26 07:51:48   gassistant-fhem-versionAvailable 3.0.5
#     2022-12-26 07:51:47   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=2J5CtURs5eJB8Vn--ddWijNWCt_JYHFpoH71b9oDziY&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>
#     2022-12-26 07:48:43   gassistantFHEM.refreshToken crypt:536b7d09423468525f674265781c667e616e576a0a054828001c415250606b5b696c7a5d040a5a57647353626e
#   helper:
#     bm:
#       gassistant_Attr:
#         cnt        13
#         dmx        -1000
#         dtot       0
#         dtotcnt    0
#         mTS        26.12. 08:06:17
#         max        0.00234389305114746
#         tot        0.00391340255737305
#         mAr:
#           set
#           gassistant
#           gassistantFHEM-log
#           ./log/gassistant-%Y-%m-%d.log
#       gassistant_Define:
#         cnt        1
#         dmx        -1000
#         dtot       0
#         dtotcnt    0
#         mTS        26.12. 08:06:17
#         max        0.00391817092895508
#         tot        0.00391817092895508
#         mAr:
#           HASH(0x5560f02ff8d8)
#           gassistant gassistant
#       gassistant_Get:
#         cnt        18
#         dmx        -1000
#         dtot       0
#         dtotcnt    0
#         mTS        26.12. 08:11:52
#         max        9.39369201660156e-05
#         tot        0.000512361526489258
#         mAr:
#           HASH(0x5560f02ff8d8)
#           gassistant
#           ?
#       gassistant_Notify:
#         cnt        3
#         dmx        -1000
#         dtot       0
#         dtotcnt    0
#         mTS        26.12. 08:06:21
#         max        0.000102996826171875
#         tot        0.00017094612121582
#         mAr:
#           HASH(0x5560f02ff8d8)
#           HASH(0x5560f052e718)
#       gassistant_Set:
#         cnt        64
#         dmx        -1000
#         dtot       0
#         dtotcnt    0
#         mTS        26.12. 08:30:35
#         max        0.032512903213501
#         tot        0.175541639328003
#         mAr:
#           HASH(0x5560f02ff8d8)
#           gassistant
#           reload
#
setstate gassistant active
setstate gassistant 2022-12-26 07:51:42 gassistant-fhem running /usr/bin/gassistant-fhem
setstate gassistant 2022-12-26 07:51:52 gassistant-fhem-connection connected
setstate gassistant 2022-12-26 08:00:09 gassistant-fhem-googleSync Google SYNC finished
setstate gassistant 2022-12-26 07:51:47 gassistant-fhem-lastServerError none
setstate gassistant 2022-12-26 07:51:51 gassistant-fhem-lasterror none
setstate gassistant 2022-12-26 07:51:50 gassistant-fhem-localHome inactive
setstate gassistant 2022-12-26 08:00:09 gassistant-fhem-usedFeatureLevel 3
setstate gassistant 2022-12-26 07:51:47 gassistant-fhem-version 3.0.4
setstate gassistant 2022-12-26 07:51:48 gassistant-fhem-versionAvailable 3.0.5
setstate gassistant 2022-12-26 07:51:47 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=2J5CtURs5eJB8Vn--ddWijNWCt_JYHFpoH71b9oDziY&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>
setstate gassistant 2022-12-26 07:48:43 gassistantFHEM.refreshToken crypt:536b7d09423468525f674265781c667e616e576a0a054828001c415250606b5b696c7a5d040a5a57647353626e



Viele Grüße Gisbert
Aktuelles FHEM | PROXMOX | Fujitsu Futro S740 | Debian 12 | UniFi | Homematic, VCCU, HMUART | ESP8266 | ATtiny85 | Wasser-, Stromzähler | Wlan-Kamera | SIGNALduino, Flamingo Rauchmelder FA21/22RF | RHASSPY

misux

Ich habe das Gefühl Dominik hat sich verabschiedet... Leider auch keine Reaktion auf eine PN von mir ein paar wochen her... :'(

SouzA

Moin Leute,

wünsche ein frohes und gesundes neues Jahr! :D

Um den/die Entwickler zu erreichen, lässt es sich ganz gut über Github erledigen, denke ich.
https://github.com/fhempy/fhempy

Bis denn
SouzA
Raspi 4, EnOcean TCM310 USB, HM-MOD-UART-USB, Jeelink, hue, AMAD, fully, FRITZBOX, Signalbot, VIERA, Presence BT/Mac, TPLink, Gassistant, Shelly, fhempy, ZigBee

Gisbert

Hallo Dominik,

https://forum.fhem.de/index.php/topic,96696.msg1253549.html#msg1253549
Mein Problem hat sich erledigt. Ich hab nichts geändert, aber jetzt tut's wieder.

Viele Grüße Gisbert
Aktuelles FHEM | PROXMOX | Fujitsu Futro S740 | Debian 12 | UniFi | Homematic, VCCU, HMUART | ESP8266 | ATtiny85 | Wasser-, Stromzähler | Wlan-Kamera | SIGNALduino, Flamingo Rauchmelder FA21/22RF | RHASSPY

kadettilac89

Gibt es eine Möglichkeit gassistant remote zu installieren? Verbinung über HTTP oder über Netzwerk? Aus dem Fhem-Docker fliegt nodejs raus, damit auch die Vorraussetzungen für gassistant. Wenn gassistant remote funktioniert kann man das in einen eigenen Container verfrachten.

Zitat von: Sidey am 28 Januar 2023, 20:18:11
Für Alexa-fhem gibt es einen separaten. Container.
NodeJS wird aus dem FHEM (Perl) Container in naher Zukunft verschwinden.
Zitat von: Sidey am 28 Januar 2023, 21:16:51
Die Installation von Zusätzlichen Packages ist zu vermeiden.
Zitat von: Sidey am 28 Januar 2023, 21:52:54
Wer selbst Pakete installieren möchte, ist mit einer VM besser bedient. Ich bau das ja nicht aus, weil es so easy installiert werden kann.

NodeJS Images gibt es schon, Nutzbar werden die erst, wenn jemand ein Image mit einer spezifischen Anwendung erstellt.
Für google assistant ist mir jetzt keiner bekannt, aber ich nutze diesen Assistenten auch selbst nicht.

Frody71

Hallo zusammen, ich habe eine kurze Frage. Gassistant läuft so weit super bei mir mit einigen Geräten.

Nur beim Restart von Gassistant über das Device Gassistant erscheint im Log folgender doppelter Eintrag:


2023.01.31 18:17:17 2: GoogleAssistant: setting $HOME to Zuhause
2023.01.31 18:17:17 2: GoogleAssistant: starting gassistant-fhem: /usr/bin/gassistant-fhem -c ./FHEM/gassistant-fhem-single.cfg -a xx:xx
2023.01.31 18:17:17 2: GoogleAssistant: setting $HOME to Zuhause
2023.01.31 18:17:17 2: GoogleAssistant: starting gassistant-fhem: /usr/bin/gassistant-fhem -c ./FHEM/gassistant-fhem-single.cfg -a xx:xx


Sind die doppelten Einträge "starting gassistant-fhem" normal oder läudt da irgendetwas doppel?

LG, Frank

kadettilac89

Zitat von: Frody71 am 31 Januar 2023, 18:22:53
Hallo zusammen, ich habe eine kurze Frage. Gassistant läuft so weit super bei mir mit einigen Geräten.

Nur beim Restart von Gassistant über das Device Gassistant erscheint im Log folgender doppelter Eintrag:


2023.01.31 18:17:17 2: GoogleAssistant: setting $HOME to Zuhause
2023.01.31 18:17:17 2: GoogleAssistant: starting gassistant-fhem: /usr/bin/gassistant-fhem -c ./FHEM/gassistant-fhem-single.cfg -a xx:xx
2023.01.31 18:17:17 2: GoogleAssistant: setting $HOME to Zuhause
2023.01.31 18:17:17 2: GoogleAssistant: starting gassistant-fhem: /usr/bin/gassistant-fhem -c ./FHEM/gassistant-fhem-single.cfg -a xx:xx


Sind die doppelten Einträge "starting gassistant-fhem" normal oder läudt da irgendetwas doppel?

LG, Frank
Du hast verbose auf 2. Ich habe das mit geringerem level nie gesehen. Sehe die Meldung auch 2 Mal und läuft ohne Probleme. Mit ps sehe ich auch nur einen Prozess, also unkritisch.

Mit BEfehl s. u. kannst selber prüfen ob was doppelt läuft.


ps -ef | grep -i gassistant

Frody71

Hier das Ergebnis von 'ps -ef | grep -i gassistant'


pi@RaspberryPi4-Home:~ $ ps -ef | grep -i gassistant
fhem      2242  2225  0 08:00 ?        00:00:00 /usr/bin/node /usr/lib/node_modules/gassistant-fhem/node_modules/sync-rpc/lib/worker.js 40327
pi       28198 28084  0 19:13 pts/1    00:00:00 grep --color=auto -i gassistant



Da scheit vielleicht doch etwas doppelt zu laufen.

kadettilac89

Zitat von: Frody71 am 01 Februar 2023, 19:21:13
Hier das Ergebnis von 'ps -ef | grep -i gassistant'


pi@RaspberryPi4-Home:~ $ ps -ef | grep -i gassistant
fhem      2242  2225  0 08:00 ?        00:00:00 /usr/bin/node /usr/lib/node_modules/gassistant-fhem/node_modules/sync-rpc/lib/worker.js 40327
pi       28198 28084  0 19:13 pts/1    00:00:00 grep --color=auto -i gassistant



Da scheit vielleicht doch etwas doppelt zu laufen.
nein, du hast nur einen Prozess. Die untere Zeile ist der Befehlt den du abgesetzt hast (grep ***).

teichtaucher

#2936
Hallo, ich habe gassitant seit geraumer Zeit ohne Probleme am Laufen. Seit kurzem habe ich aber das Problem dass ich die Geräte über Google Home nicht mehr steuern kann. Genau genommen habe ich ein paar Shellies bei mir in FHEM am Laufen die über FHEM ohne Probleme anzusteuern sind. Wenn ich diese über Google Home ansprechen will passiert nichts. Umgekehrt sehe ich aber den korrekten Status. Also schalte ich über FHEM ein sehe ich in Google Home dass sie an sind. Schalte ich aus, sind sie auch in Google Home aus.
Ich habe gerade mal ein Update gemacht und FHEM neu gestartet. Gassistant ist auch verbunden und grün. Trotzdem keine Änderung.
Habt ihr eine Idee woran es liegen könnte?

EDIT: Hat sich erledigt. Ich habe sicherheitshalber mal den RaspberryPi (auf dem FHEM läuft) neu gestartet und seitdem tut es wieder. War aber trotzdem sehr kurios da ich keine Fehlermeldung hatte und das Auslesen FHEM -> Google Home lief, nur nicht andersrum.

hkspks

#2937
Falls mal jemand einen Dummy/ Def für ein Heizungsthermostat benötigt - das hier klappt. Sieht ggf. kompliziert aus, aber Vereinfachungen führten z.T. dazu, dass es nicht mehr funktioniert hat. Beispiel: homebridgemapping mit ThermostatModes anpassen. Sowohl die "Übersetzung" von values und cmds als auch die Verwendung eines dedizierten Attributes != "mode" (hier gMode) war notwendig. Ansonsten kommt der Kollege irgendwie durcheinander ...

defmod hTest dummy
attr hTest assistantName Heizung
attr hTest devStateIcon .*:noicon
attr hTest genericDeviceType thermostat
attr hTest homebridgeMapping {\
  "ThermostatModes": {\
    "reading": "gMode",\
    "cmds": ["off:gMode off", "heat:gMode heat", "eco:gMode eco"],\
    "values": ["gMode=/eco/:eco", "gMode=/off/:off","gMode=/heat/:heat"]\
  },\
  "TargetTemperature": {\
    "reading": "desiredTemperature",\
    "cmd": "desiredTemperature"\
  },\
  "CurrentTemperature": {\
    "reading": "temperature"\
  }\
}
attr hTest readingList desiredTemperature gMode
attr hTest room GoogleAssistant,Heizung
attr hTest setList desiredTemperature gMode
attr hTest userReadings state {ReadingsVal("hTest","gMode",0) eq "on" ? ReadingsVal("hTest","desiredTemperature",0)." °C" : ReadingsVal("hTest","gMode",0)}

setstate hTest heat
setstate hTest 2023-02-23 20:21:10 desiredTemperature 22
setstate hTest 2023-02-23 20:21:24 gMode heat
setstate hTest 2023-02-23 20:21:24 state heat
setstate hTest 2023-02-23 13:10:54 temperature 20

Reinemann67

#2938
Verdammt, mein gassistant funktioniert auch nicht mehr :-(
Grundsätzlich hat er nach dem Systemwechsel von einem Ubuntu auf ein Raspi noch funktioniert, dann aber ähnliche Probleme wie schon einige geschildert haben.
Lösungsversuche, wie im Forum beschrieben schon alle versucht
Also
- clear credentials
- create default config
- gassistant komplett gelöscht und entsprechend Wiki wieder neu eingerichtet

Es erscheint keine Reading gassistantFHEM.loginURL
Der gassistant ist 3s aktiv, dann geht er auf rot und schreibt einen Eintrag ins log:

Im gassistant log steht:


Loading cli.js...
/usr/local/lib/node_modules/gassistant-fhem/node_modules/sync-rpc/lib/index.js:167
    throw error;
    ^

Error: connect ECONNREFUSED 199.36.158.100:443
    at extractValue (/usr/local/lib/node_modules/gassistant-fhem/node_modules/sync-rpc/lib/index.js:165:19)
    at /usr/local/lib/node_modules/gassistant-fhem/node_modules/sync-rpc/lib/index.js:175:12
    at request (/usr/local/lib/node_modules/gassistant-fhem/node_modules/sync-request/lib/index.js:28:15)
    at getModule (/usr/local/lib/node_modules/gassistant-fhem/lib/cli.js:10:13)
    at Object.<anonymous> (/usr/local/lib/node_modules/gassistant-fhem/lib/cli.js:16:18)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19) {
  code: 'ECONNREFUSED'



Die gassistant cfg enthält:

{

   "connections" : [
      {
         "webname" : "fhem",
         "filter" : "room=GoogleAssistant",
         "server" : "192.168.1.14",
         "port" : "8085",
         "name" : "FHEM"
      }
   ],
   "gassistant" : {
      "description" : "FHEM Connect"
   }
}



Ich kann zu der Fehlermeldung leider nichts finden, auch zu dem Server 199.36.158.100:443 finde ich nichts.
Hat jemand einen Tip für mich ?

Besten Dank im Voraus

+++++++++++++++++++++++++++++++++++++++++

Hat sich erledigt - ich habe FHEM noch einmal auf einen ubuntu System installiert. Hier lief die Installation des nodejs ohne Fehler durch. Auf dem Raspberry scheint es fehlerhaft zu sein.
gssistant war nach 1 Min eingerichtet

Michael
Raspi --> HP T630 ThinClient

Umber

Ich hatte Probleme dass die Zeit auf meinem neuen system nicht sauber gesynct wurde.
Wenn die Zeit auf deinem FHEM_Rechner zu weit von der wirklichen Zeit abweicht funktioniert gassistant nicht.

Vielleicht ist bei dir auch so was.