HermesLedControl

Hi,

After discussion with his author, the Snips Led Control has been renamed Hermes Led Control :hugs:

We have turn it agnostic and it now works with Rhasspy !

You can install it : https://github.com/project-alice-assistant/HermesLedControl/wiki/Installation-&-update

Nothing to edit just follow installer options:

  • Choose Rhasspy engine
  • If your rhasspy isn’t en, set pathToConfig to /home/pi/.config/rhasspy/profiles/fr/profile.json for example
  • Finish installation (choose respeaker option etc)
    Then it should comes setup as a service and running !

Now all we need is full support of hermes topics by Rhasspy:
MQTT published hermes topics

Many thanks to @Psycho, the author of HermesLedControl. Worked with him last year on this tool, always of great support :beers:

:wink:

14 Likes

Really great news !!!
Thank to both of you, great work ! :+1: :clap:

1 Like

I was using it before … Great news thanks a lot psycho and kiboOst

1 Like

How would you install this on a fresh raspian lite install on a satellite pi with the main rhasspy service in a docker container in a vm on a server in a rack in another room

What prevent you from connecting with ssh and install it ?

For me, complete inexperience with MQTT as well as no idea how to do much on a Pi. :crazy_face: I think I need an MQTT broker set up for this to work but I don’t know how to get that going. My attempt had Rhasspy logging that it was trying to connect every 5 seconds but NoneType seemed to be a problem (I don’t have the logs because I undid what I could) and there were no LED lights. A step-by-step tutorial (from “lights that represent Rhasspy actions would be cool” to “wow that’s amazing!”) would be quite helpful!

You need mqtt and rhasspy configured to use it

Install mosquito:

sudo apt update
sudo apt install -y mosquitto mosquitto-clients

Enable the service:

sudo systemctl enable mosquitto.service
sudo systemctl start mosquitto

Then enable MQTT in rhasspy settings with the IP of rhasspy device (localhost may not work with docker container)

Anyway, we have to wait for Rhasspy to publish every Hermes topics so HLC works as advertised.
Here is an old video with snips : https://www.youtube.com/watch?v=kcHWm15i-Gc

Also, @synesthesiam actually with snips I use the respeaker button to shutdown wakeword detection. So snips can still handle tts command, but when there is a lot of people in house this avoid false/positive causing false intent and such.

I guess this PR https://github.com/synesthesiam/rhasspy/pull/143 would help to set wakeword detection on/off over http and mqtt ?

So this is installed in the rhasspy docker container or on the satellite with the respeaker.

Thanks! I had done all but the last line. This still didn’t work with MQTT set up as above, MQTT enabled in Rhasspy and the IP address of the Pi itself (running Rhasspy in docker) with Rhasspy settings saved and restarted. I tried restarting the different parts in different orders but nothing ever lit up. I did get the reconnecting every 5 seconds message because of a NoneType problem but I think restarting Rhasspy solved that issue (restarting something did solve that issue). Still no lights, though. I’m probably doing something silly so please don’t waste your time trying to figure it out but thanks for your help with MQTT!

Here is a start for HermesLedControl with Rhasspy doc:

@synesthesiam

Please have a look at the button part. Actually with snips we can toggle wakeword detection like this:

call('sudo systemctl stop snips-hotword.service', shell=True)

Should this be possible with full-serviced next rhasspy ? Something like this ?

call('sudo systemctl stop rhasspy-wake-snowboy-hermes.service', shell=True)

Also, here are HLC MQTT topics it subscribe to:

https://github.com/project-alice-assistant/HermesLedControl/wiki/MQTT-Topics

Just to be sure we can get all same exact topics so it is perfectly supported.

:kissing:

Actually I don’t like the idea of starting or stopping a service just to start or stop listening to a wake word. The rhasspy-wake-snowboy-hermes service should always be running and just toggle its listening state as a reaction on a hermes/hotword/toggleOn or hermes/hotword/toggleOff message on MQTT or the resulting REST API call. Doesn’t HermesLedControl send these MQTT messages as a reaction on the button?

1 Like

You define whatever you want on button pressed. As this is an external script it needs a bash command, but I’m ok with you and yes it could be a simple:
call(‘mosquitto_pub -p 1883 -t ‘hermes/hotword/toggleOff’ -m ‘{“siteId” : mySatellite}’’, shell=True) command.

1 Like

Hi,
At first: I’m a newby and don’t know, if I’m in the right place here.

My working environment:
I’m using Rhasspy (with German profile) on an Raspi 3B with Respeaker 4 Mic Hat, which works fine.
I also installed Hermes LED Control on this Raspi, but the Respeaker-LEDs will not light up, when speaking the hotword, or some sentences.

I also get the Rhasspy-intents on another Raspi, which run’s a SmartHome-Software called ioBroker
ioBroker can combine the hardware (sensors, actors) of many different manufacturers.
It also contains a mqtt-Broker.
In the topics of this mqtt-Broker I can see the intents from Rhasspy and can react to them (for example switching lights).
I also can see the the hermes topics

Now my problem/question:
Why doesn’t the ReSpeaker LED-ring does’nt light up, when speaking hotword, or some sentences?

After I installed Hermes Led Control, I got the related topics in ioBroker.
For example “mqtt.0.hermes.asr.startListening”, “mqtt.0.hermes.asr.stopListening”, mqtt.0.hermes.asr.textCaptured, mqtt.0.hermes.leds.onCall, “mqtt.0.hermes.intent.lamps”, and so on.

Now, when i’m speaking to Rhasspy, only the topics “mqtt.0.hermes.asr.textCaptured” and the hermes-intent-topics will change as aspected.
But no reaction in the topics “mqtt.0._hermes.hotword”, "mqtt.0.hermes.asr.startListening, “mqtt.0.hermes.asr.stopListening”, or the other “mqtt.0.hermes.leds”-topics.

IMy thought was, that in this topics I will get some paylod from Hermes Led Control?
Maybe I’m totally wrong with this assumption?
Anyway, should the led ring react even without these topics?

Sorry for the stupid questions, but any help is welcome

I guess you have to connect HLC mqtt to your rpi handling intent, the mqtt host/master.

By default, HLC with engine rhasspy read your profile to get the mqtt settings ip and siteId. If this ip in your settings isn’t pointing to your master, you can force HLC to use whatever you want with for example --mqttServer

Here is the list of arguments: https://github.com/project-alice-assistant/HermesLedControl/wiki/Arguments-customization

OK, thanks for your explanation.
The HLC-Topics are created on my correct mqtt-broker.

Maybe I should alter my question more precisely:
Should something happen inside these topics, wenn HLC is active?
If not, what must be sent (for example) with the topic " mqtt.0.hermes.leds.onMessage" that sometings happen with the LED-ring?

Nothing have to be sent to have the led on when service starts.
HLC doesn’t send anything on mqtt, it just listen on some topics to give a visual feedback.

Here are all the topics used by HLC, and the full documentation: https://github.com/project-alice-assistant/HermesLedControl/wiki/MQTT-Topics

Maybe you could try debug mode. Never had too, leds just lights on when starting the service: https://github.com/project-alice-assistant/HermesLedControl/wiki/Run-in-debug-mode

And once more, actual version of rhasspy doesn’t publish every hermes topics so it doesn’t work actually. Just get the led on, I get the wakeword detected animation, but after that nothing, it stay in this state until I restart the service.

So, pretty unusable with actual rhasspy, but having it set on the rpi, it should begin to work without doing anything when we update to rhasspy version with all hermes topics.

OK, thanks again.
That completely answers my question.
I will wait for a rhasspy-version with the hermes-topics.

Hi,

Is HermesLedControl working on an docker install of rhasspy ?

I got this error after the installation of HLC

Jun 11 18:23:57 raspberrypi systemd[1]: Started Hermes Led Control.
Jun 11 18:23:58 raspberrypi python3[1293]: Starting Hermes Led Control v. 2.0.6
Jun 11 18:23:58 raspberrypi python3[1293]: Initializing HermesLedControl
Jun 11 18:23:58 raspberrypi python3[1293]: Initializing Rhasspy settings
Jun 11 18:23:58 raspberrypi python3[1293]: Loading configurations
Jun 11 18:23:58 raspberrypi python3[1293]: Error loading configurations: 'mqtt'
Jun 11 18:23:58 raspberrypi systemd[1]: hermesledcontrol.service: Succeeded.
Jun 11 18:24:01 raspberrypi systemd[1]: Started Session c2 of user pi.
Jun 11 18:24:03 raspberrypi systemd[1]: hermesledcontrol.service: Service RestartSec=5s expired, scheduling restart.
Jun 11 18:24:03 raspberrypi systemd[1]: hermesledcontrol.service: Scheduled restart job, restart counter is at 18.
Jun 11 18:24:03 raspberrypi systemd[1]: Stopped Hermes Led Control.

Did we have to install mosquito or something else ?

Yes, it is running

Yes, you have to install a mqtt broker (e.g. mosquitto) in order to get access to the intents