Ok here goes.
In this example I spoke to satellite (“sat”) to turn on an arc lamp. The arc lamp is a zigbee plug defined as light in HA and called “white_1”.
Switching the light works.
The audio feedback event in HA seems to fire fine in HA and feed info back to the server which processes the TTS.
[DEBUG:2021-01-24 10:19:45,272] rhasspyserver_hermes: -> TtsSay(text='OK, white_1 on', site_id='serv', lang=None, id='117ec17f-55e0-4b84-aad5-eac5e9ed4f60', session_id='', volume=1.0)
Full Server Log
[DEBUG:2021-01-24 10:19:45,459] rhasspyserver_hermes: Handling TtsSayFinished (topic=hermes/tts/sayFinished, id=de1f2e95-da1b-4907-ac60-86ec90a0a468)
[ERROR:2021-01-24 10:19:45,341] rhasspyserver_hermes: NotFound(404)
Traceback (most recent call last):
File "/usr/lib/rhasspy/.venv/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/.venv/lib/python3.7/site-packages/quart/app.py", line 1863, in dispatch_request
raise request_.routing_exception
quart.exceptions.NotFound: NotFound(404)
[DEBUG:2021-01-24 10:19:45,317] rhasspyserver_hermes: Handling AudioPlayBytes (topic=hermes/audioServer/serv/playBytes/117ec17f-55e0-4b84-aad5-eac5e9ed4f60, id=de1f2e95-da1b-4907-ac60-86ec90a0a468)
[DEBUG:2021-01-24 10:19:45,272] rhasspyserver_hermes: Publishing 136 bytes(s) to hermes/tts/say
[DEBUG:2021-01-24 10:19:45,272] rhasspyserver_hermes: -> TtsSay(text='OK, white_1 on', site_id='serv', lang=None, id='117ec17f-55e0-4b84-aad5-eac5e9ed4f60', session_id='', volume=1.0)
[DEBUG:2021-01-24 10:19:45,265] rhasspyserver_hermes: Sent 752 char(s) to websocket
[DEBUG:2021-01-24 10:19:45,254] rhasspyserver_hermes: Handling NluIntent (topic=hermes/intent/Lights, id=7ddf37a8-9c84-4c90-8ac1-073adad75647)
[DEBUG:2021-01-24 10:19:45,245] rhasspyserver_hermes: <- NluIntent(input='switch on white_1', intent=Intent(intent_name='Lights', confidence_score=1.0), site_id='serv', id='41c651c9-c550-4a5a-afce-0c6ba36c5c6e', slots=[Slot(entity='actions', value={'kind': 'Unknown', 'value': 'on'}, slot_name='action', raw_value='on', confidence=1.0, range=SlotRange(start=7, end=9, raw_start=7, raw_end=9)), Slot(entity='locations', value={'kind': 'Unknown', 'value': 'white_1'}, slot_name='location', raw_value='arc lamp', confidence=1.0, range=SlotRange(start=10, end=17, raw_start=10, raw_end=18))], session_id='41c651c9-c550-4a5a-afce-0c6ba36c5c6e', custom_data=None, asr_tokens=[[AsrToken(value='switch', confidence=1.0, range_start=0, range_end=6, time=None), AsrToken(value='on', confidence=1.0, range_start=7, range_end=9, time=None), AsrToken(value='white_1', confidence=1.0, range_start=10, range_end=17, time=None)]], asr_confidence=None, raw_input='switch on arc lamp', wakeword_id=None, lang=None)
[DEBUG:2021-01-24 10:19:45,227] rhasspyserver_hermes: Publishing 204 bytes(s) to hermes/nlu/query
[DEBUG:2021-01-24 10:19:45,226] rhasspyserver_hermes: -> NluQuery(input='switch on arc lamp', site_id='serv', id='41c651c9-c550-4a5a-afce-0c6ba36c5c6e', intent_filter=None, session_id='41c651c9-c550-4a5a-afce-0c6ba36c5c6e', wakeword_id=None, lang=None)
[DEBUG:2021-01-24 10:19:44,302] rhasspyserver_hermes: Handling AsrTextCaptured (topic=hermes/asr/textCaptured, id=5a96629f-a13d-441e-9971-f122cb7ae8e3)
[DEBUG:2021-01-24 10:19:43,875] rhasspyserver_hermes: Publishing 71 bytes(s) to hermes/asr/stopListening
[DEBUG:2021-01-24 10:19:43,875] rhasspyserver_hermes: -> AsrStopListening(site_id='serv', session_id='2b688ffb-bda9-4574-b574-90f17ceaf082')
[DEBUG:2021-01-24 10:19:43,870] rhasspyserver_hermes: Sent 53108 byte(s) of WAV data
[DEBUG:2021-01-24 10:19:43,869] rhasspyserver_hermes: Publishing 178 bytes(s) to hermes/asr/startListening
[DEBUG:2021-01-24 10:19:43,868] rhasspyserver_hermes: -> AsrStartListening(site_id='serv', session_id='2b688ffb-bda9-4574-b574-90f17ceaf082', lang=None, stop_on_silence=False, send_audio_captured=True, wakeword_id=None, intent_filter=None)
Don’t really know what going on in sat1:
Satellite log
[ERROR:2021-01-24 10:19:45,428] rhasspyserver_hermes: 'utf-8' codec can't decode byte 0x80 in position 24: invalid start byte
Traceback (most recent call last):
File "/usr/lib/rhasspy/.venv/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/.venv/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 1129, in api_play_wav
url_or_path = data.decode()
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 24: invalid start byte
[DEBUG:2021-01-24 10:19:45,314] rhasspyserver_hermes: Sent 825 char(s) to websocket
[DEBUG:2021-01-24 10:19:45,311] rhasspyserver_hermes: <- NluIntent(input='switch on arc lamp', intent=Intent(intent_name='Lights', confidence_score=1.0), site_id='sat1', id=None, slots=[Slot(entity='action', value={'kind': 'Unknown', 'value': 'on'}, slot_name='action', raw_value='on', confidence=1, range=SlotRange(start=7, end=9, raw_start=7, raw_end=9)), Slot(entity='location', value={'kind': 'Unknown', 'value': 'white_1'}, slot_name='location', raw_value='arc lamp', confidence=1, range=SlotRange(start=10, end=17, raw_start=10, raw_end=18))], session_id='sat1-porcupine_raspberry-pi-b9dfa2ae-a686-45f6-b8f8-88fc1fcf27e7', custom_data=None, asr_tokens=[[AsrToken(value='switch', confidence=1.0, range_start=0, range_end=6, time=None), AsrToken(value='on', confidence=1.0, range_start=7, range_end=9, time=None), AsrToken(value='arc', confidence=1.0, range_start=10, range_end=13, time=None), AsrToken(value='lamp', confidence=1.0, range_start=14, range_end=18, time=None)]], asr_confidence=None, raw_input='switch on arc lamp', wakeword_id='porcupine_raspberry-pi', lang=None)
[DEBUG:2021-01-24 10:19:40,981] rhasspyserver_hermes: <- HotwordDetected(model_id='/usr/lib/rhasspy/.venv/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='sat1', session_id=None, send_audio_captured=None, lang=None)
In this guy’s post, it was solved, but he seems to play the audio on the same Rhasspy instance where the TTS is produced. I didn’t test this solution on my set-up though.
My Rhasspy instances are configured as shown below, which is most likely wrong, but I didn’t understand the documentation.
sat1:
serv:
documenation