I’m new here and just making my first steps with snips.
The installation on a Raspberry 3 worked well. I can create assistants on the snips console and transfer them to the Raspberry via SAM. I want to send MQTT messages to different devices. Mosquitto is running on the Raspberry and paho-mqtt has been installed. In the first step I wrote short Python scripts in which I send the MQTT messages.
Publish values via MQTT:
paho.mqtt.publish.single(topic=“top/stube/borduere”, payload=str(“ON”), port=1883, hostname=“localhost”)
When called from the console of the Raspberry, it works very well and the message arrives at the target device.
I try to use the Python code that worked in the script in a snippet as action code but it doesn’t work. SAM watch returns these messages:
[17:50:48] [AudioServer] finished playing wav with id ‘c7c07d1e-0762-43fe-9f7d-a88f852f8db7’
[17:50:48] [Nlu] was asked to parse input “licht ein”
[17:50:48] [Nlu] detected intent Erwin:LampenAnSchaltenCopy with confidence score 0.805 for input “licht ein”
[17:50:48] [Dialogue] New intent detected Erwin:LampenAnSchaltenCopy with confidence 0.805
[17:50:54] [Dialogue] session with id ‘85e06052-e692-42e7-a4a9-81921cb4a811’ was ended on site default. The session was ended because one of the component didn’t respond in a timely manner
[17:50:54] [Asr] was asked to stop listening on site default
[17:50:54] [Hotword] was asked to toggle itself ‘on’ on site default
As a test I used an example with speech output for confirmation in a snippet. This works.
Can someone tell me what I’m doing wrong?
Many thanks in advance and many greetings,