Ending dialog in the easier way

#1

Hello,
using intent_script and python scripts I can manage to turn on/off light but using snip-watch I see always the line:

[Dialogue] session with id ‘f18506ed-16a2-4936-a756-6aaad984ebe5’ was ended on site default. The session was ended because one of the component didn’t respond in a timely manner

I think that snips expects the endSession with the right id on the mqtt topic.

Do I need to overload every python script on my HA to create/connect/end section in order to do avoid this problem ?
If yes, how can I pass the sessionId to my script ?

#2

yes

you get the session id from the intent topic
https://docs.snips.ai/reference/dialogue#intent
and you pass that back with the end session

#3

Thanks @ozie but since I am using the HA component (and I have to copy the python code on the HA machine) I don’t have the intentMessage object or do I ?