Hello! With the recent discussions of LLMs and DeepSeek, I thought I would share how to set up a personal assistant with Home Assistant. I have been using Home Assistant for years now because I have an auto-immune disease and I need to conserve all of the energy I can. I have found it invaluable and with the recent addition of ollama integration, it has become even easier to use.
Preparation: voice assistant please Hardware
First thing we need is something to run Home Assistant on. Any computer will do for right now, but we’ll talk about about LLM hardware a little later. Any computer is fine, including raspberry pis. If you don’t have any spare computers,you can purchase a Home Assistant Green which will come pre-loaded with Home Assistant. If you are using your own hardware, there are a couple of options:
- Install HAOS, their own distribution of Debian with Home Assistant pre-installed
- Install the Home Assistant container, which is limited in functionality, but if you do not need add-ons, it is an option.
- Install Home Assistant Supervised. This option is only for Debian devices, and they are strict about it on the forums, but I have it running on Ubuntu and it works fine, it just gives me an unsupported OS error sometimes. It will install in a couple of docker containers.
All of the installation instructions can be found Here
Finally, you need some IoT devices. Home Assistant has thousands of Integrations, so just search for the device you want to connect. There are even more custom integrations, but these are the supported options. As an aside, if you have very cheap wifi devices such as light bulbs or switches, see if you can control them with an app called Tuya Smart. If so, they are manufactured by a company called Tuya. Go to Walmart and pick up a few of These, these and one of these and you will be set to control your nearly everything in your home. While there is an official integration for the tuya devices, using a custom one allows for local control that does not call back to their servers. I will go into this later.
Step 1: Installation
I already touched on this, but if you are installing supervised on a non-supported OS, this thread is now for troubleshooting. Once installed, just follow the on screen prompts and it will tell you what devices available for home assistant on your network already.
Step 2: Okay, now I get voice assistant right? Advanced set up
Now, what I would suggest is installing the Home Assistant app on your phone and setting up areas in your house. With areas, you can assign your devices to a location in your house and control everything in that location at once. This can be found in Settings->Areas, Labels, and Zones.
I would then suggest finding a local weather service in the integrations and installing it, so that you can have that information available to you at all times.
For custom integrations, such as LocalTuya, you will need HACS, this is not officially supported, but it gives you more privacy, so I suggest it.
Finally we need to talk about a sticking point: bluetooth. Home Assistant tends to not play so nice with bluetooth, so it is suggested that you purchase an ESP32 and set up a bluetooth proxy if you need BLE. Which leads to my next step.
Please, I just want voice assist. Why are you doing this? Custom devices
Home Assistant has another project called ESPHome. With this, you can make custom devices that connect with bluetooth or wifi to control whatever you want with a simple yaml scripting interface. I would suggest installing the ESPHome add-on as well. This new device will integrate seamlessly with home assistant.
That last section shouldn’t be before VA, that was just cruel. Automation
Under settings-> Automations and scenes, you can automate your house if a simple wizard. Simply select what you want to be your trigger. it can be time, a voice assistant sentence, scanning a qr code, and more! Sometimes, to get some thing done, you need to store a state in a dummy device, and those can be made in the Devices and Services menu, under helpers. These open your options tremendously. You can use them to change the device type of a switch, group similar devices, have a counter, or more. I use them to track my medication, and to control a heater like a thermostat.
Actually, I’m interested in more than VA now, can you tell me about controlling Music
Another great project is Music Assistant. It’s very new, so it is still not super feature rich, but it lets you control multiple music sources and multiple speakers from home assistant.
You can also just get the Spotify integration as well.
Alright, let’s talk about setting up Voice Assistant Fucking finally
Voice Assistant is build into Home Assistant and can be controlled from the top right hamburger menu. It uses sentence matching to control your devices, and it has a lot built in already, but you can write more with automations. With it, you can set times, change device states, and trigger automations.
But you probably want more help than that, so lets talk about integrating a complete solution. We want to be able to shout at a box and have it talk back. First, we need a box to shout at. I just use my phone, but there are several options, from a (low cost option)[https://www.home-assistant.io/voice_control/thirteen-usd-voice-remote/] to a Whole smart speaker. You can also just connect a microphone and speaker to your server directly.
Next, we need add-ons, which can be found under settings. You will want Piper for text to speech, Whisper for Speech to Text, and openWakeWord if you are using the server to process wake words.
Now we need integrations. You need Wyoming Protocol and if you want to use an LLM, ollama. Search for them under the integrations menu.
You can now set all these up in the Assist menu, but I’m going to diverge into LLMs for a moment.
LLMs
if you want to use ollama, you need to install ollama from here. Now to run an LLM you will need some better hardware, but we have some options. I have no doubt that a 7 billion parameter model will work fine for Assist, but they require at least an RTX 3060 to run. If you do not have a spare graphics card and do not want to pay for one, You can try running a smaller model on your CPU. Keep in mind the smaller the model the more likely it will make a mistake. Search the ollama website for models that use tools. Llama 3.1 and 3.2 are good models for this.
You’ll notice I did not suggest DeepSeek, this is for a reason. two actually. 1) It is slow and 2) It cannot use tools.
The olama integration provides a good system prompt but you can change the model file directly to integrate it into your model and speed up the model a little.
Home assistant does allow you to have the LLM as a fallback if it cannot match what you say to an existing sentence. This way you get the speed of sentence matching and only need to use the LLM if you say something complex. My personal setup uses this and a small LLM (llama3.2 3b) with a six core 12 thread ryzen CPU.
Then you need to expose your devices to the voice assistant. Keep in mind the more devices you expose, The longer it will take the LLM to process. When you expose a device, You have the option to set an alias which is useful when you want to refer to something with a brand name or a custom name by a generic term. I use the android tv remote integration, and I alias it to ‘the TV’ so I do not have to call it ‘remote’.
From here you should have everything you need to have your own smarthome. Have fun and enjoy the automation without giving up your privacy!
Do you know of any LED ‘smart’ lights that don’t require phoning home/don’t need to be exposed to the internets and become part of a botnet that are sold outside the usa?
Also, for devices like airconditioners or televisions that use IR remotes and presumably some subset of a standard code is there a structured way to build an interface for them?
A company called Athom also has smart lights and a bunch of other stuff. Their wall outlet power monitor plugs work pretty well. https://www.athom.tech/wled
Yes, look into zigbee devices for lights. another user, !someone@hexbear.net could talk about it more than I. For ir remote emulation, I don’t have any experience, but you can look into this forum link for IR blasters that work with home assistant.
For controlling lights, your best bet for step one is to get one of these Zigbee mesh network transceivers. It’s extremely well supported under Home Assistant (HA) through the Zigbee Home Automation or ZHA module. On modern HA versions, you don’t even need to do anything aside from physically plug it in and add ZHA in the HA GUI.
But there is a trick. There can be radio interference issues if it’s plugged straight in to a USB port, especially on a raspberry pi like the 3B+ I’m running my setup on. I recommend using a little USB extension cord between the computer running HA (whether an old laptop or desktop or a raspberry pi or whatever) and the transceiver. It doesn’t have to be long. I have a good quality one that’s about a metre long, and I never get any interference issues anymore. It’s also handy for positioning the transceiver in a good location.
Step two is getting compatible lights. Fortunately they’re pretty easy to find, it’s a very common standard. That ZHA page has a good searchable list of what will work. Another benefit of going the Zigbee transceiver route is that you can add lights and other things from multiple makers as you find them on sale. You don’t need to stick with one brand. I’ve got a mix of lights and physical remote controls from Sonoff, Ikea’s Tradfri line, Philips Hue, Sengled, and others all controlled directly by my HA setup.
One of the other reasons I went with the Sonoff transceiver and zigbee lights is because they work perfectly without the internet. Not just to use, but also to set up from scratch. If the internet vanished permanently overnight and I needed to set up and operate all my lights again without any hope of a working internet connection ever again, I could easily do it so long as I had a copy of HA stashed somewhere and some working computer to run it on. You don’t even need an app, just any of the modern web browsers. Though F-Droid has a good app. And of course there’s no telemetry going to the hardware makers involved.
Step three is learning how to set up an individual light (or other Zigbee device like a remote control or motorized window shades or temperature/humidity sensors or smart plugs) in HA with ZHA. It’s genuinely pretty easy once you try it a few times, but it is a bit quirky compared to the corporate alternatives. For you or anyone else reading, feel free to message me anytime if you’re getting started with this kind of zigbee light setup and need a hand. I could do a post and answer with screenshots to help people get started.
Thanks for such a high effort reply. I really appreciate it.
Looks like I’m going to have to do a bit of a deep dive and cost out some things. I’ll probably need to (finally) get around to datacabling my house, at least so I have proper wifi coverage, so that adds PoE switch/cabinet/patch panel/cat 6/wall plates etc to the cost. I’ve always thought it would be extremely cool to have blinds drop automatically at night and raise in the morning, as well as have lights shift spectrum through to day. All a lot of dollarydos though! Plus the server lmao.
Still, the appeal of (a) a useful and privacy respecting set of basic automation, and (b) the ability to do stuff like detect extremely strong and hot sunlight and automatically drop relevant blinds is pretty large.
You can DIY with https://tasmota.github.io/docs/Tasmota-IR/
Some people recommend Broadlink RM3/RM4 and just walling it off from the web.
If your PC/Raspberry PI is in range you can get a cheap linux compatible IR Emitter and use LIRC https://www.lirc.org/
This light bulb uses ESPHome.
You can also get IR transmitters that use ESPHome for cheap on aliexpress, but you’ll probably need some kind of enclosure. There’s zigbee transmitters as well, but I’ve yet to find one that plays nice with Home Assistant, unfortunately.