Raspberry Pi as a HA Voice Assist CHAPTER 4 satellite

I am trying to connect to my home assistant server using https.

No docker on my pi.

You’re connecting to the internal IP, which usually does not have SSL. If you have --protocol https in your run command, remove it.

I agree with cnose. I access my own HA as http://192.168.1.98:8123/ … so SSL is not needed for basic access to HA over a LAN (and I try to keep mine as simple as possible so i can understand it).

I guess that your satellite RasPi is not using SSL, but your HA server is expecting an SSL key to be sent to it; however you didn’t show the commands you are running for Homeassistant-satellite and wyoming-openwakeword.

You can try:

  • If you have included the --protocol option, in the commands you are running for Homeassistant-satellite and wyoming-openwakeword; please remove it.
  • turn off SSL in Home Assistant (though this might affect other things); or
  • enable SSL on your RasPi.

I don’t get as far without --protocol https.

This command script/run --host 192.168.1.XX --token HNuI1UfEKX…wUSXzn8xkVKQwgsCDQ results in what you see below. I am running barebones to establish a connection can be made.

ERROR:__main__:Unknown exception in the main thread
Traceback (most recent call last):
  File "/home/admin/homeassistant-satellite/homeassistant_satellite/__main__.py", line 235, in main
    async with HAConnection(
  File "/home/admin/homeassistant-satellite/homeassistant_satellite/ha_connection.py", line 51, in __aenter__
    self.__websocket = await self._websocket_context.__aenter__()
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/admin/homeassistant-satellite/.venv/lib/python3.11/site-packages/aiohttp/client.py", line 1141, in __aenter__
    self._resp = await self._coro
                 ^^^^^^^^^^^^^^^^
  File "/home/admin/homeassistant-satellite/.venv/lib/python3.11/site-packages/aiohttp/client.py", line 779, in _ws_connect
    resp = await self.request(
           ^^^^^^^^^^^^^^^^^^^
  File "/home/admin/homeassistant-satellite/.venv/lib/python3.11/site-packages/aiohttp/client.py", line 560, in _request
    await resp.start(conn)
  File "/home/admin/homeassistant-satellite/.venv/lib/python3.11/site-packages/aiohttp/client_reqrep.py", line 899, in start
    message, payload = await protocol.read()  # type: ignore[union-attr]
                       ^^^^^^^^^^^^^^^^^^^^^
  File "/home/admin/homeassistant-satellite/.venv/lib/python3.11/site-packages/aiohttp/streams.py", line 616, in read
    await self._waiter
aiohttp.client_exceptions.ServerDisconnectedError: Server disconnected
Recording raw data 'stdin' : Signed 16 bit Little Endian, Rate 16000 Hz, Mono
ERROR:asyncio:Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x75899710>

My server cannot be accessed locally without https. I believe it was required to set up duckdns remote connections. I’ll look into setting up SSL on my pi.

Jon, how did you get on with setting up SSL on your RasPi ? Did that solve the problem ?

Hi @narselon
I believe I was having that same issue and this post helped me to enable http local access while preserving https for outside connections.

I changed how my Home Assistant SSL works and they now connect after encountering several other errors that required upgrading my pi to Bullseye.

I can use the wake word and initiate my conversation with Assist. There’s a bit of a delay to the overall process. Would there be a way to possibly circumvent the wake word requirement? I plan on using a motion sensor nearby. Could I use it or a button that could switch it to active?

Also is there a way to continue the conversation from the initial response? I’m using PALM and I would like to respond to it’s response.

Certainly. Back in Year of the Voice chapter 2 the M5STACK ATOM Echo was promoted as a satellite with push button to activate … though (having got so used to my RasPi’s with Rhasspy and wakeword detection) I have not paid attention to posts about how to activate a voice session on a RasPi with homeassistant-satellite. I assume it is possible.

This has been asked several times here and in the Rhasspy forum, without any easy answer.

Rhasspy is intended as a voice toolkit, with which people can develop their own applications … if you have the expertise to go down that rabbit hole :wink:

So, after some back and forth, I managed to get this up and running. @Don you are a star!!! Thanks for such a detailed write-up!

Rather than going offtopic, could I kindly ask you to point me an article or discussion on how to improve accuracy? Voice detection works and is done locally on my raspberry, but results are rather mediocre. Unless one uses carefully chosen words, the system is not responding as I would expect… I’m sure I need to work on evolving the model, or do something to make it useful for me and my family.

Thanks!!

Alas, that is where I am also at currently :frowning:
I have swapped Whisper to the largest available model (“small”) to improve accuracy … but Jarvis on the test RasPi in my study is like a teenager finding so many inventive ways to misunderstand “turn on the light”, and with 15 second delay from my finishing speaking until it processes the command.

Admittedly I have put it aside for a couple of weeks, so these issues may have been resolved already.

I am now eagerly awaiting the next chapter in a couple of days.

Can I ask what hardware you tried this on?
I have heard many mention 10-15 second delay after speaking. I have not witnessed this so I sm curious about it.
From the time I finish saying “what time is it?” To the time I get a response is about 3 seconds.

Oh! I see. The truth is that as it currently works, I wouldn’t call my interactions as something natural.

I improved the behavior by leveraging OpenAI and with OpenAI interactions are way more natural but HA refuses to interact with my home when OpenAI is being used.

Don, if you don’t mind, drop me a line here if you ever manage to get a better response from your system. I’m clearly in the same boat :slight_smile:

LOL this is funny. In my case my voice assistant refuses to tell me what time it is, when I ask that :slight_smile:

I wonder what may I have messed up in my assistant pipeline… I can turn lights on and off but time won’t work :slight_smile:

I am running HAOS in the only VM under proxmox on a used Optiplex 7050 (i5-7500T). VM uses 4 CPU threads and 16BG RAM. Wyoming, Whisper, Piper, OpenWakeWord are all installed as add-ons. Also ESPHome, Mosquitto, Node-RED and Rhasspy Assistant 2.5.11 are installed add-ons. Whisper uses the largest model available to us (ironically called “small” :wink: ) yet the whole VM rarely goes over 15% CPU usage even when processing voice.

At the satellite end, it’s a RasPi 3B with Raspberry Pi OS Lite 32-bit on a fresh micro-SD card. I am using a decent USB mic, and headphones connected to the 3.5mm audio jack. Both homeassistant-satellite and wyoming-openwakeword are running as services.

The hardware seems well up to the job. My guess is that there’s some setting not exposed in wyoming-openwakeword for the length of silence to signal the end of command.

I’m guessing that these Voice Assist satellites can’t also act as media players… Are you able to confirm?

I’m running homeassistant-satelita on a raspberry pi 3b+ which also acts as a shairport-sync player, that is, I’m able to stream music to it and it detects the wake word, plays confirmation sounds and then responds, so yes, you can.

When I try to get the list of mics/speckers I don’t see any I am using this kit/hat Version one using Pi 2
This looks like really nice kit for voice assistant if we can find the drivers

this is now old and archived maybe some can point me to the drivers

Year of the Voice chapter 5 has changed to using wyoming-satellite instead of homeassistant-satellite.

homeassistant-satellite will of course continue to work for those who have it installed, but apparently the newer Voice Assist features are only available with wyoming-satellite.

I personally am about to wipe my microSD card and do a clean install per Chapter 5. See you on the other side …

Is there a link to the updated rpi satellite setup with the Wyoming satellite?
I set my rpi as a satellite up a while ago and haven’t used it and would like to update it before using it again.

Personally I just wiped my SD card and started agin using the documentation and Mike’s excellent tutorial to build a satellite using a Raspberry Pi Zero 2 W and a ReSpeaker 2Mic HAT.

My notes are at Raspberry Pi as a CHAPTER 5 voice assistant. So far it has been much better for me … but still work for me to do before rolling it out through the house.

1 Like