If you just want her to respond to the user, you set the ShouldEndSession flag to true and pass one speechOutput object containing what ever it is you want her to say.
If you want her to engage in conversation with the user, you set the ShouldEndSession flag to false and pass two speechOutput objects containing the question or what ever it is you want to ask the user.
The first speechOutput object will be rendered and played to the user, it the user doesn’t resopnds within, I think it’s 3 seconds, alexa will render and play the second speechOutput object to the user, if the user doesn’t respond again, alexa will end the session sending you (the skill) a request of type SessionEnded allowing you (the skill) to do anything you would like to do when a session ends.
The thing is, when alexa sends the SessionEnded event, you’re not supposed to return anything to it, if you do return something, she will tell you that something went wrong with skill.
BTW: alexa will send a SessionEnded request for every ending of the session on the device end, even if there was an error on the device.
The thing is, with AppDaemon, I can’t “not return anything”…
So the result is, when ever a session ended on the device end and not your end (the skill), anything return by AppDaemon will be considered as “something went wrong with the skill”.
So I’m looking for a way to “kill the execution of application” and prevent AppDaemon from returning anything when I receive a SessionEnded request.
BTW: I haven’t tried out the dialogState directive as the documentation states it’s only available with the use of the dialog model withing the skill builder (beta).
I’m still coding for the “old fashion” custom skills.
Maybe it’s a different flow of requests/responds when using the dialogState directive.
It actually makes sense, considering the directive is supposed to allow the skill to issue a progressive response, which means the device needs to be able to accept responds from the skill even after the session ended…
thats the big difference then.
i use the dialogstate directive.
i played around with the “old fashion” way a little bit, but that was not as usefull, because those things i could already accomplish with emulated hue.
Thanks for the feedback.
I’m sure I’ll figure it out eventually, I just have a lot of work lately so I haven’t found the time to try it.
I really like what you did there, maybe I’ll switch to using the dialog directive too.
Based on this thread and some other references, I was able to develop and host my own intents using AppDaemon instead of Amazon Lambda. I used DialogState and the online Amazon Developer console to develop my Alexa skills. Thanks to all above who contributed.
i update my alexa app fast every days in the last weeks.
i even got my wife to have a complete conversation with AD through alexa
at the moment i have got quite a few intents working and the possibility for complete conversations or even goodnight stories.
in a short time i will add at all to my github, so everyone can have fun from it.
i have added my app to my github, but only in german and without instructions.
thats why i didnt tell about it yet.
i will add instructions how to set it up and english version, but you are welcome to look at it as it is: https://github.com/ReneTode/My-AppDaemon/tree/master/apps/alexa
I’m just looking for a large chunk of alexa & appdaemon code. I might be able to read german as long as they are variables , otherwise I’ll get lost. Thanks!