I have Rhasspy working with Home Assistant using the Send events to Home Assistant (/api/events)
method.
When I use the Internal MQTT broker (host:"127.0.0.1", port:12183
) Rhasspy works with HA as desired.
I now want to make use of Rhasspy’s Hermes MQTT messages to add additional functionality to my setup, so I want both Home Assistant and Rhasspy to use the mosquitto MQTT broker used by Home Assistant.
The issue is that when I select External MQTT in Rhasspy and fill in the appropriate details of the HA MQTT broker, upon reboot of the pi Rhasspy’s GUI no longer loads. The only way to fix it is to ssh into the pi and then manually edit my profile.json
back to the Internal MQTT broker settings.
I have checked the logs and when I run docker-compose up
I see the folowing error:
Error: Format string 'rhasspy-microphone-pyaudio-hermes --sample-rate 16000 --sample-width 2 --channels 1 --debug --host 192.168.xx.xx --port 1883 --site-id default --username xxxxxx--password xxxxxx --device-index 0 --udp-audio-host 127.0.0.1' for 'program:microphone.command' is badly formatted: an integer is required in section 'program:microphone' (file: '/profiles/en/supervisord.conf')
This is the relevant part of that file:
[program:microphone]
command=rhasspy-microphone-pyaudio-hermes --sample-rate 16000 --sample-width 2 --channels 1 --debug --host 192.168.xx.xx --port 1883 --site-id default --username xxxxxx --password xxxxxx --device-index 0 --udp-audio-host 127.0.0.1
stopasgroup=true
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
redirect_stderr=true
I’m not sure which integer I am missing or where in this section I should place it. Has anyone experienced this issue?
Thanks
Further Info:
I have Home Assistant 0.118.2
on a Windows 10 PC, created using docker-compose. The MQTT broker (mosquitto) used by Home Assistant is contained in a second container on this PC. Port 1883
is exposed and can be successfully used by Home Assistant.
I have Rhasspy 2.5.7
on a Pi 4, also created using docker-compose. This is the docker-compose file:
rhasspy:
image: "rhasspy/rhasspy"
container_name: rhasspy
restart: unless-stopped
volumes:
- "$HOME/.config/rhasspy/profiles:/profiles"
- "/etc/localtime:/etc/localtime:ro"
ports:
- "1883:1883"
- "12101:12101"
- "12183:12183"
devices:
- "/dev/snd:/dev/snd"
command: --user-profiles /profiles --profile en
These are my Rhasspy settings:
- MQTT: Internal
- Audio Recording: PyAudio
- Wake Word: Porcupine
- Speech to Text: Pocketsphinx
- Intent Recognition: Fsticuffs
- Text to Speech: Espeak
- Audio Playing: aplay
- Dialogie Management: Rhasspy
- Intent Handling: Home Assistant