Arguments customization - project-alice-assistant/HermesLedControl GitHub Wiki

After installing, HLC adds a service that automatically start with your os.

If you want to quick edit it to change a led pattern per exemple, stop HLC, edit the service and restart HLC

sudo systemctl stop hermesledcontrol
sudo nano /etc/systemd/system/hermesledcontrol.service
sudo systemctl daemon-reload
sudo systemctl start hermesledcontrol

When editing hermesledcontrol.service, check the Exec line.

ExecStart=HLCPATH/venv/bin/python3 main.py

You can add arguments at the end, in fact, after the installation you should already have some! You want HLC to start with Kiboost animation instead?

ExecStart=HLCPATH/venv/bin/python main.py --pattern=kiboost

You can customize many aspects just with arguments. A complete list of the available arguments can be found typing:

cd ~
cd hermesLedControl_vXXXXXXXX
./venv/bin/python3 main.py --help

Here is a recap of all the arguments

Arguments list

  • --engine: What assistant engine are you using? Default: projectalice, choices:
    • projectalice
    • rhasspy
    • snips
  • --pathToconfig: Defines where the mqtt configuration file is to be found. Default: /etc/snips.toml
  • --mqttServer: Defines to what mqtt server HLC should connect. Overrides any file configuration
  • --mqttPort: Defines what port to use to connect to mqtt. Overrides any file configuration
  • --mqttUsername: Defines what username to use to connect to mqtt. Overrides any file configuration
  • --mqttPassword: Defines what password to use to connect to mqtt. Overrides any file configuration
  • --clientId: Defines a client id. Overrides any file configuration
  • --hardware: Type of hardware in use, default: respeaker2, choices:
    • respeaker2Mics
    • respeaker4MicArray
    • respeakerCoreV2
    • respeakerMicArrayV2
    • respeaker6MicArray
    • neoPixelsSK6812RGBW
    • neoPixelsWS2812RGB
    • matrixvoice
    • googleAIY
    • puregpio
  • --enableDoA: Enable sound Direction of Arrival. Resources greedy!, default: False
  • --leds: Number of leds to control, default=3
  • --defaultBrightness: Set a default brightness for your leds, default=50
  • --endFrame: Respeakers, or apa102 led systems need an end frame. If your device is not working try either 255 or 0
  • --pattern: The pattern to be used by HLC, default: google, choices:
    • 'google'
    • 'alexa'
    • 'projectalice'
    • 'kiboost'
    • 'custom'
  • --offListener: Allows you to define which topics will trigger the off pattern, default: hermes/hotword/toggleOn, choices:
    • hermes/hotword/toggleOn
    • hermes/tts/sayFinished
    • hermes/audioServer/playFinished
  • --enableDoA: Enables sound direction of arrival on hardware capable of it. Resources greedy!
  • --defaultState: Define if the leds should be active or not by default, choices: 'on', 'off', default: on
  • --gpioPin: Define the gpio pin wiring number to use when your leds use gpio
  • --vid: Define the vid pin wiring number to use when your leds use usb
  • --pid: Define the pid pin wiring number to use when your leds use usb
  • --matrixIp: [Matrix Voice] - Define the ip of your matrix voice, default: 127.0.0.1
  • --everloopPort: [Matrix Voice] - Define the everloop port, default: 20021
  • --pureGpioPinout: [Pure GPIO] - Define the broadcom gpio number of your leds, in the order you want them, default=[]
  • --activeHigh: [Pure GPIO] - Define how your leds are controlled, choices:True/False, default: True
  • --timeout: Animation timeout in seconds. After the specified time without animation change this will transition to idle. Defaults to 120 seconds. Use 0 or negative values to disable.
  • --hermesLedControlConfig: Define the configuration.yml file location for hermes led control, default: ~/.config/hermesLedControl/configuration.yml
  • --debug: Enable the debug mode for the console to return more informations, choices:True/False, default: False

The following arguments let you override the default pattern method with other without having to rewrite the pattern file.

This is not needed and is only here to provide you with an easy customization way.

You want the speak pattern look like the think pattern? Add the argument --speakPattern=think

  • --startPattern: Define a program start led pattern
  • --stoptPattern: Define a program stop led pattern
  • --offPattern: Define an off led pattern
  • --idlePattern: Define an idle led pattern
  • --wakeupPattern: Define a wakeup led pattern
  • --speakPattern: Define a speak led pattern
  • --thinkPattern: Define a think led pattern
  • --listenPattern: Define a listen led pattern
  • --errorPattern: Define an error led pattern
  • --successPattern: Define a success led pattern
  • --updatingPattern: Define an updating led pattern
  • --callPattern: Define a call led pattern
  • --setupModePattern: Define a setup mode led pattern
  • --conErrorPattern: Define a connection error led pattern
  • --messagePattern: Define a message led pattern
  • --dndPattern: Define a do not disturb led pattern