[alexa-fhem | Generell] Alles zu Installation und damit verbundenen Problemen

Begonnen von prodigy7, 09 November 2016, 19:42:01

Vorheriges Thema - Nächstes Thema

amenomade

Zitat von: sinemeter am 03 Februar 2020, 15:06:20
Ich bin nur mässig Linux begabt aber ich vermute das meine Version von npm zu alt ist.
Ich glaube, deine Vermutung ist richtig.
Das Update von nodejs und npm ist im Wiki dokumentiert https://wiki.fhem.de/wiki/Alexa-Fhem#node.js_updaten
Pi 3B, Alexa, CUL868+Selbstbau 1/2λ-Dipol-Antenne, USB Optolink / Vitotronic, Debmatic und HM / HmIP Komponenten, Rademacher Duofern Jalousien, Fritz!Dect Thermostaten, Proteus

MadMax-FHEM

Hast du schon getestet, ob es nicht doch läuft!?

Kann ja keinen Fehler sehen...
...das ist ja "nur" eine Warnung (wg. Veraltet):

Zitat
(node:27396) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.

Hatte ich auch, lief aber trotzdem...

Schon mal das Alexa-Modul definiert!?

Was sagt das bzgl. Start von alexa-Connector und bzgl. Verbindung zum Vereinsserver!?

Gruß, Joachim
FHEM PI3B+ Bullseye: HM-CFG-USB, 40x HM, ZWave-USB, 13x ZWave, EnOcean-PI, 15x EnOcean, HUE/deCONZ, CO2, ESP-Multisensor, Shelly, alexa-fhem, ...
FHEM PI2 Buster: HM-CFG-USB, 25x HM, ZWave-USB, 4x ZWave, EnOcean-PI, 3x EnOcean, Shelly, ha-bridge, ...
FHEM PI3 Buster (Test)

HomeAlone

Hallo,
ich bin mir nicht ganz sicher, ob ich in diesem Thread richtig bin, aber habe auch nichts passenderes gefunden / bzw. bin immer noch nicht ganz im Klaren darüber, was der korrekte Weg / das korrekte Modul / der korrekte Name ... für die Einbindung von Alexa ist.

Ich würde gerne das alexa-fhem Docker image verwenden -> https://github.com/fhem/alexa-fhem-docker

Das Image war fix in der docker-compose konfiguriert, gestartet und es wurde mir eine config.json erzeugt. Diese entsprechend angepasst

{
  "alexa": {
    "port": 3000,
    "name": "Alexa",
    "ssl": false,
    "keyFile": "/certs/alexa-fhem.key",
    "certFile": "/certs/alexa-fhem.crt",
    "nat-pmp": "",
    "nat-upnp": false,
    "applicationId": "amzn1.ask.skill.XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX",
    "oauthClientID": "amzn1.application-oa2-client.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
  },
  "connections": [
    {
      "name": "FHEM",
      "webname": "fhem",
      "filter": "alexaName=..*",
      "uid": "999",
      "port": "8083",
      "server": "smartgulp2"
    }
  ]
}



und das logfile von docker sieht gut aus:
Starting alexa-fhem ...
[2/28/2020, 9:01:31 PM] os.homedir()=/alexa-fhem
[2/28/2020, 9:01:31 PM] using config from /alexa-fhem/.alexa/config.json
*** CONFIG: parsed completely
[2/28/2020, 9:01:31 PM] this is alexa-fhem 0.5.27
[2/28/2020, 9:01:31 PM] connecting to FHEM ...
[2/28/2020, 9:01:32 PM] [FHEM] trying longpoll to listen for fhem events
[2/28/2020, 9:01:32 PM] [FHEM] starting longpoll: http://smartgulp2:8083/fhem?XHR=1&inform=type=status;addglobal=1;filter=.*;since=null;fmt=JSON&timestamp=1582920092339
[2/28/2020, 9:01:32 PM] Server listening on: http://:::3000 for direct connections
[2/28/2020, 9:01:32 PM] [FHEM] got csrfToken: csrf_121955466640606e15
[2/28/2020, 9:01:32 PM] [FHEM] Checking devices and attributes...
[2/28/2020, 9:01:32 PM] [FHEM]   executing: http://smartgulp2:8083/fhem?cmd=%7BAttrVal(%22global%22%2C%22userattr%22%2C%22%22)%7D&fwcsrf=csrf_121955466640606e15&XHR=1
[2/28/2020, 9:01:32 PM] [FHEM]   executing: http://smartgulp2:8083/fhem?cmd=jsonlist2%20TYPE%3Dalexa&fwcsrf=csrf_121955466640606e15&XHR=1
[2/28/2020, 9:01:32 PM] [FHEM] waiting for events ...
[2/28/2020, 9:01:32 PM] [FHEM] Fetching FHEM devices...
[2/28/2020, 9:01:32 PM] [FHEM] fetching: http://smartgulp2:8083/fhem?cmd=jsonlist2%20alexaName=..*&fwcsrf=csrf_121955466640606e15&XHR=1
[2/28/2020, 9:01:32 PM] [FHEM] alexa device is alexa
[2/28/2020, 9:01:32 PM] [FHEM]   executing: http://smartgulp2:8083/fhem?cmd=%7B%24defs%7Balexa%7D-%3E%7B%22active%22%7D%20%3D%201%3B%3Bundef%7D%3B%7B%24defs%7Balexa%7D-%3E%7B%22alexa-fhem%20version%22%7D%20%3D%20%220.5.27%22%7D%3B%7B%24defs%7Balexa%7D-%3E%7B%22active%22%7D%20%3D%200%3B%3Bundef%7D&fwcsrf=csrf_121955466640606e15&XHR=1
[2/28/2020, 9:01:32 PM] [FHEM]   executing: http://smartgulp2:8083/fhem?cmd=%7B%24defs%7Balexa%7D-%3E%7B%22active%22%7D%20%3D%201%3B%3Bundef%7D%3Blist%20alexa%20.eventToken%3B%7B%24defs%7Balexa%7D-%3E%7B%22active%22%7D%20%3D%200%3B%3Bundef%7D&fwcsrf=csrf_121955466640606e15&XHR=1
*** FHEM: connected
[2/28/2020, 9:01:32 PM] [FHEM] got: 0 results


fhem ist dabei lokal installiert und der Docker Container läuft auf demselben host. Über Port 3000 bekomme ich auch output:

{"header":{"namespace":"Alexa.ConnectedHome.Control","name":"UnsupportedOperationError","payloadVersion":"2","messageId":"452662b6-9634-4c1c-976a-078ac6408626"},"payload":{}}

In fhem laut https://wiki.fhem.de/wiki/FHEM_Connector_f%C3%BCr_Amazon_Alexa ein device alexa angelegt, um alexa-fhem zu aktivieren. Das Device wird angelegt aber das war es dann leider auch:
alexaFHEM stopped; alexa-fhem not installed. install with 'sudo npm install -g alexa-fhem'.
Das Logfile des alexa Devices ist leer.

Mir ist jetzt nicht ganz klar, wie ich weiter vorgehe. Ich würde gerne von der (lokal installierten) fhem Installation die alexa-fhem (Docker-Installation) ansprechen, bzw. das "get alexa proxyKey" durchführen können.

Für einen Schubser in die richtige Richtung bedanke ich mich schon einmal vorab.

Viele Grüße
Sascha

justme1968

#2733
du mischst gerade die alte bzw. custom skill version mit dem neuen fhem connector.  für letzteren brauchst du kein port forwarding.

meine meinung: lass den docker kram. unter anderem hast du den nachteil das der autostart auf dem fhem modul nicht einfach geht.

arbeite einfach die fhem connector anleitung im wiki durch.
hue, tradfri, alexa-fhem, homebridge-fhem, LightScene, readingsGroup, ...

https://github.com/sponsors/justme-1968

HomeAlone

Ich wollte auf dem System eigentlich node.js frei bleiben, da ich in der Vergangenheit immer wieder mal Probleme mit der Abhängigkeit von Anwendungen zu speziellen Node.js Versionen hatte.

Habe mich aber jetzt dazu entschieden, es wie in der FHEM Connector Anleitung empfohlen mit einer lokalen Node JS Installation durchzuführen. Die Alexa-Anbindung (habe Node.js 12 verwendet) funktioniert damit einwandfrei.

Wirklich in Null-Komma-Nix aufgesetzt. Ein dickes Lob an die Entwickler!

Vielen Dank für Deine Hilfe!


sTaN

Hallo liebe Community,

seit heute funktioniert alexa-fhem nicht mehr korrekt bzw. werden alle Geräte in der Alexa App mit "Gerät reagiert nicht" angezeigt.
In FHEM wurde alexa-fhem korrekt gestartet und bringt auch keine Fehler. Sobald ich aber einen Befehl absetze erhalte ich folgende Fehlermeldungen:

[2020-3-8 18:32:02] client not authorized: {"error_index":"xxxxx","error_description":"The request has an invalid parameter : access_token","error":"invalid_token"}
[2020-3-8 18:32:02] <<<< [ssh] {"header":{"namespace":"Alexa.ConnectedHome.Control","name":"InvalidAccessTokenError","payloadVersion":"2","messageId":"xxxxx"},"payload":{}}
[2020-3-8 18:32:02] ERROR: InvalidAccessTokenError from 127.0.0.1
[2020-3-8 18:32:02] client not authorized: {"error_index":"xxxxx","error_description":"The request has an invalid parameter : access_token","error":"invalid_token"}
[2020-3-8 18:32:02] >>>> [ssh] {"directive":{"header":{"namespace":"Alexa","name":"ReportState","payloadVersion":"3","messageId":"5xxx","correlationToken":"-"},"endpoint":{"scope":{"type":"BearerToken","token":"XXXXXXX"},"endpointId":"hueBridge1_HUEGroup5","cookie":{"fuuid":"xxxxx","device":"hueBridge1_HUEGroup5"}},"payload":{}}}
[2020-3-8 18:32:02] >>>> [ssh] {"directive":{"header":{"namespace":"Alexa","name":"ReportState","payloadVersion":"3","messageId":"6xxx","correlationToken":"-"},"endpoint":{"scope":{"type":"BearerToken","token":"XXXXXXX"},"endpointId":"xxxxxx","cookie":{"fuuid":"xxxxxx","device":"HUEDevice4"}},"payload":{}}}
[2020-3-8 18:32:02] >>>> [ssh] {"directive":{"header":{"namespace":"Alexa","name":"ReportState","payloadVersion":"3","messageId":"7xxx","correlationToken":"-"},"endpoint":{"scope":{"type":"BearerToken","token":"XXXXXXX"},"endpointId":"xxxxx","cookie":{"fuuid":"xxxxx","device":"Aurora"}},"payload":{}}}
[2020-3-8 18:32:02] >>>> [ssh] {"directive":{"header":{"namespace":"Alexa","name":"ReportState","payloadVersion":"3","messageId":"cxxx","correlationToken":"-"},"endpoint":{"scope":{"type":"BearerToken","token":"XXXXXXX"},"endpointId":"FS20_33143314_2221","cookie":{"fuuid":"xxxxxx","device":"LEDSpueleKueche"}},"payload":{}}}
[2020-3-8 18:32:02] >>>> [ssh] {"directive":{"header":{"namespace":"Alexa","name":"ReportState","payloadVersion":"3","messageId":"2xxx","correlationToken":"-"},"endpoint":{"scope":{"type":"BearerToken","token":"XXXXXXX"},"endpointId":"xxxxx","cookie":{"fuuid":"5xxxxxx","device":"hueBridge1_HUEDevice10"}},"payload":{}}}
[2020-3-8 18:32:02] >>>> [ssh] {"directive":{"header":{"namespace":"Alexa","name":"ReportState","payloadVersion":"3","messageId":"6xxx","correlationToken":"-"},"endpoint":{"scope":{"type":"BearerToken","token":"XXXXXXX"},"endpointId":"FS20_33143314_2222","cookie":{"fuuid":"xxxxx","device":"LEDWandKueche"}},"payload":{}}}
[2020-3-8 18:32:02] >>>> [ssh] {"directive":{"header":{"namespace":"Alexa","name":"ReportState","payloadVersion":"3","messageId":"1xxx","correlationToken":"-"},"endpoint":{"scope":{"type":"BearerToken","token":"XXXXXXX"},"endpointId":"5c464395-f33f-dd7c-158d-0d4fe26c66a5eda3","cookie":{"fuuid":"xxxx,"device":"QNAP"}},"payload":{}}}
[2020-3-8 18:32:02] >>>> [ssh] {"directive":{"header":{"namespace":"Alexa","name":"ReportState","payloadVersion":"3","messageId":"xxx","correlationToken":"-"},"endpoint":{"scope":{"type":"BearerToken","token":"XXXXXXX"},"endpointId":"FS20_33143314_3334","cookie":{"fuuid":"xxxxx","device":"FensterLampe"}},"payload":{}}}
[2020-3-8 18:32:02] >>>> [ssh] {"directive":{"header":{"namespace":"Alexa","name":"ReportState","payloadVersion":"3","messageId":"fxxx","correlationToken":"-"},"endpoint":{"scope":{"type":"BearerToken","token":"XXXXXXX"},"endpointId":"00:17:88:01:04:d8:64:68-0b","cookie":{"fuuid":"xxxx","device":"HUEDevice20"}},"payload":{}}}
[2020-3-8 18:32:02] >>>> [ssh] {"directive":{"header":{"namespace":"Alexa","name":"ReportState","payloadVersion":"3","messageId":"xxx","correlationToken":"-"},"endpoint":{"scope":{"type":"BearerToken","token":"XXXXXXX"},"endpointId":"FS20_33143314_3343","cookie":{"fuuid":"5xxxx","device":"Drucker"}},"payload":{}}}
[2020-3-8 18:32:02] >>>> [ssh] {"directive":{"header":{"namespace":"Alexa","name":"ReportState","payloadVersion":"3","messageId":"xxx","correlationToken":"-"},"endpoint":{"scope":{"type":"BearerToken","token":"XXXXXXX"},"endpointId":"HUEGroup21","cookie":{"fuuid":"5xxxxxx","device":"HUEGroup21"}},"payload":{}}}
[2020-3-8 18:32:02] >>>> [ssh] {"directive":{"header":{"namespace":"Alexa","name":"ReportState","payloadVersion":"3","messageId":"xxx","correlationToken":"-"},"endpoint":{"scope":{"type":"BearerToken","token":"XXXXXXX"},"endpointId":"FS20_33143314_3342","cookie":{"fuuid":"5xxxx","device":"XboxController"}},"payload":{}}}
[2020-3-8 18:32:02] >>>> [ssh] {"directive":{"header":{"namespace":"Alexa","name":"ReportState","payloadVersion":"3","messageId":"xxx","correlationToken":"-"},"endpoint":{"scope":{"type":"BearerToken","token":"XXXXXXX"},"endpointId":"FS20_33143314_4411","cookie":{"fuuid":"5xxxx","device":"USBLadestation"}},"payload":{}}}
[2020-3-8 18:32:02] >>>> [ssh] {"directive":{"header":{"namespace":"Alexa","name":"ReportState","payloadVersion":"3","messageId":"xxx","correlationToken":"-"},"endpoint":{"scope":{"type":"BearerToken","token":"XXXXXXX"},"endpointId":"HUEGroup4","cookie":{"fuuid":"5xxxxx","device":"HUEGroup4"}},"payload":{}}}
[2020-3-8 18:31:37] SSH: Welcome at the reverse proxy!  This pseudoshell does not react to any input - do not get irritated. 
[2020-3-8 18:31:37] *** SSH: proxy connection established


Habe ein paar Sachen unkenntlich gemacht mit xxx, da ich nicht weiß wie sensibel die Daten sind.

Gruß
sTaN
Raspberry Pi 3
2 x CUL CC1101-USB-Lite 868MHz
FS20 Komponenten, Philips HUE, Alexa-Fhem, MAX! Geräte, homebridge, harmony, Unifi, FirtzBox, MQTT, Aurora, Denon, Sonos, TabletUI, CALENDAR, EGPM2LAN, Pushover

UweUwe

Hallo,
hab einen "thermostat" teilweise mit Alexa-FHEM verbunden.
Im Alexa Logfile sehe ich nach einem Neustart von Alexa folgende Informationen:
[8.3.2020, 18:47:25] [FHEM] FHT_1529 is thermostat
[8.3.2020, 18:47:25] [FHEM] FHT_1529 has
[8.3.2020, 18:47:25] [FHEM]   Saturation [sat;sat;0-100]
[8.3.2020, 18:47:25] [FHEM]   StatusLowBattery [battery]
[8.3.2020, 18:47:25] [FHEM]   TargetTemperature [desired-temp]
[8.3.2020, 18:47:25] [FHEM]   Custom Actuation [actuator]
[8.3.2020, 18:47:25] [FHEM]   TargetHeatingCoolingState [mode]
[8.3.2020, 18:47:25] [FHEM]   CurrentTemperature [measured-temp]
[8.3.2020, 18:47:25] [FHEM]   CurrentHeatingCoolingState [undefined]
[8.3.2020, 18:47:25] [FHEM] FHT_1529 will not send proactive events
[8.3.2020, 18:47:25] [FHEM] FHT_1529 uses ID: 5c65ca1c-f33f-1e06-54db-93a9bcf075da67ae
  2020-03-08 18:47:25 caching: FHT_1529-battery: ok
  2020-03-08 18:47:25 caching: FHT_1529-desired-temp: 20.0
  2020-03-08 18:47:25 caching: FHT_1529-actuator: 42%
[8.3.2020, 18:47:25] [FHEM]     caching: Custom Actuation: 42 (as number; from '42%')
  2020-03-08 18:47:25 caching: FHT_1529-mode: manual
  2020-03-08 18:47:25 caching: FHT_1529-measured-temp: 19.4
ich kann auch mit dem Befehl:
Alexa stelle Wärmedenken auf 20 Grad die "desired-temp" einstellen. Das Klappt. "Wärmedenken" ist der alexa Name meines Thermostates.
Aber, wie kann ich die restlichen Werte abfragen: measured-temp? actuator?, desired-Temp?
In der Alexa-App sehe ich noch für diesen Thermostat: Aktuelle Temp: 19,5. Frage ich jedoch " Alexa, wie ist die aktuelle Temperatur von Wärmedenken" , so scheut Alexa
Alexa ist hier nicht willig.
Dem Thermostat hab ich folgende Attribute gegeben:
Internals:
   CODE       1529
   CUL_0_MSGCNT 3998
   CUL_0_RAWMSG 810c04xx0909a00115290000a658
   CUL_0_RSSI -79
   CUL_0_TIME 2020-03-08 18:57:16
   DEF        1529
   FUUID      5c65ca1c-f33f-1e06-54db-93a9bcf075da67ae
   IODev      CUL_0
   LASTInputDev CUL_0
   MSGCNT     3998
   NAME       FHT_1529
   NR         474
   STATE      measured-temp: 19.4
   TYPE       FHT
   Helper:
     DBLOG:
       temperature:
         DBLogging:
           TIME       1583689428.43788
           VALUE      19.4
   READINGS:
     2020-03-08 18:57:16   actuator        35%
     2020-03-08 18:43:49   battery         ok
     2020-03-08 18:43:49   batteryState    ok
     2020-03-08 18:39:57   desired-temp    20.0
     2020-03-08 18:43:49   lowtemp         ok
     2020-03-08 18:43:48   measured-temp   19.4
     2020-02-27 11:58:18   mode            manual
     2020-03-08 18:43:48   state           measured-temp: 19.4
     2020-03-08 18:43:48   temperature     19.4
     2020-03-08 18:43:49   warnings        none
     2020-02-27 11:54:28   wed-from1       06:00
     2020-02-27 11:54:28   wed-from2       24:00
     2020-02-27 11:54:28   wed-to1         23:00
     2020-02-27 11:54:29   wed-to2         24:00
     2020-03-08 18:43:49   window          closed
     2020-03-08 18:43:49   windowsensor    ok
Attributes:
   DbLogExclude .*
   DbLogInclude temperature
   IODev      CUL_0
   alexaName  Waermedenken
   alias      Bürotemperatur
   genericDeviceType thermostat
   icon       hue_room_office
   room       Buero,IPAD

Es wird wohl an einem Mapping liegen. Für mich wäre es sehr wichtig, wo ich das nachlesen kann, auch für Bewegungsmelder, etc..
Danke für eure Unterstützung.


sTaN

Zitat von: sTaN am 08 März 2020, 18:52:50
Hallo liebe Community,

seit heute funktioniert alexa-fhem nicht mehr korrekt bzw. werden alle Geräte in der Alexa App mit "Gerät reagiert nicht" angezeigt.
In FHEM wurde alexa-fhem korrekt gestartet und bringt auch keine Fehler. Sobald ich aber einen Befehl absetze erhalte ich folgende Fehlermeldungen:

[2020-3-8 18:32:02] client not authorized: {"error_index":"xxxxx","error_description":"The request has an invalid parameter : access_token","error":"invalid_token"}
[2020-3-8 18:32:02] <<<< [ssh] {"header":{"namespace":"Alexa.ConnectedHome.Control","name":"InvalidAccessTokenError","payloadVersion":"2","messageId":"xxxxx"},"payload":{}}
[2020-3-8 18:32:02] ERROR: InvalidAccessTokenError from 127.0.0.1
[2020-3-8 18:32:02] client not authorized: {"error_index":"xxxxx","error_description":"The request has an invalid parameter : access_token","error":"invalid_token"}
[2020-3-8 18:32:02] >>>> [ssh] {"directive":{"header":{"namespace":"Alexa","name":"ReportState","payloadVersion":"3","messageId":"5xxx","correlationToken":"-"},"endpoint":{"scope":{"type":"BearerToken","token":"XXXXXXX"},"endpointId":"hueBridge1_HUEGroup5","cookie":{"fuuid":"xxxxx","device":"hueBridge1_HUEGroup5"}},"payload":{}}}
[2020-3-8 18:32:02] >>>> [ssh] {"directive":{"header":{"namespace":"Alexa","name":"ReportState","payloadVersion":"3","messageId":"6xxx","correlationToken":"-"},"endpoint":{"scope":{"type":"BearerToken","token":"XXXXXXX"},"endpointId":"xxxxxx","cookie":{"fuuid":"xxxxxx","device":"HUEDevice4"}},"payload":{}}}
[2020-3-8 18:32:02] >>>> [ssh] {"directive":{"header":{"namespace":"Alexa","name":"ReportState","payloadVersion":"3","messageId":"7xxx","correlationToken":"-"},"endpoint":{"scope":{"type":"BearerToken","token":"XXXXXXX"},"endpointId":"xxxxx","cookie":{"fuuid":"xxxxx","device":"Aurora"}},"payload":{}}}
[2020-3-8 18:32:02] >>>> [ssh] {"directive":{"header":{"namespace":"Alexa","name":"ReportState","payloadVersion":"3","messageId":"cxxx","correlationToken":"-"},"endpoint":{"scope":{"type":"BearerToken","token":"XXXXXXX"},"endpointId":"FS20_33143314_2221","cookie":{"fuuid":"xxxxxx","device":"LEDSpueleKueche"}},"payload":{}}}
[2020-3-8 18:32:02] >>>> [ssh] {"directive":{"header":{"namespace":"Alexa","name":"ReportState","payloadVersion":"3","messageId":"2xxx","correlationToken":"-"},"endpoint":{"scope":{"type":"BearerToken","token":"XXXXXXX"},"endpointId":"xxxxx","cookie":{"fuuid":"5xxxxxx","device":"hueBridge1_HUEDevice10"}},"payload":{}}}
[2020-3-8 18:32:02] >>>> [ssh] {"directive":{"header":{"namespace":"Alexa","name":"ReportState","payloadVersion":"3","messageId":"6xxx","correlationToken":"-"},"endpoint":{"scope":{"type":"BearerToken","token":"XXXXXXX"},"endpointId":"FS20_33143314_2222","cookie":{"fuuid":"xxxxx","device":"LEDWandKueche"}},"payload":{}}}
[2020-3-8 18:32:02] >>>> [ssh] {"directive":{"header":{"namespace":"Alexa","name":"ReportState","payloadVersion":"3","messageId":"1xxx","correlationToken":"-"},"endpoint":{"scope":{"type":"BearerToken","token":"XXXXXXX"},"endpointId":"5c464395-f33f-dd7c-158d-0d4fe26c66a5eda3","cookie":{"fuuid":"xxxx,"device":"QNAP"}},"payload":{}}}
[2020-3-8 18:32:02] >>>> [ssh] {"directive":{"header":{"namespace":"Alexa","name":"ReportState","payloadVersion":"3","messageId":"xxx","correlationToken":"-"},"endpoint":{"scope":{"type":"BearerToken","token":"XXXXXXX"},"endpointId":"FS20_33143314_3334","cookie":{"fuuid":"xxxxx","device":"FensterLampe"}},"payload":{}}}
[2020-3-8 18:32:02] >>>> [ssh] {"directive":{"header":{"namespace":"Alexa","name":"ReportState","payloadVersion":"3","messageId":"fxxx","correlationToken":"-"},"endpoint":{"scope":{"type":"BearerToken","token":"XXXXXXX"},"endpointId":"00:17:88:01:04:d8:64:68-0b","cookie":{"fuuid":"xxxx","device":"HUEDevice20"}},"payload":{}}}
[2020-3-8 18:32:02] >>>> [ssh] {"directive":{"header":{"namespace":"Alexa","name":"ReportState","payloadVersion":"3","messageId":"xxx","correlationToken":"-"},"endpoint":{"scope":{"type":"BearerToken","token":"XXXXXXX"},"endpointId":"FS20_33143314_3343","cookie":{"fuuid":"5xxxx","device":"Drucker"}},"payload":{}}}
[2020-3-8 18:32:02] >>>> [ssh] {"directive":{"header":{"namespace":"Alexa","name":"ReportState","payloadVersion":"3","messageId":"xxx","correlationToken":"-"},"endpoint":{"scope":{"type":"BearerToken","token":"XXXXXXX"},"endpointId":"HUEGroup21","cookie":{"fuuid":"5xxxxxx","device":"HUEGroup21"}},"payload":{}}}
[2020-3-8 18:32:02] >>>> [ssh] {"directive":{"header":{"namespace":"Alexa","name":"ReportState","payloadVersion":"3","messageId":"xxx","correlationToken":"-"},"endpoint":{"scope":{"type":"BearerToken","token":"XXXXXXX"},"endpointId":"FS20_33143314_3342","cookie":{"fuuid":"5xxxx","device":"XboxController"}},"payload":{}}}
[2020-3-8 18:32:02] >>>> [ssh] {"directive":{"header":{"namespace":"Alexa","name":"ReportState","payloadVersion":"3","messageId":"xxx","correlationToken":"-"},"endpoint":{"scope":{"type":"BearerToken","token":"XXXXXXX"},"endpointId":"FS20_33143314_4411","cookie":{"fuuid":"5xxxx","device":"USBLadestation"}},"payload":{}}}
[2020-3-8 18:32:02] >>>> [ssh] {"directive":{"header":{"namespace":"Alexa","name":"ReportState","payloadVersion":"3","messageId":"xxx","correlationToken":"-"},"endpoint":{"scope":{"type":"BearerToken","token":"XXXXXXX"},"endpointId":"HUEGroup4","cookie":{"fuuid":"5xxxxx","device":"HUEGroup4"}},"payload":{}}}
[2020-3-8 18:31:37] SSH: Welcome at the reverse proxy!  This pseudoshell does not react to any input - do not get irritated. 
[2020-3-8 18:31:37] *** SSH: proxy connection established


Habe ein paar Sachen unkenntlich gemacht mit xxx, da ich nicht weiß wie sensibel die Daten sind.

Gruß
sTaN

Ich habe soeben den FHEM Connector Skill bei Amazon deaktiviert und wollte diesen neu aktivieren, damit der eventToken neu gesetzt wird. Dabei habe ich get alexa proxyKey aufgerufen und musste feststellen, dass der ProxyKey völlig kryptisch aussieht (beginnend mit g`7....). Normalerweise sollte dieser doch das Format ABC123-01234... haben? Ich bekomme also den Skill gar nicht mehr aktiviert.

Gruß
sTaN
Raspberry Pi 3
2 x CUL CC1101-USB-Lite 868MHz
FS20 Komponenten, Philips HUE, Alexa-Fhem, MAX! Geräte, homebridge, harmony, Unifi, FirtzBox, MQTT, Aurora, Denon, Sonos, TabletUI, CALENDAR, EGPM2LAN, Pushover

UweUwe

Hallo,
wollte heute ein Update von alexa machen. Hatte 0.5.48 installiert.
Vorgehensweise war:
1. Alexa in FHEM stoppen
2. sudo npm update -g alexa-fhem
Antwort in Linux:
pi@mymachine:~ $ sudo npm update -g alexa-fhem
(node:13501) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmp                 dir() instead.
npm ERR! tar.unpack untar error /root/.npm/async-limiter/1.0.1/package.tgz
npm ERR! Error: Method Not Allowed
npm ERR!     at errorResponse (/usr/share/npm/lib/cache/add-named.js:260:10)
npm ERR!     at /usr/share/npm/lib/cache/add-named.js:203:12
npm ERR!     at saved (/usr/share/npm/node_modules/npm-registry-client/lib/get.j                 s:167:7)
npm ERR!     at FSReqWrap.oncomplete (fs.js:135:15)
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR!     <http://github.com/npm/npm/issues>

npm ERR! System Linux 4.19.66-v7+
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "update" "-g" "alexa-fhem"
npm ERR! cwd /home/pi
npm ERR! node -v v8.11.1
npm ERR! npm -v 1.4.21
npm ERR! code E405
npm WARN optional dep failed, continuing ws@6.2.1
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /home/pi/npm-debug.log
npm ERR! not ok code 0

In FHEM sehe ich :
alexaFHEM

stopped; alexa-fhem not installed. install with 'sudo npm install -g alexa-fhem'.

2020-04-18 21:33:50
alexaFHEM.ProxyConnection

stopped

2020-04-18 21:28:45
alexaFHEM.bearerToken

crypt:0100510805560057700b040252502701

2020-02-18 09:55:27
alexaFHEM.skillRegKey

crypt:77065d050f5c0657190308075c512002270406220f02540327490453000e0b0703052109025402517102

Was habe ich falsch gemacht?

MadMax-FHEM

Eventuell zu alte node Version!?

8.11 ist schon sehr alt...

Welches System!?

HW/OS...

Gruß, Joachim
FHEM PI3B+ Bullseye: HM-CFG-USB, 40x HM, ZWave-USB, 13x ZWave, EnOcean-PI, 15x EnOcean, HUE/deCONZ, CO2, ESP-Multisensor, Shelly, alexa-fhem, ...
FHEM PI2 Buster: HM-CFG-USB, 25x HM, ZWave-USB, 4x ZWave, EnOcean-PI, 3x EnOcean, Shelly, ha-bridge, ...
FHEM PI3 Buster (Test)

UweUwe

Hallo Joachim,
eigentlich meine ich auf dem aktuellen System zu sein, sowohl FHEM, als auch Linux,, als auch Node.
Hab aber gerade nochmals vorsichtshalber alles aktualisiert:

Hardware cat /sys/firmware/devicetree/base/model
Raspberry Pi 3 Model B Plus Rev 1.3

Betriebssystem: pi@mymachine:~ $ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)"
NAME="Raspbian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
VERSION_CODENAME=stretch
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
node sudo apt list nodejs
Auflistung... Fertig
nodejs/stable,now 8.11.1~dfsg-2~bpo9+1 armhf  [installiert]
N: Es gibt 1 zusätzliche Version. Bitte verwenden Sie die Option »-a«, um sie an             zuzeigen.
fhem File    Rev   Last Change

fhem.pl 21709 2020-04-17 11:15:16Z rudolfkoenig

doif.js                    15546 2017-12-03 09:57:42Z Ellert
fhemweb.js                 21316 2020-02-29 20:24:41Z rudolfkoenig
trotzdem bleibt sudo npm install -g alexa-fhem
(node:15117) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
npm ERR! tar.unpack untar error /root/.npm/supports-color/5.5.0/package.tgz
npm ERR! error rolling back Error: ENOTEMPTY: directory not empty, rmdir '/usr/local/lib/node_modules/alexa-fhem/node_modules/ws/node_modules'
npm ERR! error rolling back  alexa-fhem@0.5.51 { Error: ENOTEMPTY: directory not empty, rmdir '/usr/local/lib/node_modules/alexa-fhem/node_modules/ws/node_modules'
npm ERR! error rolling back   errno: -39,
npm ERR! error rolling back   code: 'ENOTEMPTY',
npm ERR! error rolling back   syscall: 'rmdir',
npm ERR! error rolling back   path: '/usr/local/lib/node_modules/alexa-fhem/node_modules/ws/node_modules' }
npm ERR! Error: Method Not Allowed
npm ERR!     at errorResponse (/usr/share/npm/lib/cache/add-named.js:260:10)
npm ERR!     at /usr/share/npm/lib/cache/add-named.js:203:12
npm ERR!     at saved (/usr/share/npm/node_modules/npm-registry-client/lib/get.js:167:7)
npm ERR!     at FSReqWrap.oncomplete (fs.js:135:15)
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR!     <http://github.com/npm/npm/issues>

npm ERR! System Linux 4.19.66-v7+
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "-g" "alexa-fhem"
npm ERR! cwd /home/pi
npm ERR! node -v v8.11.1
npm ERR! npm -v 1.4.21
npm ERR! code E405
npm WARN optional dep failed, continuing ws@6.2.1
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /home/pi/npm-debug.log
npm ERR! not ok code 0
  Wo mache ich meinen Fehler.
Mehrmals neu gestartet ist klar...


sTaN

Was sagt node -v und npm -v npm -g outdated
Mal ein sudo npm update -g alexa-fhem probiert?

Gruß sTaN
Raspberry Pi 3
2 x CUL CC1101-USB-Lite 868MHz
FS20 Komponenten, Philips HUE, Alexa-Fhem, MAX! Geräte, homebridge, harmony, Unifi, FirtzBox, MQTT, Aurora, Denon, Sonos, TabletUI, CALENDAR, EGPM2LAN, Pushover

UweUwe

Hallo Joachim,
anbei die Rückinfo: pi@mymachine:~ $ node -v
v8.11.1
pi@mymachine:~ $ npm -v
1.4.21
(node:795) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
pi@mymachine:~ $ npm -g outdated
(node:803) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
pi@mymachine:~ $ sudo npm update -g alexa-fhem
(node:820) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
pi@mymachine:~ $
==> ohne Fehlermeldung, jedoch Alexa steht noch..

sTaN

Du hast eine veraltete npm Version, deshalb auch der Fehler.

Mach mal ein npm cache clean --force

Aktualisiere dein System

sudo apt-get update && sudo apt-get upgrade && sudo apt-get install build-essential libssl-dev

und installiere npm neu (mal ohne sudo)
npm install

Danach prüfe noch mal die npm Version mit npm -v und versuch dein Alexa-fhem update
Raspberry Pi 3
2 x CUL CC1101-USB-Lite 868MHz
FS20 Komponenten, Philips HUE, Alexa-Fhem, MAX! Geräte, homebridge, harmony, Unifi, FirtzBox, MQTT, Aurora, Denon, Sonos, TabletUI, CALENDAR, EGPM2LAN, Pushover

UweUwe

Hallo sTaN,

pi@mymachine:~ $ npm cache clean --force
(node:871) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
npm WARN using --force I sure hope you know what you are doing.

pi@mymachine:~ $ sudo apt-get update && sudo apt-get upgrade && sudo apt-get install build-essential libssl-dev
OK:1 http://raspbian.raspberrypi.org/raspbian stretch InRelease
Holen:2 http://archive.raspberrypi.org/debian stretch InRelease [25,4 kB]
Es wurden 25,4 kB in 0 s geholt (27,7 kB/s).
Paketlisten werden gelesen... Fertig
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut.
Statusinformationen werden eingelesen.... Fertig
Paketaktualisierung (Upgrade) wird berechnet... Fertig
0 aktualisiert, 0 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut.
Statusinformationen werden eingelesen.... Fertig
build-essential ist schon die neueste Version (12.3).
libssl-dev ist schon die neueste Version (1.1.0l-1~deb9u1).
libssl-dev wurde als manuell installiert festgelegt.
0 aktualisiert, 0 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.
npm install
(node:1019) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
npm ERR! install Couldn't read dependencies
npm ERR! package.json ENOENT: no such file or directory, open '/home/pi/package.json'
npm ERR! package.json This is most likely not a problem with npm itself.
npm ERR! package.json npm can't find a package.json file in your current directory.

npm ERR! System Linux 4.19.66-v7+
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! cwd /home/pi
npm ERR! node -v v8.11.1
npm ERR! npm -v 1.4.21
npm ERR! path /home/pi/package.json
npm ERR! syscall open
npm ERR! code ENOPACKAGEJSON
npm ERR! errno -2
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /home/pi/npm-debug.log
npm ERR! not ok code 0
pi@mymachine:~ $ npm -v
1.4.21
(node:1173) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.

.
pi@mymachine:~ $ sudo npm update -g alexa-fhem
(node:1184) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
pi@mymachine:~ $
  =>> ohne Fehlermeldung, aber auch ohne Fortschritt. Merci für die Unterstützung..