[No solution] Satellite with Hassio?


#21

Hmm, so you have hassio and snips running on the same system.

You said you tried a stand alone system as well. Can you try that again and see if we can get the ASR recognizing you on a standalone system. We can worry about the MQTT stuff after that.

It may be that your microphone levels are too low or that there is too much noise. Can you try recording a sample and playing it back to see how it sounds?


#22

sure you can’t do it in a different way as it’s installed as add-on offered in hassio and expected a working addon but looks it’s not !!

Sure I’ll check if I have a PI3 avalaible for that and try it again this way !
I’m also concerned about how mqtt is handled in the hassio snips add-on as it still uses the internal snips mqtt that is bridge to “my” mqtt setup in ha and used for all devices. Maybe the bridge has some consequences ? or the fact that I’m not able to do the whole satellite setup (no setup on snips server side as it’s not accessible in hassio !).

Too low ?? and it would still be able to always detect correctly the wakeup word and not the command ?? sounds very strange for me no ??
For noise, N/A, all tests done at my home in a silent room !
I did already the record/play tests and adjust levels when I have setup satellites with sam but I can try it again just to be sure !


#23

oki I guess I’m going to give up on that software SNIPS as it looks it’s just still highly experimental !! Using SAM to do the install on a fresh new raspbian system on PI3B+ + Respeaker 2 (in fact config of Snips maker kit) and it fails so bad !! It’s unable to install Respeaker driver correctly unless it says it did…
Update: tried it again after having done an update of raspbian but same failure !
Update second: don’t do any updates on raspbian or snips install fails on respeaker part ! and if you change hostname of pi snips install fails… Not really efficient the SAM install process !
Update third: after a fail/success process I succeeded at least to get SNIPS working in standalone with the demo assistant and also with my HA assistant ! Now need to figure out how to link it with HA so I can get the intent in HA !


#24

Oki so now I have found the problem !! The SNIPS in standalone with my HA assistant works perfect ! With sam watch I can see the intents passing !
Now I setup it to use the MQTT of my HA instead of SNIPS local one and then no more intent ! Back in previous problem ! It detects still the wake-up word and that’s it !!
Is there a f*cking bug in SNIPS that makes it incompatible with external broker ?? Solution for that ?


#25

and the best is that I can’t go back !! If I remove my modifications in config file of snips (so it uses back its local broker) and put back in it the demo assistant, install of it fails

(✖ Error setting up virtualenv, one or more actions might not be able to run. Reason :
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.)

and for sure SNIPS no more detects anything…
Does snips imply a whole reinstall each time you change a setting in config file or the assistant used ?


#26

Never mind, I see you are modifying it in snips.toml. Do you have the mosquitto plugin in stalled on your HASSIO instance?


#27

What you want to do is keep snips running listening to it’s own mqtt server. Then add this to bridge over to the HA MQTT server. Add your hassio mqtt and username/password if you need it.

connection snipsmqtt
address HASS_MQTT_ADDRESS:1883
#remote_username HASS_MQTT_USER
#remote_password HASS_MQTT_PASSWORD
remote_clientid snips
start_type automatic
topic hermes/dialogueManager/# in
topic hermes/asr/# in
topic hermes/hotword/# out

topic hermes/intent/# out
topic hermes/asr/# out
topic hermes/hotword/# out
topic hermes/nlu/# out

#28

Please check my previous posts, I neven edited snips.toml as you don’t have access at it in snips installed in hassio !! I gave up on Snips in hassio, the addon looks very buggy :rage: I guess one of problems of that addon is that it uses the broker of HA for all audio stuffs making it very sluggish ! Time to answer with SNIPS standalone compared to SNIPS in hassio is so short !!

Right now this is what I have done:

  • Install clean raspbian on Pi3B+
  • Installed snips using latest version of sam tool supplied by SNIPS
  • Setup audio on it
  • Installed in it my assistant I had created previously for snips in hassio and checked with sam it works fine and recognises my intents without problem.
  • Added in mosquitto config of the snips broker the brigde config you posted here
  • Uncommented my snips directive in config yaml file of ha and tested my intent that I could see pass in logs of snips server, logs of HA and at least execute command I had setup :star_struck:

Now that my setup is at least working, I’ll work on:

  • renaming id of my snips server from default to room name
  • reconnecting my satellites at that standalone SNIPS server
  • check if I can get LEDs on Respeaker 2 Hat I’m using working so it can give visual feedback too of interaction
  • check in HA how to handle site id so it can distinguish orders by room !
  • Find out how to add other intents at basic HA skills avalaible in console snips and that you can’t even fork :rage:
  • Find out how to handle site id in HA automations so I can send audio feedback on correct speakers and also distinguish same orders but coming from different rooms !

Thanks for help and will post an update later :wink:


#29

Done and same for satellites (edit snips.toml file on each unit)

Done too but encounters a very weird issue. I went for installation with hotword detector in each satellite for faster reaction but at least first satellite I have setup still reacts only at default Snips and not Jarvis as my main SNIPS unit ! I have copied both times hotword directory from server to replace on satellite and restarted satellite but not much luck ! Satellites are still working fine (I see well intents coming back at server and also site id from where it came from :heart_eyes:

Will finish setup of all satellites to check if I have same issue with hotword on other ones and before contimuing on the other points listed !


#30

Done:

  • check if I can get LEDs on Respeaker 2 Hat I’m using working so it can give visual feedback too of interaction -> installed snipsledcontrol (https://github.com/Psychokiller1888/snipsLedControl)
  • Find out how to add other intents at basic HA skills avalaible in console snips and that you can’t even fork :rage:started my own intent set in snips to get something more flexible and complete than the demo ones avalaible for HA !

Still to do:

  • Found out why satellites use default snips hotword and not Jarvis as setup on main unit
  • check in HA how to handle site id so it can distinguish orders by room !

#31

That one I would also be interested in! Last time I tried, I could not manage to get the siteId as slot of the published intent…


#32

darioce

    January 31

alt Vincen:
check in HA how to handle site id so it can distinguish orders by room !

That one I would also be interested in! Last time I tried, I could not manage to get the siteId as slot of the published intent…


#33

It’s published as site_id in HA. The documentation is a little weak, but look here for current ones. I want to add customData as well but time will probably not permit that anytime soon.
https://www.home-assistant.io/components/snips/#special-slots

SetTimer:
  speech:
    type: plain
    text: 'Set a timer'
  action:
    service: script.set_timer
    data_template:
      name: "{{ timer_name }}"
      duration: "{{ timer_duration }}"
      siteId: "{{ site_id }}"
      sessionId: "{{ session_id }}"
      duration_raw: "{{ raw_value }}"
      probability: "{{ probability }}"

#34

And the discrepancy between siteId and site_id is just because HA pretty strictly enforces the _ format for variables, but it does make it a bit confusing at times.


#35

Thanks for link and help but still not sure how to do selection on site_id variable ! Examples included in documentation are very basic and don’t show much !
Basically you get an intent arriving in HA, you need then to do a switch or if on site_id so depending of site_id you know what to do (but not sure it can be done in config yaml file itself ? :face_with_raised_eyebrow:


#36

oki finally found out how to handle the site variable so I can make actions depending of room where the vocal commands come from and here is code done in config.yaml :wink: I used the if to make a selection on site_id returned with intent and depending of site_id value I switch a light circuit in room corresponding to site_id !
I also made a little random on vocal confirmation for more fun :wink:

intent_script:
  Allumage_Lumiere:
    speech:
      type: plain
      text: "{{(['Ok,','cet fait,','Bien sur,','Comme vous voulez,','Si tu insistes,','Comme tu veux,','A vos souhaits,','A votre bon vouloir,','ainsi soit-il,','A vos ordres,','Pas de problème,','Bien sur votre grandeur,']|random)}}"
    action:
      - service: switch.turn_on
        data_template:
          entity_id: switch.{% if site_id == "salon" %}salon_suspension{% elif site_id == "sdb" %}sdb_lumiere_2{% elif site_id == "cuisine" %}cuisine_plafonnier{% endif %}
  Extinction_Lumiere:
    speech:
      type: plain
      text: "{{(['Ok,','cet fait,','Bien sur,','Comme vous voulez,','Si tu insistes,','Comme tu veux,','A vos souhaits,','A votre bon vouloir,','ainsi soit-il,','A vos ordres,','Pas de problème,','Bien sur votre grandeur,']|random)}}"
    action:
      - service: switch.turn_off
        data_template:
          entity_id: switch.{% if site_id == "salon" %}salon_suspension{% elif site_id == "sdb" %}sdb_lumiere_2{% elif site_id == "cuisine" %}cuisine_plafonnier{% endif %}