alexa-fhem: amazon alexa smart home skill für fhem

Begonnen von justme1968, 05 November 2016, 23:21:32

Vorheriges Thema - Nächstes Thema

chris1284

meine installation setht soweit, ich bekomme aber egal was ich mache keine geräte in alexa angezeigt,
mag evtl jemand mit drüber schauen https://forum.fhem.de/index.php/topic,60452.msg564723.html#msg564723  DANKE!

baerbel

Hi,

anbei ein List eines "Tasters" - er kommt bei mir sogar in Amazon.Alexa an - habe nur die Schwierigkeit, dass das Eventmap, mapping nicht zieht - wollte ihn nicht umbauen - denke, wenn du statt "night" ein "on" nimmst, dann könnte es klappen. Das es bei mir noch nicht tut sieht man schön am STATE "undefined 1 -

Internals:
   NAME       Garagentor_Oeffner
   NR         766
   STATE      undefined 1
   TYPE       dummy
   Readings:
     2017-01-19 18:20:00   state           undefined 1
Attributes:
   alexaName  Garagentor
   alias      Garagentor Taster
   devStateIcon AUS:rc_BLANK AN:remotecontrol/black_btn_OK
   eventMap   AN:On
   genericDeviceType switch
   group      Taster
   homebridgeMapping On=power,cmdOff=off
   icon       remotecontrol/black_btn_POWEROFF3
   room       Garage,alexa
   setList    AN
   verbose    5
   webCmd     AN


Grüße - Bernd

bjoernbo

@Chris: Nachdem Du Geräte in den Raum alexa gepackt hast, hast Du danach den alexa Prozeß mir restart einmal neu durchgestartet?
Raspberry Pi 3 - FB6490C - Synology NAS DS916+ - NETATMO - HUE - SIEMENS G-Tag'S - FTUI - EchoDOT -


hansemann

Zitat von: baerbel am 19 Januar 2017, 09:22:23
Hi Andre,

mir hat dieses von mir beschriebene Thema keine Ruhe gelassen
https://forum.fhem.de/index.php/topic,60244.msg563381.html#msg563381

So wie es aussieht lag es am nicht aktuellen Intent Schema und den zugehörigen Sample Utterances - alles nochmal übertragen und die Fehler sind weg - somit würde ich sagen, dass du dich der Sache nicht mehr annehmen musst -

Trotzdem wieder mal ein dickes Danke schön für deine Bereitschaft zu helfen !!!

Grüße - Bernd

Hi,

ich habe genau das gleiche Problem.

Wenn ich eine lampe schalten will kommt als Antwort:

"Ich habe Ich kann stehlampe nicht auf undefined schalten. undefined gestellt"

Wie hast du es gelöst?

Gruß Jo

baerbel

Hallo Jo,

ich bin noch mal Schritt für Schritt vorgegangen -

1. developer.amazon.com öffnen
2. dort über Alexa Menüpunkt auf meinen custom skill gegangen und den Punkt "interaction Model" ausgewählt
3. in FHEM auf alexa-fhem
4. Dort ein get <deine Alexa Instanz> InteractionModel
5. die dort gelisteten Werte für Intent Schema und Sample Utterances und Custom Slot Types per copy und paste in den Custom skill in den jeweiligen Abschnitt kopiert und bei der Gelegenheit auch gleich noch FHEM_Room und FHEM_Device kontrolliert. Meine Ausgabe für für den unter 4. genannten "Befehl" sieht folgendermassen aus:

{
   "intents" : [
      {
         "intent" : "SaturationIntent",
         "slots" : [
            {
               "name" : "article",
               "type" : "FHEM_article"
            },
            {
               "type" : "FHEM_Device",
               "name" : "Device"
            },
            {
               "name" : "preposition",
               "type" : "FHEM_preposition"
            },
            {
               "type" : "FHEM_Room",
               "name" : "Room"
            },
            {
               "name" : "Saturation_Value",
               "type" : "AMAZON.NUMBER"
            }
         ]
      },
      {
         "intent" : "SaturationIntentB",
         "slots" : [
            {
               "type" : "FHEM_article",
               "name" : "article"
            },
            {
               "name" : "Device",
               "type" : "FHEM_Device"
            },
            {
               "name" : "preposition",
               "type" : "FHEM_preposition"
            },
            {
               "name" : "Room",
               "type" : "FHEM_Room"
            },
            {
               "name" : "Saturation_ValueB",
               "type" : "AMAZON.NUMBER"
            }
         ]
      },
      {
         "slots" : [
            {
               "name" : "article",
               "type" : "FHEM_article"
            },
            {
               "name" : "Device",
               "type" : "FHEM_Device"
            },
            {
               "name" : "preposition",
               "type" : "FHEM_preposition"
            },
            {
               "type" : "FHEM_Room",
               "name" : "Room"
            },
            {
               "name" : "prozent_Value",
               "type" : "AMAZON.NUMBER"
            }
         ],
         "intent" : "prozentIntent"
      },
      {
         "slots" : [
            {
               "type" : "FHEM_article",
               "name" : "article"
            },
            {
               "name" : "Device",
               "type" : "FHEM_Device"
            },
            {
               "name" : "preposition",
               "type" : "FHEM_preposition"
            },
            {
               "name" : "Room",
               "type" : "FHEM_Room"
            },
            {
               "name" : "grad_Value",
               "type" : "AMAZON.NUMBER"
            }
         ],
         "intent" : "gradIntent"
      },
      {
         "intent" : "TargetPositionIntent",
         "slots" : [
            {
               "type" : "FHEM_article",
               "name" : "article"
            },
            {
               "type" : "FHEM_Device",
               "name" : "Device"
            },
            {
               "name" : "preposition",
               "type" : "FHEM_preposition"
            },
            {
               "type" : "FHEM_Room",
               "name" : "Room"
            },
            {
               "name" : "TargetPosition_Value",
               "type" : "TargetPosition_Value"
            }
         ]
      },
      {
         "intent" : "BrightnessIntent",
         "slots" : [
            {
               "name" : "article",
               "type" : "FHEM_article"
            },
            {
               "name" : "Device",
               "type" : "FHEM_Device"
            },
            {
               "type" : "FHEM_preposition",
               "name" : "preposition"
            },
            {
               "name" : "Room",
               "type" : "FHEM_Room"
            },
            {
               "name" : "Brightness_Value",
               "type" : "AMAZON.NUMBER"
            }
         ]
      },
      {
         "intent" : "HueIntent",
         "slots" : [
            {
               "type" : "FHEM_article",
               "name" : "article"
            },
            {
               "name" : "Device",
               "type" : "FHEM_Device"
            },
            {
               "type" : "FHEM_preposition",
               "name" : "preposition"
            },
            {
               "type" : "FHEM_Room",
               "name" : "Room"
            },
            {
               "name" : "Hue_Value",
               "type" : "Hue_Value"
            }
         ]
      },
      {
         "intent" : "HueIntentB",
         "slots" : [
            {
               "type" : "FHEM_article",
               "name" : "article"
            },
            {
               "type" : "FHEM_Device",
               "name" : "Device"
            },
            {
               "type" : "FHEM_preposition",
               "name" : "preposition"
            },
            {
               "name" : "Room",
               "type" : "FHEM_Room"
            },
            {
               "name" : "Hue_ValueB",
               "type" : "Hue_ValueB"
            }
         ]
      },
      {
         "intent" : "OnIntent",
         "slots" : [
            {
               "name" : "article",
               "type" : "FHEM_article"
            },
            {
               "name" : "Device",
               "type" : "FHEM_Device"
            },
            {
               "type" : "FHEM_preposition",
               "name" : "preposition"
            },
            {
               "name" : "Room",
               "type" : "FHEM_Room"
            },
            {
               "name" : "On_Value",
               "type" : "On_Value"
            }
         ]
      },
      {
         "intent" : "FHEMgutenMorgenIntent"
      },
      {
         "intent" : "FHEMguteNachtIntent"
      },
      {
         "slots" : [
            {
               "type" : "FHEM_Device",
               "name" : "Device"
            },
            {
               "name" : "preposition",
               "type" : "FHEM_preposition"
            },
            {
               "name" : "Room",
               "type" : "FHEM_Room"
            }
         ],
         "intent" : "StatusIntent"
      },
      {
         "slots" : [
            {
               "name" : "preposition",
               "type" : "FHEM_preposition"
            },
            {
               "name" : "Room",
               "type" : "FHEM_Room"
            }
         ],
         "intent" : "RoomAnswerIntent"
      },
      {
         "intent" : "RoomListIntent"
      },
      {
         "slots" : [
            {
               "type" : "FHEM_article",
               "name" : "article"
            },
            {
               "type" : "FHEM_Room",
               "name" : "Room"
            }
         ],
         "intent" : "DeviceListIntent"
      },
      {
         "intent" : "AMAZON.CancelIntent"
      },
      {
         "intent" : "AMAZON.StopIntent"
      }
   ]
}

Custom Slot Types:
------------------
FHEM_article
  der
  die
  das
  den
FHEM_preposition
  in
  im
  in der
Hue_Value
  blau
  grün
  rot
Hue_ValueB
  blau
  grün
  rot
On_Value
  an
  ein
  aus
  um
TargetPosition_Value
  auf
  zu

Sample Utterances:
------------------
SaturationIntent stelle sättigung {Device} auf {Saturation_Value}
SaturationIntent stelle sättigung {Device} {preposition} {Room} auf {Saturation_Value}
SaturationIntent stelle sättigung {article} {Device} auf {Saturation_Value}
SaturationIntent stelle sättigung {article} {Device} {preposition} {Room} auf {Saturation_Value}

SaturationIntentB sättige {Device} {Saturation_ValueB}
SaturationIntentB sättige {Device} {preposition} {Room} {Saturation_ValueB}
SaturationIntentB sättige {article} {Device} {Saturation_ValueB}
SaturationIntentB sättige {article} {Device} {preposition} {Room} {Saturation_ValueB}


prozentIntent stelle {Device} auf {prozent_Value} prozent
prozentIntent stelle {Device} {preposition} {Room} auf {prozent_Value} prozent
prozentIntent stelle {article} {Device} auf {prozent_Value} prozent
prozentIntent stelle {article} {Device} {preposition} {Room} auf {prozent_Value} prozent


gradIntent stelle {Device} auf {grad_Value} grad
gradIntent stelle {Device} {preposition} {Room} auf {grad_Value} grad
gradIntent stelle {article} {Device} auf {grad_Value} grad
gradIntent stelle {article} {Device} {preposition} {Room} auf {grad_Value} grad


TargetPositionIntent mach den {Device} {TargetPosition_Value}
TargetPositionIntent mach den {Device} {preposition} {Room} {TargetPosition_Value}


BrightnessIntent stelle helligkeit {Device} auf {Brightness_Value} prozent
BrightnessIntent stelle helligkeit {Device} {preposition} {Room} auf {Brightness_Value} prozent
BrightnessIntent stelle helligkeit {article} {Device} auf {Brightness_Value} prozent
BrightnessIntent stelle helligkeit {article} {Device} {preposition} {Room} auf {Brightness_Value} prozent


HueIntent stelle {Device} auf {Hue_Value}
HueIntent stelle {Device} {preposition} {Room} auf {Hue_Value}
HueIntent stelle {article} {Device} auf {Hue_Value}
HueIntent stelle {article} {Device} {preposition} {Room} auf {Hue_Value}

HueIntentB färbe {Device} {Hue_ValueB}
HueIntentB färbe {Device} {preposition} {Room} {Hue_ValueB}
HueIntentB färbe {article} {Device} {Hue_ValueB}
HueIntentB färbe {article} {Device} {preposition} {Room} {Hue_ValueB}


OnIntent schalte {Device} {On_Value}
OnIntent schalte {Device} {preposition} {Room} {On_Value}
OnIntent schalte {article} {Device} {On_Value}
OnIntent schalte {article} {Device} {preposition} {Room} {On_Value}

FHEMgutenMorgenIntent guten morgen
FHEMguteNachtIntent gute nacht

StatusIntent status
StatusIntent {Device} status
StatusIntent status von {Device}
StatusIntent wie ist der status von {Device}
StatusIntent wie ist der status {preposition} {Room}

RoomAnswerIntent {preposition} {Room}

RoomListIntent raumliste
DeviceListIntent geräteliste
DeviceListIntent geräteliste {Room}
DeviceListIntent geräteliste für {article} {Room}


Beachte: Solltest du noch den Schema aus dem "originalen" Post haben (erkennt man ganz gut an der durchgehenden Großschreibung der Slottypes und der korrespondierenden Aufrufe im Schema Intenet, erstmal nach folgendem Post vorgehen:

https://forum.fhem.de/index.php/topic,60244.msg540117.html#msg540117

Also kurz gesprochen:

Schema Intent "leeren", sodass nur noch folgendes drin steht:

{
   "intents" : [
   ]
}


und die Sample Utterance gleichfalls leeren - dürfen wirklich komplett leer sein, dann ein Save machen, dann die Slottypes anpassen und danach den Schema und die Utterance befüllen und abschliessend speichern.

6. alexa-fhem neu starten

Ich kann diese "komische" Meldung zwar immer noch provozieren, liegt aber eher an den Devices mit welchen in rumspiele - für Licht, Dummies, Heizung usw. tut es nun allerdings so wie es tun soll.

Grüße - Bernd




kud

Probleme mit Custom-Skill

Ein. "Alexa, sage oskar stelle die Heizung im Arbeitszimmer auf 20 Grad"
ergibt:
[2017-01-20 09:47:42] IntentRequest
[2017-01-20 09:47:42] gradIntent
[2017-01-20 09:47:42] [FHEM]   executing: http://192.168.1.104:8083/fhem?cmd=%7B$defs%7BAlexa1%7D-%3E%7B%22active%22%7D%20=%201%7D&XHR=1
[2017-01-20 09:47:42] [FHEM]   executing: http://192.168.1.104:8083/fhem?cmd=setreading%20Alexa1%20intent%20IntentRequest%20gradIntent&XHR=1
[2017-01-20 09:47:42] [FHEM]   executing: http://192.168.1.104:8083/fhem?cmd=%7B$defs%7BAlexa1%7D-%3E%7B%22active%22%7D%20=%200%7D&XHR=1
[2017-01-20 09:47:42] 0
[2017-01-20 09:47:42] grad
[2017-01-20 09:47:42] gradIntent
[2017-01-20 09:47:42] [ 'TargetTemperature' ]
[2017-01-20 09:47:42] TargetTemperature
[2017-01-20 09:47:42] gradIntent -> grad
[2017-01-20 09:47:42] grad
[2017-01-20 09:47:42] gradIntent
[2017-01-20 09:47:42] [ 'TargetTemperature' ]
[2017-01-20 09:47:42] TargetTemperature
[2017-01-20 09:47:42] gradIntent -> grad
[2017-01-20 09:47:42] grad
[2017-01-20 09:47:42] gradIntent
[2017-01-20 09:47:42] [ 'TargetTemperature' ]
[2017-01-20 09:47:42] TargetTemperature
[2017-01-20 09:47:42] gradIntent -> TargetTemperature
[2017-01-20 09:47:42] [FHEM] Heizung_Arbeitszimmer_Clima: executing set cmd for TargetTemperature with value ?
[2017-01-20 09:47:42] [FHEM]   executing: http://192.168.1.104:8083/fhem?cmd=set%20Heizung_Arbeitszimmer_Clima%20desired-temp%20?&XHR=1
[2017-01-20 09:47:42] grad
[2017-01-20 09:47:42] gradIntent
[2017-01-20 09:47:42] [ 'TargetTemperature' ]
[2017-01-20 09:47:42] TargetTemperature
[2017-01-20 09:47:42] gradIntent -> grad
response :{"version":"1.0","sessionAttributes":{},"response":{"outputSpeech":{"type":"PlainText","text":"Ich habe Ich kann undefined nicht auf ? schalten., Ich kann undefined nicht auf ? schalten.,  heizung und Ich kann undefined nicht auf ? schalten. auf ? grad gestellt"},"shouldEndSession":true,"card":{"type":"Simple","title":"gradIntent","content":"Ich kann undefined nicht auf ? schalten., Ich kann undefined nicht auf ? schalten.,  heizung und Ich kann undefined nicht auf ? schalten. auf ? grad gestellt"}}}


Versteht Alexa meine gesprochene Zahl nicht ?

hansemann

Zitat von: baerbel am 20 Januar 2017, 08:25:25
Hallo Jo,

ich bin noch mal Schritt für Schritt vorgegangen -

1. developer.amazon.com öffnen
2. dort über Alexa Menüpunkt auf meinen custom skill gegangen und den Punkt "interaction Model" ausgewählt
3. in FHEM auf alexa-fhem
4. Dort ein get <deine Alexa Instanz> InteractionModel
5. die dort gelisteten Werte für Intent Schema und Sample Utterances und Custom Slot Types per copy und paste in den Custom skill in den jeweiligen Abschnitt kopiert und bei der Gelegenheit auch gleich noch FHEM_Room und FHEM_Device kontrolliert. Meine Ausgabe für für den unter 4. genannten "Befehl" sieht folgendermassen aus:

{
   "intents" : [
      {
         "intent" : "SaturationIntent",
         "slots" : [
            {
               "name" : "article",
               "type" : "FHEM_article"
            },
            {
               "type" : "FHEM_Device",
               "name" : "Device"
            },
            {
               "name" : "preposition",
               "type" : "FHEM_preposition"
            },
            {
               "type" : "FHEM_Room",
               "name" : "Room"
            },
            {
               "name" : "Saturation_Value",
               "type" : "AMAZON.NUMBER"
            }
         ]
      },
      {
         "intent" : "SaturationIntentB",
         "slots" : [
            {
               "type" : "FHEM_article",
               "name" : "article"
            },
            {
               "name" : "Device",
               "type" : "FHEM_Device"
            },
            {
               "name" : "preposition",
               "type" : "FHEM_preposition"
            },
            {
               "name" : "Room",
               "type" : "FHEM_Room"
            },
            {
               "name" : "Saturation_ValueB",
               "type" : "AMAZON.NUMBER"
            }
         ]
      },
      {
         "slots" : [
            {
               "name" : "article",
               "type" : "FHEM_article"
            },
            {
               "name" : "Device",
               "type" : "FHEM_Device"
            },
            {
               "name" : "preposition",
               "type" : "FHEM_preposition"
            },
            {
               "type" : "FHEM_Room",
               "name" : "Room"
            },
            {
               "name" : "prozent_Value",
               "type" : "AMAZON.NUMBER"
            }
         ],
         "intent" : "prozentIntent"
      },
      {
         "slots" : [
            {
               "type" : "FHEM_article",
               "name" : "article"
            },
            {
               "name" : "Device",
               "type" : "FHEM_Device"
            },
            {
               "name" : "preposition",
               "type" : "FHEM_preposition"
            },
            {
               "name" : "Room",
               "type" : "FHEM_Room"
            },
            {
               "name" : "grad_Value",
               "type" : "AMAZON.NUMBER"
            }
         ],
         "intent" : "gradIntent"
      },
      {
         "intent" : "TargetPositionIntent",
         "slots" : [
            {
               "type" : "FHEM_article",
               "name" : "article"
            },
            {
               "type" : "FHEM_Device",
               "name" : "Device"
            },
            {
               "name" : "preposition",
               "type" : "FHEM_preposition"
            },
            {
               "type" : "FHEM_Room",
               "name" : "Room"
            },
            {
               "name" : "TargetPosition_Value",
               "type" : "TargetPosition_Value"
            }
         ]
      },
      {
         "intent" : "BrightnessIntent",
         "slots" : [
            {
               "name" : "article",
               "type" : "FHEM_article"
            },
            {
               "name" : "Device",
               "type" : "FHEM_Device"
            },
            {
               "type" : "FHEM_preposition",
               "name" : "preposition"
            },
            {
               "name" : "Room",
               "type" : "FHEM_Room"
            },
            {
               "name" : "Brightness_Value",
               "type" : "AMAZON.NUMBER"
            }
         ]
      },
      {
         "intent" : "HueIntent",
         "slots" : [
            {
               "type" : "FHEM_article",
               "name" : "article"
            },
            {
               "name" : "Device",
               "type" : "FHEM_Device"
            },
            {
               "type" : "FHEM_preposition",
               "name" : "preposition"
            },
            {
               "type" : "FHEM_Room",
               "name" : "Room"
            },
            {
               "name" : "Hue_Value",
               "type" : "Hue_Value"
            }
         ]
      },
      {
         "intent" : "HueIntentB",
         "slots" : [
            {
               "type" : "FHEM_article",
               "name" : "article"
            },
            {
               "type" : "FHEM_Device",
               "name" : "Device"
            },
            {
               "type" : "FHEM_preposition",
               "name" : "preposition"
            },
            {
               "name" : "Room",
               "type" : "FHEM_Room"
            },
            {
               "name" : "Hue_ValueB",
               "type" : "Hue_ValueB"
            }
         ]
      },
      {
         "intent" : "OnIntent",
         "slots" : [
            {
               "name" : "article",
               "type" : "FHEM_article"
            },
            {
               "name" : "Device",
               "type" : "FHEM_Device"
            },
            {
               "type" : "FHEM_preposition",
               "name" : "preposition"
            },
            {
               "name" : "Room",
               "type" : "FHEM_Room"
            },
            {
               "name" : "On_Value",
               "type" : "On_Value"
            }
         ]
      },
      {
         "intent" : "FHEMgutenMorgenIntent"
      },
      {
         "intent" : "FHEMguteNachtIntent"
      },
      {
         "slots" : [
            {
               "type" : "FHEM_Device",
               "name" : "Device"
            },
            {
               "name" : "preposition",
               "type" : "FHEM_preposition"
            },
            {
               "name" : "Room",
               "type" : "FHEM_Room"
            }
         ],
         "intent" : "StatusIntent"
      },
      {
         "slots" : [
            {
               "name" : "preposition",
               "type" : "FHEM_preposition"
            },
            {
               "name" : "Room",
               "type" : "FHEM_Room"
            }
         ],
         "intent" : "RoomAnswerIntent"
      },
      {
         "intent" : "RoomListIntent"
      },
      {
         "slots" : [
            {
               "type" : "FHEM_article",
               "name" : "article"
            },
            {
               "type" : "FHEM_Room",
               "name" : "Room"
            }
         ],
         "intent" : "DeviceListIntent"
      },
      {
         "intent" : "AMAZON.CancelIntent"
      },
      {
         "intent" : "AMAZON.StopIntent"
      }
   ]
}

Custom Slot Types:
------------------
FHEM_article
  der
  die
  das
  den
FHEM_preposition
  in
  im
  in der
Hue_Value
  blau
  grün
  rot
Hue_ValueB
  blau
  grün
  rot
On_Value
  an
  ein
  aus
  um
TargetPosition_Value
  auf
  zu

Sample Utterances:
------------------
SaturationIntent stelle sättigung {Device} auf {Saturation_Value}
SaturationIntent stelle sättigung {Device} {preposition} {Room} auf {Saturation_Value}
SaturationIntent stelle sättigung {article} {Device} auf {Saturation_Value}
SaturationIntent stelle sättigung {article} {Device} {preposition} {Room} auf {Saturation_Value}

SaturationIntentB sättige {Device} {Saturation_ValueB}
SaturationIntentB sättige {Device} {preposition} {Room} {Saturation_ValueB}
SaturationIntentB sättige {article} {Device} {Saturation_ValueB}
SaturationIntentB sättige {article} {Device} {preposition} {Room} {Saturation_ValueB}


prozentIntent stelle {Device} auf {prozent_Value} prozent
prozentIntent stelle {Device} {preposition} {Room} auf {prozent_Value} prozent
prozentIntent stelle {article} {Device} auf {prozent_Value} prozent
prozentIntent stelle {article} {Device} {preposition} {Room} auf {prozent_Value} prozent


gradIntent stelle {Device} auf {grad_Value} grad
gradIntent stelle {Device} {preposition} {Room} auf {grad_Value} grad
gradIntent stelle {article} {Device} auf {grad_Value} grad
gradIntent stelle {article} {Device} {preposition} {Room} auf {grad_Value} grad


TargetPositionIntent mach den {Device} {TargetPosition_Value}
TargetPositionIntent mach den {Device} {preposition} {Room} {TargetPosition_Value}


BrightnessIntent stelle helligkeit {Device} auf {Brightness_Value} prozent
BrightnessIntent stelle helligkeit {Device} {preposition} {Room} auf {Brightness_Value} prozent
BrightnessIntent stelle helligkeit {article} {Device} auf {Brightness_Value} prozent
BrightnessIntent stelle helligkeit {article} {Device} {preposition} {Room} auf {Brightness_Value} prozent


HueIntent stelle {Device} auf {Hue_Value}
HueIntent stelle {Device} {preposition} {Room} auf {Hue_Value}
HueIntent stelle {article} {Device} auf {Hue_Value}
HueIntent stelle {article} {Device} {preposition} {Room} auf {Hue_Value}

HueIntentB färbe {Device} {Hue_ValueB}
HueIntentB färbe {Device} {preposition} {Room} {Hue_ValueB}
HueIntentB färbe {article} {Device} {Hue_ValueB}
HueIntentB färbe {article} {Device} {preposition} {Room} {Hue_ValueB}


OnIntent schalte {Device} {On_Value}
OnIntent schalte {Device} {preposition} {Room} {On_Value}
OnIntent schalte {article} {Device} {On_Value}
OnIntent schalte {article} {Device} {preposition} {Room} {On_Value}

FHEMgutenMorgenIntent guten morgen
FHEMguteNachtIntent gute nacht

StatusIntent status
StatusIntent {Device} status
StatusIntent status von {Device}
StatusIntent wie ist der status von {Device}
StatusIntent wie ist der status {preposition} {Room}

RoomAnswerIntent {preposition} {Room}

RoomListIntent raumliste
DeviceListIntent geräteliste
DeviceListIntent geräteliste {Room}
DeviceListIntent geräteliste für {article} {Room}


Beachte: Solltest du noch den Schema aus dem "originalen" Post haben (erkennt man ganz gut an der durchgehenden Großschreibung der Slottypes und der korrespondierenden Aufrufe im Schema Intenet, erstmal nach folgendem Post vorgehen:

https://forum.fhem.de/index.php/topic,60244.msg540117.html#msg540117

Also kurz gesprochen:

Schema Intent "leeren", sodass nur noch folgendes drin steht:

{
   "intents" : [
   ]
}


und die Sample Utterance gleichfalls leeren - dürfen wirklich komplett leer sein, dann ein Save machen, dann die Slottypes anpassen und danach den Schema und die Utterance befüllen und abschliessend speichern.

6. alexa-fhem neu starten

Ich kann diese "komische" Meldung zwar immer noch provozieren, liegt aber eher an den Devices mit welchen in rumspiele - für Licht, Dummies, Heizung usw. tut es nun allerdings so wie es tun soll.

Grüße - Bernd


Das sieht ja komplett anders aus als in der Anleitung beschrieben. Dann ist das natürlich klar, dass es nicht funktioniert. Ich werde es gleich mal ausprobieren, danke.

Zitat von: kud am 20 Januar 2017, 09:54:15
Probleme mit Custom-Skill

Ein. "Alexa, sage oskar stelle die Heizung im Arbeitszimmer auf 20 Grad"
ergibt:
[2017-01-20 09:47:42] IntentRequest
[2017-01-20 09:47:42] gradIntent
[2017-01-20 09:47:42] [FHEM]   executing: http://192.168.1.104:8083/fhem?cmd=%7B$defs%7BAlexa1%7D-%3E%7B%22active%22%7D%20=%201%7D&XHR=1
[2017-01-20 09:47:42] [FHEM]   executing: http://192.168.1.104:8083/fhem?cmd=setreading%20Alexa1%20intent%20IntentRequest%20gradIntent&XHR=1
[2017-01-20 09:47:42] [FHEM]   executing: http://192.168.1.104:8083/fhem?cmd=%7B$defs%7BAlexa1%7D-%3E%7B%22active%22%7D%20=%200%7D&XHR=1
[2017-01-20 09:47:42] 0
[2017-01-20 09:47:42] grad
[2017-01-20 09:47:42] gradIntent
[2017-01-20 09:47:42] [ 'TargetTemperature' ]
[2017-01-20 09:47:42] TargetTemperature
[2017-01-20 09:47:42] gradIntent -> grad
[2017-01-20 09:47:42] grad
[2017-01-20 09:47:42] gradIntent
[2017-01-20 09:47:42] [ 'TargetTemperature' ]
[2017-01-20 09:47:42] TargetTemperature
[2017-01-20 09:47:42] gradIntent -> grad
[2017-01-20 09:47:42] grad
[2017-01-20 09:47:42] gradIntent
[2017-01-20 09:47:42] [ 'TargetTemperature' ]
[2017-01-20 09:47:42] TargetTemperature
[2017-01-20 09:47:42] gradIntent -> TargetTemperature
[2017-01-20 09:47:42] [FHEM] Heizung_Arbeitszimmer_Clima: executing set cmd for TargetTemperature with value ?
[2017-01-20 09:47:42] [FHEM]   executing: http://192.168.1.104:8083/fhem?cmd=set%20Heizung_Arbeitszimmer_Clima%20desired-temp%20?&XHR=1
[2017-01-20 09:47:42] grad
[2017-01-20 09:47:42] gradIntent
[2017-01-20 09:47:42] [ 'TargetTemperature' ]
[2017-01-20 09:47:42] TargetTemperature
[2017-01-20 09:47:42] gradIntent -> grad
response :{"version":"1.0","sessionAttributes":{},"response":{"outputSpeech":{"type":"PlainText","text":"Ich habe Ich kann undefined nicht auf ? schalten., Ich kann undefined nicht auf ? schalten.,  heizung und Ich kann undefined nicht auf ? schalten. auf ? grad gestellt"},"shouldEndSession":true,"card":{"type":"Simple","title":"gradIntent","content":"Ich kann undefined nicht auf ? schalten., Ich kann undefined nicht auf ? schalten.,  heizung und Ich kann undefined nicht auf ? schalten. auf ? grad gestellt"}}}


Versteht Alexa meine gesprochene Zahl nicht ?

@kud  Das sieht bei mir genauso aus, vielleicht hast du dasselbe Problem wie ich. Probier mal Bernds Lösung.

baerbel

#1448
Hi in die Runde,

das Thema des "Garagentor" Tasters hat mir keine Ruhe gegeben, da ich via Alexa einfach nur sagen wollte: Alexa, sage XXXX öffne das Garagentor:

Nur für den Fall, dass es jemand umsetzten will:

ich verwende hier keinen Dummy, sondern gehe direkt auf das Tasterdevice (heisst bei mir: Taster.Garage.Tor) was ein "HM-LC-SW1-BA-PCB" ist. Geschaltet wird mit einem "set Taster.Garage.Tor on-for-timer 1".

das ganzer läuft über ein DOIF:

([MyAlexa:fhemIntent] eq "oeffnedasGaragentor")(set Taster.Garage.Tor on-for-timer 1)

Damit man das ganze nutzen kann habe ich mich der fhemintents bedient - mein fhemIntent zum öffnen sieht folgendermassen aus:

oeffnedasGaragetor=Öffne das Garagentor

Also im Alexa device in FHEMIntents obenstehende Zeile einfügen.

Im Alexa device in FHEM über get <dein Alexa device> InteractionModel den neuen Schema Intent und die Sample Utterances in developer.amazon.com im bestehenden custom skill anpassen (am besten löschen und per copy & paste aus fhem übertragen).

Speichern, alexa-fhem neu starten und dann sollte es tun.

Ich habe hier nur den Schritt fürs öffnen beschrieben - schliessen, stoppen funktioniert analog und wird bei den meisten vermutlich noch durch die Abfrage andere Parameter funktionieren (Fensterkontakte am Tor oder Neigungssensoren)

Ich hoffe ich habe nichts vergessen -

Grüße - Bernd

kud

#1449
@baerbel
Mir scheint der Code aber nicht übereinzustimmen
einmal DoIf "oeffnedieGarage" und der Intent "oeffnedasGaragetor" ?

Zudem wenn man mit FhemIntents anfängt muss man alles von Hand einpflegen. Oder sehe ich das falsch?

chris1284

könnte jemand genauer definieren was

alexaConfirmationLevel 1 und 2 genau machen und unterscheidet ( - einstellbare gesprächigkeit bei antworten: alexaConfirmationLevel attribut ist jetzt nicht sehr eindeutig)
alexaStatusLevel 1 und 2 genau machen und unterscheidet d(dazu habe ich keine infos gefunden was es überhauot macht)

die commandref dazu ist auch ehr mau.

ziel war eigentlich herauszufinden ob man alexa sagen kann sie soll auch kein "OK" ausgeben wenn sie einen befehl ausgeführt hat. ich habe beides mal auf 1 gesetzt aber stelle keine veränderung fest

baerbel

Hi,

Stimmt und stimmt - den Code habe ich Version eins und Version zwei bei mir Raubkopien - somit muss man sich durchwind für das gleiche Gehminuten entscheiden - Danke dir !!

Und ja, du machst alles händisch - soll auch zumindest nicht für mich für alles so laufen, derzeit scheint es aber zumindest für den Fall keine "eleganter" Lösung zu geben, um einen schönen Satz sprechen zu können.

Im Alexa mapping benötigst du ja immer ein Verb ... und wenn öffnen oder schließen verwenden wollen würdest kannst du keine Aktion mehr festlegen, wenn es noch ein deutscher Satz bleiben soll.

Grüsse - Bernd

baerbel

Und vom iPhone sehe ich gerade leider massiv die Rechtschreibung - sind ja keine Raubkopie sondern es wurde rum kopiert .... etc.

nesges

Zitat von: chris1284 am 20 Januar 2017, 13:46:40
könnte jemand genauer definieren was alexaConfirmationLevel 1 und 2

ohne es ausprobiert zu haben, in lib/server.js geschaut:

if( fhem && fhem.alexaConfirmationLevel < 2 )
              response.response.outputSpeech.text = 'OK.';


bei Level 2 sollte kein "Ok" kommen

chris1284