[OUTDATED Snips is dead!] Voice Control - How to use Snips AI and MQTT 2.4

How can I send item values to my snips.ai?
For Example when I ask “How is the temperature in the living room” and Snips tell me the actual temperature in this room?
an other question I have is: is it better to have channels for every Intent or divide the Intent in my rule and have a very big snips rule?

Thank you very much.

I extracted sessionid, but I have problem with this line

“endsession = json.dumps({“sessionId”:sessionid})”
Everytime I have this error
Configuration model ‘snips.rules’ has errors, therefore ignoring it: [36,38]: mismatched input ‘:’ expecting ‘}’
[36,39]: missing ‘)’ at ‘sessionid’

Because of it, I can’t publish “sessionId:xxx-xxx-xxx-xxx” to Snips, I can only publish “xxx-xxx-xxx-xxx” if I remove “:” from command, but It isn’t enough to end session. It looks like openhab doesn’t like “:” mark

I think you used the syntax from the jython tutorial in a rules DSL rule. This will not work. You will have to use the syntax of the rules DSL for json formatting. Unfortunately I don’t know that :confused:. A way would be to use a Javascript transformation maybe.
Best regards Johannes

1 Like

You’re right, now I see my stupid mistakes. Thanks for help, now I know what to do :slight_smile:

Snips AI looks really interesting, I will test it soon. Maybe we could propose a simplified integration in openHAB that could hide MQTT and complex rules?