Please help - Snips doesn't populate MQTT anymore?

Hi there,

I’ve got a Snips Master/Slave setup, I didn’t use it for a while and somehow it’s not workign anymore.
Here is my config: https://pastebin.com/wzJNy6yP

I’ve updated the assistant, status says:

Connected to device 192.168.1.60

OS version ................... Raspbian GNU/Linux 9 (stretch)
Installed assistant .......... snip
Language ..................... de
Hotword ...................... hey_snips
ASR engine ................... snips
Status ....................... Live

Service status:

snips-analytics .............. 0.62.3 (not running)
snips-asr .................... 0.62.3 (running)
snips-audio-server ........... 0.62.3 (not running)
snips-dialogue ............... 0.62.3 (running)
snips-hotword ................ 0.62.3 (running)
snips-nlu .................... 0.62.3 (running)
snips-skill-server ........... 0.62.3 (not running)
snips-tts .................... 0.62.3 (running)

If I use a skill, e.g. “Wetter aktuell” the output is:

$ sam watch
[14:37:16] Watching on localhost:1883 (MQTT)
[14:37:18] [Hotword] detected on site wz, for model hey_snips
[14:37:18] [Asr] was asked to stop listening on site wz
[14:37:18] [Hotword] was asked to toggle itself 'off' on site wz
[14:37:18] [Dialogue] session with id '629a305b-04ec-4696-bf5f-84ae800f52e2' was started on site wz
[14:37:18] [AudioServer] was asked to play a wav of 41.1 kB with id 'eb47ffc1-797b-46fc-a0f0-c071abdd5184' on site wz
[14:37:19] [AudioServer] finished playing wav with id 'eb47ffc1-797b-46fc-a0f0-c071abdd5184'
[14:37:19] [Asr] was asked to listen on site wz
[14:37:22] [Asr] captured text "wetter aktuell" in 3.0s
[14:37:22] [Asr] was asked to stop listening on site wz
[14:37:22] [AudioServer] was asked to play a wav of 93.1 kB with id '3c271415-24c2-4a6a-8450-9ef870c45f81' on site wz
[14:37:24] [AudioServer] finished playing wav with id '3c271415-24c2-4a6a-8450-9ef870c45f81'
[14:37:24] [Nlu] was asked to parse input "wetter aktuell"
[14:37:40] [Dialogue] session with id '629a305b-04ec-4696-bf5f-84ae800f52e2' was ended on site wz. The session was ended because one of the component didn't respond in a timely manner
[14:37:40] [Asr] was asked to stop listening on site wz
[14:37:40] [Hotword] was asked to toggle itself 'on' on site wz

I’m connecting to the queue with:

mosquitto_sub -v -h 192.168.1.60 -p 1883 -t 'hermes/intent/#'

But I don’t get any output.
Did anything change?
How can I further debug this?

Hey @chbla,

maybe you can see more with the log output:
Restart the snips services with
sam service restart
and output the snips log with
sam service log

Then try your voice command again - maybe the log output will throw errors with the NLU, because the NLU didn’t answer in your sam watch output.
If you don’t understand the log output, post it here :slight_smile:

Thanks a lot!
Apparently the NLU service crashes: https://pastebin.com/CftStrkS
Can I update/reinstall/fix it somehow? It seems to be caused by different versions?

Maybe you installed a new assistant from the console but no updates of the snips-packages - There was a huge update few weeks ago.

So you can try to update your installation with sam update… But I can’t guarantee that it will work after that.

I did sam update and sam update-assistant, but still get the same error…

I found the lines which explain the errors:

ERROR:snips_nlu_hermes: nlu thread ended with error: 
Unable to read file '/usr/share/snips/assistant/nlu_engine/nlu_engine.json'
 -> caused by: Expected model version 0.19.0 but found 0.20.0

So indeed you have not the latest snips-packages on your system.
Which Raspbian version do you have?

it’s:

PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)"
NAME="Raspbian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
VERSION_CODENAME=stretch
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

How can I update the packages? Do you mean the debian packages?

Mmh, maybe you can try this directly on your Raspberry Pi (or ssh):

sudo apt update
apt list --upgradable
What is the output of the second command?

Ah, now I see the version in your first message:

snips-analytics .............. 0.62.3 (not running)
snips-asr .................... 0.62.3 (running)
snips-audio-server ........... 0.62.3 (not running)
snips-dialogue ............... 0.62.3 (running)
snips-hotword ................ 0.62.3 (running)
snips-nlu .................... 0.62.3 (running)
snips-skill-server ........... 0.62.3 (not running)
snips-tts .................... 0.62.3 (running)

0.62.3 is very old, 0.64.0 is the newest version.

1 Like

Ah I got it - the apt keys expired and thus snips couldn’t update.
I’ve added new keys and it’s working :slight_smile:

Thanks for your help!

1 Like

Okay one more thing, somehow the audio is received but does not play.
I do hear the ACK after “hey snips” so I guess the audio is working.

This is the service log: https://pastebin.com/EPbsric8
The watch output: https://pastebin.com/571b8U4Z

Any idea what is wrong here?

Is it only your Weather App which doesn’t work or are all apps not working?
If it’s only the one: maybe you can post the code or give the link to it?

I’m using it with Openhab through MQTT. As far as I can see in the watch output the skill works fine and returns a line for TTS

Yes, but Openhab does not return the answer until 6 seconds later, when the session has already ended (but it has nothing to do with the TTS).
Then the TTS was asked to say the sentence, but it seems that the TTS-service is not running or responding correctly. In the log I cannot see what the problem is…

I got it working now … using a satellite with a master (no mic/speaker).
However, somehow now it does everything twice, two confirmation “bings”

:+1:
The twice bings say that there are two snips-dialogue services running. Try to stop and disable it on the satellite device with

sudo systemctl stop snips-dialogue
sudo systemctl disable snips-dialogue

Only the base device should have snips-nlu, snips-asr, snips-dialogue running (as far as I understand).

I’ll have to do a fresh install, the docs are really misleading: https://docs.snips.ai/articles/platform/satellites

It links to to the manual installation procedure but there is no mention of satellites.
It says you only need to install snips-satellite package but lists snips-hotword-model-heysnipsv4
as well…

They write “only install the snips-satellite” because you should not install snips-asr, snips-nlu, snips-dialogue, etc.
The hotword package is necessary if you want the universal hotword - I think you want.

1 Like

got it all working now, thanks again :slight_smile:

1 Like