Alexa Trigger reagiert nicht

Begonnen von dkeeper06, 04 November 2017, 14:26:01

Vorheriges Thema - Nächstes Thema

dkeeper06

Hallo zusammen,

versuche seit 2 Tagen Alexa in Fhem einzubinden und habe die Anleitung im Forum mehrfach 1:1 umgesetzt (nur Smarthome Skill bislang), bekomme jedoch trotzdem keine Geraete in Alexa angezeigt.

Installiert habe ich alexa-fhem 0.3.4 und hier werden die Gerate auch erkannt, Portfreigaben und dns sind auch eingerichtet und ein Test in der Lambda Funktion zeigt, dass die Verbindung soweit funktioniert.

Soweit ich es beurteilen kann erfolgt einfach keinerlei Reaktion der lambda Funktion auf den Skill.  Den Trigger habe ich mehrfach neu angelegt.

Ich bin mit meinem Wissen am Ende. Vll hat ja einer von euch noch einen Tipp, wo ich ansetzen muesste.

VG
Stefan
[11/4/2017, 12:56:44 PM] ---
[11/4/2017, 12:56:44 PM] this is alexa-fhem 0.3.4
[11/4/2017, 12:56:44 PM] Fetching FHEM devices...
[11/4/2017, 12:56:44 PM] [FHEM] starting longpoll: http://127.0.0.1:8083/fhem?XHR=1&inform=type=status;addglobal=1;filter=.*;since=null;fmt=JSON&timestamp=1509800204951
[11/4/2017, 12:56:44 PM] Server listening on: https://:::3000
[11/4/2017, 12:56:44 PM] [FHEM] Checking devices and attributes...
[11/4/2017, 12:56:44 PM] [FHEM]   executing: http://127.0.0.1:8083/fhem?cmd=%7BAttrVal(%22global%22,%22userattr%22,%22%22)%7D&XHR=1
[11/4/2017, 12:56:44 PM] [FHEM]   executing: http://127.0.0.1:8083/fhem?cmd=jsonlist2%20TYPE=alexa&XHR=1
[11/4/2017, 12:56:44 PM] [FHEM] Fetching FHEM devices...
[11/4/2017, 12:56:44 PM] [FHEM] fetching: http://127.0.0.1:8083/fhem?cmd=jsonlist2%20room=alexa&XHR=1
[11/4/2017, 12:56:45 PM] [FHEM] alexa device is MyAlexa
[11/4/2017, 12:56:45 PM] [FHEM] MyAlexa is switch
[11/4/2017, 12:56:45 PM] [FHEM] MyAlexa has
[11/4/2017, 12:56:45 PM] [FHEM] homebridgeMapping: #Characteristic=<name>=<value>,...
On=verb=schalte,valueOn=an;ein,valueOff=aus,valueToggle=um

Brightness=verb=stelle,property=helligkeit,valuePrefix=auf,values=AMAZON.NUMBER,valueSuffix=prozent

Hue=verb=stelle,valuePrefix=auf,values=rot:0;grün:128;blau:200
Hue=verb=färbe,values=rot:0;grün:120;blau:220

Saturation=verb=stelle,property=sättigung,valuePrefix=auf,values=AMAZON.NUMBER
Saturation=verb=sättige,values=AMAZON.NUMBER

TargetPosition=verb=mach,articles=den;die,values=auf:100;zu:0
TargetPosition=verb=stelle,valuePrefix=auf,values=AMAZON.NUMBER,valueSuffix=prozent

TargetTemperature=verb=stelle,valuePrefix=auf,values=AMAZON.NUMBER,valueSuffix=grad

Volume:verb=stelle,valuePrefix=auf,values=AMAZON.NUMBER,valueSuffix=prozent

#Weckzeit=verb=stelle,valuePrefix=auf;für,values=AMAZON.TIME,valueSuffix=uhr
[11/4/2017, 12:56:45 PM] [FHEM]   executing: http://127.0.0.1:8083/fhem?cmd=%7B$defs%7BMyAlexa%7D-%3E%7B%22active%22%7D%20=%201%7D&XHR=1
[11/4/2017, 12:56:45 PM] [FHEM]   executing: http://127.0.0.1:8083/fhem?cmd=%7B$defs%7BMyAlexa%7D-%3E%7B%22alexa-fhem%20version%22%7D%20=%20%220.3.4%22%7D&XHR=1
[11/4/2017, 12:56:45 PM] [FHEM]   executing: http://127.0.0.1:8083/fhem?cmd=%7B$defs%7BMyAlexa%7D-%3E%7B%22active%22%7D%20=%200%7D&XHR=1
[11/4/2017, 12:56:45 PM] perfectOfVerb:
[11/4/2017, 12:56:45 PM] { stelle: 'gestellt',
  schalte: 'geschaltet',
  'färbe': 'gefärbt',
  mach: 'gemacht' }
[11/4/2017, 12:56:45 PM] verbsOfIntent:
[11/4/2017, 12:56:45 PM] [ OnIntent: [ 'schalte' ],
  prozentIntent: [ 'stelle' ],
  HueIntent: [ 'stelle' ],
  HueIntentB: [ 'färbe' ],
  SaturationIntent: [ 'stelle' ],
  SaturationIntentB: [ 'sättige' ],
  TargetPositionIntent: [ 'mach' ],
  gradIntent: [ 'stelle' ] ]
[11/4/2017, 12:56:45 PM] characteristicsOfIntent:
[11/4/2017, 12:56:45 PM] { OnIntent: [ 'On' ],
  prozentIntent: [ 'Brightness', 'TargetPosition', 'Volume' ],
  HueIntent: [ 'Hue' ],
  HueIntentB: [ 'Hue' ],
  SaturationIntent: [ 'Saturation' ],
  SaturationIntentB: [ 'Saturation' ],
  TargetPositionIntent: [ 'TargetPosition' ],
  gradIntent: [ 'TargetTemperature' ] }
[11/4/2017, 12:56:45 PM] prefixOfIntent:
[11/4/2017, 12:56:45 PM] { OnIntent: undefined,
  prozentIntent: 'auf',
  HueIntent: 'auf',
  HueIntentB: undefined,
  SaturationIntent: 'auf',
  SaturationIntentB: undefined,
  TargetPositionIntent: undefined,
  gradIntent: 'auf' }
[11/4/2017, 12:56:45 PM] suffixOfIntent:
[11/4/2017, 12:56:45 PM] { OnIntent: undefined,
  prozentIntent: 'prozent',
  HueIntent: undefined,
  HueIntentB: undefined,
  SaturationIntent: undefined,
  SaturationIntentB: undefined,
  TargetPositionIntent: undefined,
  gradIntent: 'grad' }
[11/4/2017, 12:56:45 PM] alexaTypes:
[11/4/2017, 12:56:45 PM] { light: [ 'licht', 'lampen' ],
  blind:
   [ 'rolladen',
     'rolläden',
     'jalousie',
     'jalousien',
     'rollo',
     'rollos' ] }
[11/4/2017, 12:56:45 PM] roomOfEcho:
[11/4/2017, 12:56:45 PM] {}
[11/4/2017, 12:56:45 PM] fhemIntents:
[11/4/2017, 12:56:45 PM] { FHEMgutenMorgenIntent: 'gutenMorgen',
  FHEMguteNachtIntent: 'guteNacht' }
[11/4/2017, 12:56:45 PM] [FHEM] got: 1 results
[11/4/2017, 12:56:45 PM] [FHEM] Br.Lights is light
[11/4/2017, 12:56:45 PM] [FHEM] Br.Lights has
[11/4/2017, 12:56:45 PM] [FHEM]   On [pct;on,off]
[11/4/2017, 12:56:45 PM] [FHEM]   Brightness [pct]
[11/4/2017, 12:56:45 PM] [FHEM]   FirmwareRevision [D-firmware]
[11/4/2017, 12:56:45 PM] [FHEM] { reading: 'pct',
  valueOff: '0',
  cmdOn: 'on',
  cmdOff: 'off',
  device: 'Br.Lights',
  informId: 'Br.Lights-pct',
  characteristic_type: 'On',
  log:
   { [Function: bound ]
     debug: [Function],
     info: [Function],
     warn: [Function],
     error: [Function],
     log: [Function],
     prefix: 'FHEM' } }
  2017-11-04 12:56:45 caching: Br.Lights-pct: 0
[11/4/2017, 12:56:45 PM] [FHEM] { reading: 'pct',
  cmd: 'pct',
  delay: true,
  device: 'Br.Lights',
  informId: 'Br.Lights-pct',
  characteristic_type: 'Brightness',
  log:
   { [Function: bound ]
     debug: [Function],
     info: [Function],
     warn: [Function],
     error: [Function],
     log: [Function],
     prefix: 'FHEM' } }
[11/4/2017, 12:56:45 PM] [FHEM] { reading: 'D-firmware',
  _isInformation: true,
  device: 'Br.Lights',
  informId: 'Br.Lights-D-firmware',
  characteristic_type: 'FirmwareRevision',
  log:
   { [Function: bound ]
     debug: [Function],
     info: [Function],
     warn: [Function],
     error: [Function],
     log: [Function],
     prefix: 'FHEM' } }
  2017-11-04 12:56:45 caching: Br.Lights-D-firmware: 2.6




Beim Test der Lambda Funktion:
[11/4/2017, 12:57:38 PM] client not authorized: {"error_description":"The request has an invalid parameter : access_token","error":"invalid_token"}
[11/4/2017, 12:57:38 PM] ERROR: InvalidAccessTokenError from ::ffff:34.241.163.147
response :{"header":{"name":"InvalidAccessTokenError","payloadVersion":"2","namespace":"Alexa.ConnectedHome.Control","messageId":"af4c6319-6ea2-4176-b7cc-bd1cca855ecf"},"payload":{}}


Device suchen in Alexa fuehrt zu keiner Reaktion

amenomade

Zitat"The request has an invalid parameter : access_token","error":"invalid_token"}
Das musst Du im config.json prüfen.
Und um sicher zu stellen, welche config.json Datei benutzt wird, lieber alexa mit"./bin/alexa --debug" starten
Pi 3B, Alexa, CUL868+Selbstbau 1/2λ-Dipol-Antenne, USB Optolink / Vitotronic, Debmatic und HM / HmIP Komponenten, Rademacher Duofern Jalousien, Fritz!Dect Thermostaten, Proteus

dkeeper06

Die Fehlermeldung liegt nur daran, dass ich in der Lambda Funktion einfach dies ausgefuehrt habe:

{
  "header": {
    "payloadVersion": "1",
    "namespace": "Control",
    "name": "SwitchOnOffRequest"
  },
  "payload": {
    "switchControlAction": "TURN_ON",
    "appliance": {
      "additionalApplianceDetails": {
        "key2": "value2",
        "key1": "value1"
      },
      "applianceId": "sampleId"
    },
    "accessToken": "sampleAccessToken"
  }
}


Das war nur gedacht um irgendeine Reaktion hervorzurufen um zu schauen, ob die Verbindung und Portfreigabe richtig funktionieren.

Dies auszufuehren sorgt auch fuer die entsprechenden Log Eintraege in CloudWatch aber die Suche nach Geraeten ueber den Alexa Skill fuehrt halt weder in Cloudwatch noch in alexa-fhem zu irgendwelchen Ausgaben.