From A to Snips - HA on Hass.io + external Snips guide

Yeah I did it yesterday and thought to write it down before I forget everything, to help others having the same questions than me :slight_smile:

I was looking on the web for a good guide to setup snips and integrate it to Hassio so i’m definitely
going to follow your guide. Thanks for taking the time to write it down. :+1:

1 Like

Love to hear that my effort is already helping somebody :slight_smile:

Hi!

Well first THANK YOU!

Ad proton999 told before I was looking for a guide to move from Google Assistant to Snips ( avoiding cloud and maintaing WAF as high as possible).

Morevore few days ago Project Alice have been released:

Have a look!

2 Likes

That looks really cool. I will definitely have a look at a later time, but for now I will continue to use my very slim and basic setup as creating things myself is the best way to learn a lot about Snips and Home Assistant :slight_smile:

Basically the availability of pre defined modules and that most HowTos make use of them was one reason that prevented me from understanding some important things about Snips and how it interacts with Home Assistant.

Updated the guide with Snips custom slots - very useful :slight_smile:

Hi HorinzoKane,

first of all, thanks for that tutorial. To be honest, I got into the same trouble you have been in and I am still trying to solve it. Probably you have an idea how to do.

So my situation is:
0. Hardware: Snips Tool Kit (pi 3b+ with all the other parts)

  1. I installed SNIPS based on the way how it is done on the snips installation guide: using Etcher to burn the image on SD, installing npm on windows, using SAM to install snips on the pi and so on.
    Everything is working, Snips is running and so on.
  2. After I installed python3.7 (I saw later, that 3.7 was already installed on the pi, but it was too late)
  3. I installed home assistant and it is running, exept that I do not get the hassio/dashboard and store running on the pi. After I configured the mqtt and from my prospective it seems to run.
    But currently it seems that I only the standard snips app (Temperature and Humidity) is running but not the home assistant app.
    My problem is, I do not know if it is regarding the code in the snips-apps or the connectivity between snips-hass.

On a 2nd SD I tried the other way round:

  1. Etcher with hassio
  2. Configuring hassio (Configurator, Terminal and SSH)
  3. Here I do not get the SAM connectivity to the pi. I know there is a problem with the key for the SAM connection but to be honest I got stuck
  4. Based on the missing SAM connectivity I - up to know - was not able to install the Snips system.

Any tips from your side. Probably we could also discuss it on pm in german.
Ciao
DJ

Hi Picasso,

You are trying something different than what I did. I installed Hass.io with Home Assistant on one Pi 4 and Debian Stretch Lite and Snips on another Pi 3. I don’t know the Snips Toolkit but I also had problems running the Snips App from Hass.io store when testing. It recognized voice but threw errors. I assumed it is because I use a Pi 4, but never troubleshooted that to the end.

The Addon Store is only available on Hass.io btw.

The point is: Do you really want to run Home Assistant and Snips on one Pi? I like my Home Assistant very stable and installing software there, messing with config files, running scripts to modify Snips or whatever is not exactly compatible to that need.

For that reasons I stopped trying and created the setup with two Pis, that way I can run Snips and HA both the way I like it most.

I will now order 2 or 3 Pi Zero to act as sattelite for my master Snips in other rooms.

If you like a german chat to discuss individual questions, we could easily send PMs I guess.

Well having ONE pi with HA+Snips will be cheaper. Moreover my project will be to have snips as server on the same machine running Hassio + many Snips satellite (pi zero for example) so I can dismiss all my minis around my apartment.

Okay, thats up to you of course.

I also failed in connecting to the Snips MQTT on Hass.io and got authentication errors.

To mitigate this you could try the following:

  • Install MQTT
  • Create a user for mqtt (in Home Assistant)
  • Update configuration.yaml and snips.toml (no idea how to get there in hass.io) as shown in my guide

I added my mqtt potion of snips.toml to the guide.

Hi HorizonKane,

to be honest, I did not think about running home assistant on another pi up to know, but you are right.
Struggeling days for getting it running it is more convenient to get another pi and run the system stable on different pis. And then I can configure each individually. I think I will try that.
Thanks und Grüße aus dem Ruhrpott
DJ

1 Like

Yes it’s worth the money, saves a lot of your lifetime by reducing stress :wink:

Grüße zurück aus dem Ruhrpott :smiley:

I had a big success - Snips gets my intent and deliver it to hass.io.
The problem now I can’t hear any voice.
Which one need to do the talks? snips or ha?

When i test each individually they do the talk very well

I get my reply from HA as I put speech in the intent_scripts:

intent_script:  
  addItem:
    speech:
      type: plain
      text: 'Ist notiert!'
    action:
      - service: shopping_list.add_item
        data_template:
          name: '{{ howMany }} {{ whichUnit }} {{ whichItem }}'

Ist that working for you? (If you want to use this example you need a shopping list and an intent with three slots, but you can try in any intent_script)

I plan to publish my HA assistant and all the intent_scripts as soon as I finished implementing some more stuff (thermostats and some other features) but it will only be helpful for germans I think ^^

A BIG success

 PlaySong:
    speech:
        type: plain
        text: 'OK, Playing song in {{ Location }}'
    action:
      - service_template: media_player.play_media
        data_template:
            entity_id: media_player.master_bedroom_player
            media_content_id: local:track:song.mp3
            media_content_type: music

I triggered a song with my voice.
The only thing that doesn’t work now is the speech part
Any suggestion?

And, can I short the waiting time for my next voice command?
I have to wait until I get this line in the log

[11:42:13] [Dialogue] session with id 'bf0448f5-5595-4ab8-9891-32e3d1dc52d9' was ended on site default. The session was ended because one of the component didn't respond in a timely manner

And last, how to change the entity to take the location dynamically?
When I put intent {{ Location }} it doesn’t work.
I guess I don’t know how to define the media player correctly

PlaySong:
    speech:
        type: plain
        text: 'OK, Playing song in {{ Location }}'
    action:
      - service_template: media_player.play_media
        data_template:
            entity_id: media_player.{{ Location }}
            media_content_id: local:track:song.mp3
            media_content_type: music

media_player:
  - platform: mpd
    host: 192.168.XXX.XXX
    name: master_bedroom_player

You can definitely change it, but be aware that you also have to talk faster then after saying hey Snips :wink:

I did not change that yet but I think you should find the necessary parameter here https://docs.snips.ai/articles/platform/platform-configuration

Any idea anyone why hass doesnt do the speech part for me?

When i trigger a tts test it works fine, so i know that the speaker is fine.

This means that Snips talked to Home Assistant but got no response that whatever was done successfully I think.

Is Location a slot in your PlaySong intent in the Snips assistant?
Did you maintain correct upper / lower case everywhere?
Did you remember to deploy the new assistant / update it on the snips Pi after changing stuff?

Can you please show the whole thing “sam watch” shows when you use that intent?

I know and this is ok because there isn’t an action associated to the skill. My problem is the time it takes snips until he understand there isn’t any action. In this time i can’t talk to sbips and ask him to do more stuff.

Yes, yes and yes