I had a working Base & Satellite setup … and then I tried adding HermesLedControl and a second satellite … and it turned to custard. I am now reinstalling the first satellite from scratch and taking it very step-by-step, with…
- Raspberry Pi 3B with reSpeaker 4-mic HAT with HinTak drivers. Tested the mic and headphone with arecord | aplay OK
- Satellite is running Raspberry Pi OS Lite and Rhasspy (without Docker or venv) using a SSL terminal session to run “rhasspy -profile en” from command line.
- My Base station is a RasPi 4 running HA OS with Rhasspy and a few other add-ons.
I got back to a working system using Internal MQTT, and Remote HTTP for STT, Intent and TTS processing. A beep when I say “Porcupine”, the text of the command and the intent being displayed on both the satellite and base systems.
However my end goal is multiple satellites, and to use the LEDs on the mic boards, so I change to a shared External MQTT … such as the HA add-on.
- HA’s MQTT add-on to default settings (port 1833)
- Rhasspy on both Base and Satellite set to External MQTT, IP address of the Base station, and port 1883
Restart Rhasspy. Lets go a step further … power cycle both machines and check they come up without errors. Base station’s HA Mosquitto broker log shows it initialising and
1632260881: New client connected from 172.30.32.1 as 1tZPLffFtAR8Ps5ukaoMgx (p2, c1, k60, u'homeassistant').
1632260923: New connection from 172.30.32.1 on port 1883.
I have also installed mosquitto on my desktop PC, but when I try to connect I get …
don@Muscle:~$ mosquitto_sub -h 192.168.1.98 -p 1883 -d -t rhasspy/audioServer/# -t hermes/audioServer/#
Client (null) sending CONNECT
Client (null) received CONNACK (0)
Client (null) sending SUBSCRIBE (Mid: 1, Topic: rhasspy/audioServer/#, QoS: 0, Options: 0x00)
Client (null) sending SUBSCRIBE (Mid: 1, Topic: hermes/audioServer/#, QoS: 0, Options: 0x00)
Client (null) received SUBACK
Subscribed (mid: 1): 128, 128
Client (null) sending DISCONNECT
All subscription requests were denied.
don@Muscle:~$
I don’t understand why, since this same command worked correctly with the satellite’s IP and port.
On the Base system, the HA Rhasspy add-on’s log shows no errors and the usual flood of [DEBUG] messages, including the services succeeding to connect to MQTT broker, eg
[DEBUG:2021-09-22 07:48:43,683] asyncio: Using selector: EpollSelector
[DEBUG:2021-09-22 07:48:43,686] rhasspyasr_kaldi_hermes: Connecting to 192.168.1.98:1883
[DEBUG:2021-09-22 07:48:43,699] asyncio: Using selector: EpollSelector
[DEBUG:2021-09-22 07:48:43,701] rhasspyasr_kaldi_hermes: Connected to MQTT broker
[DEBUG:2021-09-22 07:48:43,703] rhasspyasr_kaldi_hermes: Subscribed to hermes/asr/toggleOff
So far, all good at the base station.
Now to the satellite and start Rhasspy from command line. All services seem to have started and connected to MQTT without any errors, also indicated by the “New connection from 192.168.1.95 on port 1883.” messages in the Base station’s MQTT log.
At speaking the wake word “porcupine”, the satellite’s console adds
[DEBUG:2021-09-22 08:20:51,293] rhasspywake_porcupine_hermes: -> HotwordDetected(model_id='/usr/lib/rhasspy/usr/local/lib/python3.7/site-packages/pvporcupine/resources/keyword_files/raspberry-pi/porcupine_raspberry-pi.ppn', model_version='', model_type='personal', current_sensitivity=0.5, site_id='sat-1', session_id=None, send_audio_captured=None, lang=None, custom_entities=None)
[DEBUG:2021-09-22 08:20:51,297] rhasspywake_porcupine_hermes: Publishing 320 bytes(s) to hermes/hotword/porcupine_raspberry-pi/detected
However that is the end of it. Nothing more is logged to the console while speaking a command, or waiting >2 minutes for a timeout.
Clicking any button on the satellite’s web interface continues the console log.
[Play Recording] pops up and clears its message.
Download WAV would send a 44 byte file.
Clicking the web interface’s [Log] button pops up a window which has no contents.
Satellite’s profile now is:
{
"dialogue": {
"satellite_site_ids": "sat-1",
"system": "rhasspy",
"volume": "0.75"
},
"intent": {
"remote": {
"url": "http://192.168.1.98:12101/api/text-to-intent"
},
"satellite_site_ids": "sat-1",
"system": "remote"
},
"microphone": {
"arecord": {
"device": "plughw:CARD=seeed4micvoicec,DEV=0",
"siteId": "sat-1",
"udp_audio_port": "12203"
},
"system": "arecord"
},
"mqtt": {
"enabled": "true",
"host": "192.168.1.98",
"site_id": "sat-1"
},
"sounds": {
"aplay": {
"device": "plughw:CARD=Headphones,DEV=0",
"volume": "0.7"
},
"system": "aplay"
},
"speech_to_text": {
"remote": {
"url": "http://192.168.1.98:12101/api/speech-to-text"
},
"satellite_site_ids": "sat-1",
"system": "remote"
},
"text_to_speech": {
"remote": {
"url": "http://192.168.1.98:12101/api/text-to-speech"
},
"satellite_site_ids": "sat-1",
"system": "remote"
},
"wake": {
"porcupine": {
"udp_audio": "12203"
},
"satellite_site_ids": "sat-1",
"system": "porcupine"
}
}
The only difference I noticed (apart from the order of components being rearranged) is that the MQTT section on both Base and satellite now have MQTT enabled set to true, and the base stations IP address as host.
Clicking [Wake Up] button gives no beep, a “Listening for command” pop-up which times out, and in the console
DEBUG:2021-09-22 08:40:57,191] rhasspyserver_hermes: -> HotwordDetected(model_id='default', model_version='', model_type='personal', current_sensitivity=1.0, site_id='sat-1', session_id=None, send_audio_captured=None, lang=None, custom_entities=None)
[DEBUG:2021-09-22 08:40:57,192] rhasspyserver_hermes: Publishing 197 bytes(s) to hermes/hotword/default/detected
[DEBUG:2021-09-22 08:40:57,194] rhasspyserver_hermes: Waiting for intent (session_id=None)
[DEBUG:2021-09-22 08:40:57,196] rhasspyserver_hermes: Subscribed to hermes/error/nlu
[ERROR:2021-09-22 08:41:27,227] rhasspyserver_hermes:
Traceback (most recent call last):
File "/usr/lib/rhasspy/usr/local/lib/python3.7/site-packages/quart/app.py", line 1821, in full_dispatch_request
result = await self.dispatch_request(request_context)
File "/usr/lib/rhasspy/usr/local/lib/python3.7/site-packages/quart/app.py", line 1869, in dispatch_request
return await handler(**request_.view_args)
File "/usr/lib/rhasspy/rhasspy-server-hermes/rhasspyserver_hermes/__main__.py", line 943, in api_listen_for_command
async for response in core.publish_wait(handle_intent(), [], message_types):
File "/usr/lib/rhasspy/rhasspy-server-hermes/rhasspyserver_hermes/__init__.py", line 995, in publish_wait
result_awaitable, timeout=timeout_seconds
File "/usr/lib/rhasspy/usr/local/lib/python3.7/asyncio/tasks.py", line 449, in wait_for
raise futures.TimeoutError()
concurrent.futures._base.TimeoutError
So I must be missing something.
-
Configuration works with Internal MQTT. Only change is to External MQTT
-
Minimal configuration and both systems rebooted to reduce chance of other things having side-effects
-
The HA MQTT add-on’s log is showing connections from 172.30.32.1 on port 1883 (from Rhasspy in the other Docker container also on the base station), 192.168.1.95 on port 1883 (the satellite), and 192.168.1.99 on port 1883 (my desktop - but disconnecting immediately) - so the IP address and port are correct.
I really would appreciate your help on this. Thanks