[No solution] Satellite with Hassio?


#1

Hi

After having posted without any much luck in HA forum, I try here. I have setup SNIPS using the Hassio plugin and it works. Now I want to connect to it some satellites (I have already a broker setup and running in hassio for other devices.
Unhappy I’m unable to find in hassio where are config files of snips so I can tweak it for the satellites and I’m not so familiar with all the Docker concept used by Hassio !

Thanks

Vincèn


#2

You really can’t get to it but on the other hand you shouldn’t need to. Just point your satellites to the HassIO MQTT broker and configure them as remotes.


#3

You can tweak a little using snips.toml, which has to be put in the share folder of your hassio.
Other than that there is no tweaking involved, what is that you want to change?


#4

Unhappy if I understand well the snips doc for satellite I need to access the snips main instance config file and not only the broker no ? https://docs.snips.ai/guides/raspberrypi/satellites

Well it makes tweaking impossible if I can’t access the original file used by SNIPS running in hassio as a start !


#5

That depends on what you need to tweak, can you clarify?


#6

Well the tweak as indicated previously is to be able to setup extra satellite on my SNIPS system :wink: which means I need to get access at main config file of my main SNIPS system (according to documentation on SNIPS website !)

Side note: just discovered that the hassio snips addon is in fact not really finished (it uses internal snips broker instead of hassio one as stated in documentation) so it makes impossible to use satellite (as that internal broker is not linked to home-assistant and HA can only handle one MQTT server at a time, and that internal broker is not available on LAN to connect satellites to it :frowning:

Looks like I’ll never succeed to get SNIPS working with HA :frowning:


#7

The snips docs indicate changes, but they are not actually 100% necessary. My master has no changes and works perfectly fine on my remotes.

Side note: So the addon does not work at all to communicate to HA? Not sure how you “discovered” that since the add on runs a mosquitto broker that bridges to the mosquitto broker that you set up in HA and in fact will not even start unless you have an HA broker configured.


#8

Did you read the reply given? Put your modifed snips.toml in /share (set up the samba addon to easily access it) and that will be used for the snips config.


#9

Ok, but for an extra satelite you do not need Snips main config.
Just add the satelite with a different siteid, same as your first satelite.
Snips will start listening to that satelite as well

The Snips add on is finished, if you check here, this is how it works:
The addon is by default birdged, with a connection to the host configured in settings->integrations->mqtt
In my case, the MQTT addon.
When you start snips, that host will be logged as:

[INFO] Setup Hass.io mqtt service to core-mosquitto

You can check that here: https://github.com/home-assistant/hassio-addons/blob/master/snips/run.sh

So, when you point your satelites to the ip adress of your Hassio, the Snips addon will start listening to them.

I have 2 satelites working this way, without issues so your findings are not correct.


#10

You are right, I followed the snips tutorial to setup satellites (skipping the part about editing config files of snips server) and satellites look to be well recognized by server. I added too the siteid of each satellite in HA config file.

Thanks a lot for explanation and it was missing part about how it works as to be honest I have found nearly none documentation specific to snips in hassio (most docs I found was relating to standard snips installation and not specific hassio !) or have not been able to find them. I think I’ll make a little tuto here in forum once I have the whole thing working at is might help other users !

So now my satellites are connected to main snips instance in hassio. My next step now is to get it interact with HA !

I have created a first intent in config file like that to basically toggle a light:

snips:
feedback_sounds: true
site_ids: salon, cuisine, sdb, chambre

intent_script:
HassTurnOn:
speech:
type: plain
text: ‘Cest fait’
action:
- service: switch.toggle
data:
entity_id: switch.salon_suspension

but it’s not working and I noticed now that warning in HA logs:

Intent HassTurnOn is being overwritten by <ScriptIntentHandler - HassTurnOn>.

Side note: my assistant loaded in snips is composed of the HA skill avalaible in the SNIPS console :wink:

Thanks for help

Vincèn


#11

No one on this ?? as not sure what’s the problem here :frowning:


#12

The warning is not a problem, it just says you are redefining the built in intent. What does snips-watch say? Is the intent recognized? Do you have snips configured in HA and is HA getting the mqtt notifications?


#13

I don’t have access at snips-watch as I’m using snips-server in hassio !!
Recognition on intent is so bad :frowning: I do tests in silent room and I have Respeaker 2 hat on my PI to get better recognition but still not really good :frowning:
This is an extract of logs on snips server when I try to put light on ! It looks like only thing he is able to recognize is the wake up word :frowning:
Not sure if problem is with my setup of snips itself or problem somewhere else ??

INFO:snips_hotword_hermes        : Hotword detected: site_id:salon model:default (229ms ago)
[16:08:51] [Hotword] detected on site salon, for model default
INFO:snips_dialogue_lib::coordinator::coordinator: Site [salon]: reset site -> turn off ASR and turn off Hotword
INFO:snips_dialogue_lib::coordinator::coordinator: Session [29f50e17-d3d8-4757-ade1-c3bc5000f322]: The session has been created because the site "salon" is free
[16:08:51] [Asr] was asked to stop listening on site salon
[16:08:51] [Hotword] was asked to toggle itself 'off' on site salon
[16:08:51] [Dialogue] session with id '29f50e17-d3d8-4757-ade1-c3bc5000f322' was started on site salon
[16:08:51] [AudioServer] was asked to play a wav of 41.1 kB with id '5124182f-a49e-4df4-be2e-e2040fca5cce' on site salon
INFO:snips_hotword_lib::audio    : Audio thread for site salon stopped.
[16:09:04] [AudioServer] finished playing wav with id '5124182f-a49e-4df4-be2e-e2040fca5cce'
[16:09:04] [Asr] was asked to listen on site salon
INFO:snips_asr_hermes                    : Listening
INFO:snips_asr_lib::asr                  : T0       entered AsrRunner::run
INFO:snips_asr_lib::asr                  : T0+0.000 capture started
WARN:snips_tts_hermes: Received a "play finished" message from audio server with an unknown id '5124182f-a49e-4df4-be2e-e2040fca5cce'. It could be normal if you have more than one audio server.
INFO:snips_asr_lib::asr                  : T0+4.560 endpoint detected (rule:1) frame:273 samples:69888 signal_time:4.368 rtf:0.628
INFO:snips_asr_lib::asr                  : Source thread stop on push: "Disconnected(..)"
INFO:snips_asr_lib::asr                  : T0+4.562 capture ended
INFO:snips_asr_lib::asr                  : T0+4.568 decoder finalized
INFO:snips_asr_lib::asr                  : T0+4.601 lookup and post-processing done
INFO:snips_asr_lib::asr                  : decoded: [Recognition { decoded_string: "", likelihood: 0.0, tokens: Some([]) }]
INFO:snips_asr_hermes                    : Cleanup
INFO:snips_asr_hermes                    : Preparing decoder
[16:09:09] [Asr] captured text "" in 4.0s
[16:09:09] [Asr] was asked to stop listening on site salon
[16:09:09] [AudioServer] was asked to play a wav of 93.1 kB with id '8f1bc21b-445b-419d-84dd-457dd88aeb7e' on site salon
INFO:snips_asr_hermes                    : Idle
[16:09:20] [AudioServer] finished playing wav with id '8f1bc21b-445b-419d-84dd-457dd88aeb7e'
WARN:snips_tts_hermes: Received a "play finished" message from audio server with an unknown id '8f1bc21b-445b-419d-84dd-457dd88aeb7e'. It could be normal if you have more than one audio server.
[16:09:20] [AudioServer] was asked to play a wav of 61.1 kB with id '13d5a57f-1edf-44a5-a6da-123f82016a45' on site salon
[16:09:32] [AudioServer] finished playing wav with id '13d5a57f-1edf-44a5-a6da-123f82016a45'
WARN:snips_tts_hermes: Received a "play finished" message from audio server with an unknown id '13d5a57f-1edf-44a5-a6da-123f82016a45'. It could be normal if you have more than one audio server.
INFO:snips_dialogue_lib::coordinator::coordinator: Session [29f50e17-d3d8-4757-ade1-c3bc5000f322]: closing session which was active: IntentNotRecognized
INFO:snips_dialogue_lib::coordinator::coordinator: Site [salon]: reset site -> turn off ASR and turn on Hotword
[16:09:32] [Dialogue] session with id '29f50e17-d3d8-4757-ade1-c3bc5000f322' was ended on site salon. The session was ended because the platform didn't understand the user
[16:09:32] [Asr] was asked to stop listening on site salon
[16:09:32] [Hotword] was asked to toggle itself 'on' on site salon
INFO:snips_hotword_lib::audio    : Audio thread for site salon started.

I include also below the config file of snips addon in hassio just in case. I have copied from snips console the assistant done with the HomeAssistant official one in snips console

{
  "assistant": "assistant.zip",
  "language": "fr",
  "custom_tts": {
    "active": false,
    "platform": "amazon_polly"
  }
}

#14

Hmm, yeah it looks like this is the issue here

[16:09:09] [Asr] captured text "" in 4.0s

Are you using the default assistant that comes with the snips addon or have you created your own and copied it to your hassio config folder?


#15

Do you mind to tell me what means that captured text empty ?? Captured text is what he has understood of my speaking right ? so here it means it has recognised nothing at all right ?

I have created my own but basically should be same as default one as I putted in it only the HA “app” no ? I noticed also when I created my assistant in snips console that there is now a Word confidence threshold ! Might it be the problem ? It was by default at 1/3 of scale and didn’t change it !
Just to be sure I redownloaded my assistant from SNIPS console and putted it back in share folder of hassio and restarted SNIPS but not better !! It’s strange because if I remember well first time I replaced the default assistant and restarted SNIPS I could see in logs of snips unarchive of the assistant which is not the case now !

Thanks


#16

Word confidence shouldn’t matter. Can you restart snips and refresh the log until you see a message about the asr loaded a model? Basicalyl empty text means the asr didn’t understand you, and that can happen when the model (your assistant) doesn’t load.


#17

This is all I found after a restart of snips addon in logs:

INFO:snips_hotword::server: Using model from /usr/share/snips/assistant/custom_hotword
INFO:snips_hotword_lib::universal: Loading model "/usr/share/snips/assistant/custom_hotword", hotword_key: None, model_id: None

INFO:snips_asr_hermes: Using model from "/usr/share/snips/assistant/custom_asr"
INFO:snips_asr_hermes: Using model from "/usr/share/snips/assistant/custom_asr"
INFO:snips_kaldi::decode::model: Loading model v2

INFO:snips_asr                 : Connecting using MQTT site-id default
INFO:snips_asr_hermes          : Using model from "/usr/share/snips/assistant/custom_asr"

If I understand well what you told it means that SNIPS is not loading my assistant and so starts completely clean and unable to understand anything out of the wakeup word right ?
Should I try to uninstall/reinstall the snips addon so it puts back default assistant ? unless it won’t help to understand why it refuses my own assistant unless it contains only the HA skills…


#18

If you just delete your assistant, it should go back to using the default, you should give it a try. The other thing is you can try retraining your assistant and putting it back.


#19

Tried both and it’s still exactly the same !! The hotword is always recognised without problem but the command is never captured/understood !!
Not sure what is wrong here but just two things in case:
-> I don’t use snips on main unit (the PI3 that hosts hassio, it hosts only snips server), only on satellites
-> satellites setup implies a modification of the config file of snips on server too but not done as there is no access at snips config file in hassio (someone on HA forum told me it worked fine this way…).

Thanks


#20

oki I guess SNIPS is definitively not for me or hates me !! After having tried a standalone system linked through MQTT to HA, then now snips in hassio, still no chance to get it working :frowning:
I just removed SNIPS from hassio, restarted the PI, reinstalled SNIPS and same problem as previously so I’m probably too dumb to succeed to get that damn thing working :frowning:
Will have tried and wasted already so much time on that…