Install Home Assistant Operating System
Download the appropriate image
-
VirtualBox (.vdi)
-
KVM (.qcow2)
-
Vmware Workstation (.vmdk)
-
Hyper-V (.vhdx)
Follow this guide if you already are running a supported virtual machine hypervisor. If you are not familiar with virtual machines we recommend installation Home Assistant OS directly on a Raspberry Pi or an ODROID.
Create the Virtual Machine
Load the appliance image into your virtual machine hypervisor. (Note: You are free to assign as much resources as you wish to the VM, please assign enough based on your add-on needs).
Minimum recommended assignments:
- 2 GB RAM
- 32 GB Storage
- 2vCPU
All these can be extended if your usage calls for more resources.
Hypervisor specific configuration
VirtualBox
KVM (virt-manager)
KVM (virt-install)
Vmware Workstation
Hyper-V
- Create a new virtual machine
- Select Type “Linux” and Version “Linux 2.6 / 3.x / 4.x (64-bit)”
- Select “Use an existing virtual hard disk file”, select the unzipped VDI file from above
- Edit the “Settings” of the VM and go “System” then “Motherboard” and select “Enable EFI”
- Then go to “Network” “Adapter 1” choose “Bridged Adapter” and choose your Network adapter
Please keep in mind that the bridged adapter only functions over a hardwired ethernet connection.
Using Wi-Fi on your VirtualBox host is unsupported.
6. Then go to «Audio» and choose «Intel HD Audio» as Audio Controller.
By default VirtualBox does not free up unused disk space. To automatically shrink the vdi disk image
the discard
option must be enabled:
VBoxManage storageattach <VM name> --storagectl "SATA" --port 0 --device 0 --nonrotational on --discard on
- Create a new virtual machine in
virt-manager
- Select “Import existing disk image”, provide the path to the QCOW2 image above
- Choose “Generic Default” for the operating system
- Check the box for “Customize configuration before install”
- Select your bridge under “Network Selection”
- Under customization select “Overview” -> “Firmware” -> “UEFI x86_64: …”. Make sure to select a non-secureboot version of OVMF (does not contain the word
secure
,secboot
, etc.), e.g.,/usr/share/edk2/ovmf/OVMF_CODE.fd
. - Click “Add Hardware” (bottom left), and select “Channel”
- Select device type: “unix”
- Select name: “org.qemu.guest_agent.0”
- Finally select “Begin Installation” (upper left corner)
virt-install --name hass --description "Home Assistant OS" --os-variant=generic --ram=2048 --vcpus=2 --disk <PATH TO QCOW2 FILE>,bus=sata --graphics none --boot uefi
- Create a new virtual machine
- Select “Custom”, make it compatible with the default of Workstation and ESX
- Choose “I will install the operating system later”, select “Linux” -> “Other Linux 5.x or later kernel 64-bit”
- Select “Use Bridged Networking”
- Select “Use an existing virtual disk” and select the VMDK file above,
After creation of VM go to “Settings” and “Options” then “Advanced” and select “Firmware type” to “UEFI”.
Hyper-V does not have USB support
- Create a new virtual machine
- Select “Generation 2”
- Select “Connection -> “Your Virtual Switch that is bridged”
- Select “Use an existing virtual hard disk” and select the VHDX file from above
After creation go to “Settings” -> “Security” and deselect “Enable Secure Boot”.
Start up your Virtual Machine
- Start the Virtual Machine
- Observe the boot process of Home Assistant Operating System
- Once completed you will be able to reach Home Assistant on homeassistant.local:8123. If you are running an older Windows version or have a stricter network configuration, you might need to access Home Assistant at homeassistant:8123 or
http://X.X.X.X:8123
(replace X.X.X.X with your ’s IP address).
With the Home Assistant Operating System installed and accessible you can continue with onboarding.
Install Home Assistant Core
Install WSL
To install Home Assistant Core on Windows, you will need to use the Windows Subsystem for Linux (WSL). Follow the WSL installation instructions and install Ubuntu from the Windows Store.
As an alternative, Home Assistant OS can be installed in a Linux guest VM. Running Home Assistant Core directly on Windows is not supported.
This is an advanced installation process, and some steps might differ on your system. Considering the nature of this installation type, we assume you can handle subtle differences between this document and the system configuration you are using. When in doubt, please consider one of the other installation methods, as they might be a better fit instead.
Prerequisites
This guide assumes that you already have an operating system setup and have installed Python 3.10 (including the package python3-dev
) or newer.
Install dependencies
Before you start, make sure your system is fully updated, all packages in this guide are installed with apt
, if your OS does not have that, look for alternatives.
sudo apt-get update
sudo apt-get upgrade -y
Install the dependencies:
sudo apt-get install -y python3 python3-dev python3-venv python3-pip bluez libffi-dev libssl-dev libjpeg-dev zlib1g-dev autoconf build-essential libopenjp2-7 libtiff5 libturbojpeg0-dev tzdata
The above-listed dependencies might differ or missing, depending on your system or personal use of Home Assistant.
Create an account
Add an account for Home Assistant Core called homeassistant
.
Since this account is only for running Home Assistant Core the extra arguments of -rm
is added to create a system account and create a home directory.
sudo useradd -rm homeassistant
Create the virtual environment
First we will create a directory for the installation of Home Assistant Core and change the owner to the homeassistant
account.
sudo mkdir /srv/homeassistant
sudo chown homeassistant:homeassistant /srv/homeassistant
Next up is to create and change to a virtual environment for Home Assistant Core. This will be done as the homeassistant
account.
sudo -u homeassistant -H -s
cd /srv/homeassistant
python3 -m venv .
source bin/activate
Once you have activated the virtual environment (notice the prompt change to (homeassistant) [email protected]:/srv/homeassistant $
) you will need to run the following command to install a required Python package.
python3 -m pip install wheel
Once you have installed the required Python package, it is now time to install Home Assistant Core!
pip3 install homeassistant==2023.2.2
Start Home Assistant Core for the first time. This will complete the installation for you, automatically creating the .homeassistant
configuration directory in the /home/homeassistant
directory, and installing any basic dependencies.
You can now reach your installation via the web interface on http://homeassistant.local:8123
.
If this address doesn’t work you may also try http://localhost:8123
or http://X.X.X.X:8123
(replace X.X.X.X with your machines’ IP address).
When you run the hass
command for the first time, it will download, install and cache the necessary libraries/dependencies. This procedure may take anywhere between 5 to 10 minutes. During that time, you may get “site cannot be reached” error when accessing the web interface. This will only happen for the first time, and subsequent restarts will be much faster.
Help us to improve our documentation
Suggest an edit to this page, or provide/view feedback for this page.
Home Assistant Windows Portable (HassWP)
Portable version of Home Assistant for Windows.
ATTENTION: Direct works on Windows is not maintained by the core developers of Home Assistant. So some components/integrations may not work at all. No need to ask me or the core authors to fix it. If something you need doesn’t work — use virtualization.
Preinstalled:
- WinPython v3.9.10 64-bit
- Home Assistant v2023.7.1
- HACS v1.30.1
- SonoffLAN v3.3.1
- XiaomiGateway3 v3.1.0
- WebRTC v3.0.2
- YandexStation v3.11.0
- StartTime v1.1.6
- NotePad++ v7.8.5 32bit
HOWTO
- Download HassWP_XXXX.XX.X.zip
- Unpack
- Run
Useful files:
hass.cmd
— run Home Assistant and default Browsernotepad.cmd
— run NotePad withconfiguration.yaml
web.url
— open default Browser with http://localhost:8123/config/reset.cmd
— reset Home Assistant but don’t touch config files
Windows 7 or 32-bit
Latest HassWP versions are build for Windows 8+ 64-bit.
If you want the Windows 7 version or 32-bit support — download Hass v2021.12.10. This is because Hass 2021.12.10
is the last Hass with Python 3.8
support. And Python 3.8
it the last Python with Windows 7
support.
Supervisor and Addons
HassWP don’t have and can’t have supervisor and any Hass.io addons. Supervisor can be installed only over Docker. Nativelly Docker works only on Linux core. In any other OS it will use virtualization.
If you really needs Hass.io addons on Windows — use virtualization.
Cameras
Latest HassWP supports cameras stream. For snapshot and recording use relative path from your config
folder — mediasnapshot.jpeg
or wwwvideo.mp4
.
Generic camera and WebRTC integrations do not need ffmpeg in your system. But it you want use FFmpeg integration — download ffmpeg manually and put ffmpeg.exe
(80-120 MB) to your config folder.
Move config
You can transfer your configuration to another Hass installation at any time. In another HassWP, venv, docker, hass.io, etc. Windows or Linux, it doesn’t matter. Just move the contents of the config
folder to a new location. Remember about config/.storage
folder, it is also important.
Before any movement — stop the old and new Home Assistant!
Video Demo
Problems
-
If you have this problem:
File "C:HassWPpython-3.8.7libsocket.py", line 49, in <module> import _socket ImportError: DLL load failed while importing _socket
Install Windows update: KB2533623.
Do it yourself
- Download and unpack
WinpythonXX-3.XX.XX.0dot.exe
- Run from command line:
scriptsenv.bat
python -m pip install homeassistant==XXXX.XX
pip install https://github.com/AlexxIT/HassWP/archive/master.zip
mkdir config
python -m hass_win -c config -v
Update: новая статья
У новых пользователей часто возникает вопрос — можно ли установить Home Assistant на Windows?
Конечно можно! Проблема заключается в том, что не все зависимости Home Assistant легко установятся на любую сборку Windows. Об этом можно почитать тут.
На портале уже была статья о подобной установке. В своей версии я чуть подробнее опишу детали.
Идём на сайт python и скачиваем последнюю на момент написания статьи версию. Можно скачать как обычную, так и 64-битную версию.
В процессе установки Python я встречал следующие проблемы:
- установка не стартовала на «голой» Windows 7 без важных обновлений — нужно обновить систему стандартным способом
- установка не завершалась с недоступным сайтом python (из-за РКН) — нужно отключить опции download debug…
Вот у вас и установлен Python.
Далее нажимаем на клавиатуре win R и запускаем cmd
В запустившейся консоли вводим :
pip install homeassistant
Вот у вас и установлен последний Home Assistant.
На этом этапе у вас не должно возникнуть особых проблем. Python и HA должны установиться в практически любую систему.
Первый запуск Home Assistant
В той же консоли, что и ранее, просто вводим — hass.
Начнётся первый запуск HA. Он может быть достаточно долгим. HA будет скачивать и устанавливать разные библиотеки python, которые требуются конфигурации по умолчанию. А их не мало.
Плюс, если в процессе установки в вашей локальной сети обнаружатся поддерживаемые устройства — начнётся установка и их библиотек. В логе это отображается примерно так:
INFO (SyncWorker_1) [homeassistant.util.package] Attempting install of pychromecast==4.0.1
Вот на этом этапе вполне возможны проблемы и разные ошибки в консоли.
Терпеливо ждите пока HA делает свои дела. В идеале в конце лога вы должны увидеть строчку:
INFO (MainThread) [homeassistant.core] Starting Home Assistant
Далее попытайтесь открыть в любом браузере страницу:
http://localhost:8123/Вполне возможно у вас ничего не откроется. Это нормально.
План 2
Нажимайте в консоли Ctrl C, это принудительно остановит HA. Если не получится — закрывайте консоль и запускайте её заново.
И снова вводите в консоли — hass. И снова ждём строчку Starting Home Assistant и пробуем открыть в браузере:
http://localhost:8123/
План 3
Если со второй попытки страница так и не открылась — останавливаем HA и открываем папку с конфигами. Путь до неё показывается сразу после ввода команды hass. Это должно быть что-то вроде:
C:UsersAlexeyAppDataRoaming.homeassistant
Только с именем вашего пользователя. Проще вбить этот адрес сразу в проводнике Windows.
Теперь правим файл configuration.yaml.
Заменяем всё его содержимое на 3 простые строки:
config: frontend: system_health:
Это минимальный набор модулей, необходимый для старта HA и отображения главной страницы. Сильно сократит перечень зависимостей и повысит шансы старта.
Снова запускаем hass и пробуем открыть страницу.
PS
Это не все проблемы с которыми можно столкнуться. Но, надеюсь, вам хватит советов, описанных в статье.
На данный момент инструкция неактуальна. Текущие варианты установки можете посмотреть на официальном сайте HA.
В данной статье будет пошагово описан процесс установки home assistant на ПК под управлением Windows 10.
Важно отметить, что операционная система Windows не является основной для HA, что проявляется в неполной работоспособности программного обеспечения, в связи с чем установку HA на Win10 рекомендуется производить только для ознакомления с возможностями ПО.
Итак, приступим.
-
-
- Первым делом нам нужно установить Python. Идем на официальный сайт, выбираем последнюю версию, проматываем страницу вниз и выбираем нужный нам файл (например Windows x86-64 executable installer). Скачиваем и запускаем.
- При установке выбираем Customize installation -> на второй вкладке оставляем только pip -> на третьей выбираем Add Python to environment variables.
- После того, как Python установится запускаем командную строку: нажимаем Win и R, в появившемся поле вводим cmd и нажимаем Ок.
- Вводим в командной строке pip install homeassistant, нажимаем Enter и ждем пока все установится. В случае ошибок внимательно читаем и делаем что там будет написано. В моем случае не было Visual C++ 14.0. Для исправления – скачиваем Build Tools для Visual Studio с официального сайта, устанавливаем и перезагружаем ПК.
- Программа установлена и для запуска осталось ввести команду hass в командной строке. На данном этапе может появляться много ошибок, возможно придется прервать запуск (Ctrl+C) и запустить заново. Также брандмауэр может попросить разрешить доступ. Разрешаем. В самом конце запуска в консоли должна появиться строчка со следующим содержанием: INFO (MainThread) [homeassistant.core] Starting Home Assistant.
- Далее запускаем браузер и вводим localhost:8123. Если все сделано правильно, то откроется окно регистрации учетной записи. Если ничего не получилось, то попробуйте еще раз выполнить пятый пункт.
- Поздравляю, мы установили Home Assistant на ПК под управлением Windows 10.
-
Ссылки на другие уроки по настройке Home Assistant.
В последнее время, мне как-то надоедает включать свою домашнюю виртуализацию, базирующуюся на Debian 10 + Proxmox 6 и работать с VM
из-под браузера. Может конечно если что-то масштабное, то да. А вот с целью побыстрее обкатать то можно на рабочем месте использовать Virtualbox
(я против использования Hyper-V
)
Итак, рабочая Windows 10 Pro (Version 10.0.18363.592)
Железо:
Intel® Core™ i3-2120 CPU @ 3.30GHz
RAM: 8Gb
HDD: 250 SSD Samsung
Motherboard: Asus P8H61-M LX3 R2.0
Шаг №1:
На рабочую Windows 10 Pro
устанавливаю VirtualBox 6.1.12 (VirtualBox-6.1.12-139181-Win.exe)
Шаг №2:
Скачиваю с официального сайта Home Assistant
на момент (05.08.2020
) написания данной заметки vmdk
файл hassos_ova-4.11.vmdk.gz
(его вес 243 395 КБ
), распаковываю получается файл hassos_ova-4.11.vmdk
(его вес 752 128 КБ
)
Шаг №3:
Создаю VM
через Virtualbox
Virtualbox – Машина – Создать
Имя: srv-ha
Папка машины: C:VM
Тип: Linux
Версия: Other Linux (64-bit)
И нажимаю "Экспертный режим"
, указываю количество выделяемой данной VM
оперативной памяти, к примеру 1024
и Жесткий диск
выбираю "Использовать существующий виртуальный жесткий диск"
— "Выбрать образ виртуального жесткого диска"
– Добавить
– выбираю распакованный в C:VMhassos_ova-4.11.vmdk
и нажимаю "Открыть"
— "Выбрать"
— и нажимаю "Создать"
После пока VM
еще выключена изменять (через меню "Настроить"
на VM
) тип сетевого адаптера с
Адаптер 1: Intel PRO/1000 MT Desktop (NAT)
На "Сетевой мост".
После запускаю VM
путем нажатия на кнопку "Запустить"
На заметку: Если после запуска идет надпись в консоли VM "FATAL: No bootable medium found! System halted"
, то это значит нужно выключить VM: Машина – Завершить работу
, открыть опять "Настроить"
и в меню "Система"
— вкладка "Материнская плата"
и отменить галочкой
Включить EFI (только специальные ОС): включить галочкой
И нажимаю ОК
, а затем нажимаю "Запустить"
. Вижу, как бегут строки загрузки VM
После в консоли нажимаю клавишу Enter и вижу приглашение на авторизацию:
homeassistant login:
указываю учетную запись root
И нажимаю клавишу Enter
После вижу приглашение:
Welcome on Home Assistant command line
ha >
В этой консоли нужно ввести слово "login":
#
набираю команду nmcli
и вижу свой IP
адрес, полученный от моего DHCP
-сервиса в локальной сети
Шаг №4:
Теперь зная этот адрес я могу в своей локальной сети обратиться к сервису Home Assistant
посредством браузера через URL
строку: http://IP&DNS:8123 (http://192.168.10.185:8123
)
http://192.168.10.185:8123/onboarding.html
— создаю первый раз учетную запись пользователя
Имя: ekzorchik
Логин: ekzorchik
Пароль: 712mbddr@
Подтвердите пароль: 712mbddr@
И нажимаю "Создать учетную запись"
Именую свой Home Assistant
: к примеру, как ekzhome
Часовой пояс: Europe/Moscow
И нажимаю "Далее" - "Готово"
После чего передо мной развернутый из заводского образа разработчиков система домашней автоматизации под Virtualbox
операционной системы Windows 10 Pro
. Когда у меня выдается свободные минуты я разбираю на работе что-то полезное для себя, как процесс самообразования:
Итого я в шагах задокументировал для себя, как под Virtualbox
быстро и легко развернуть Home Assistant
дабы иметь тестовый полигон настройки чтобы в последствии переносить только реально работающие решения и не засорять боевую систему. Так делаю я, да это почти двойная работа, но что в эксплуатации не должно страдать от тестов. На этом моя заметка завершена, с уважением автор блога Олло Александр aka ekzorchik.
I’m going to install Home Assistant on Windows using VirtualBox. It may sound complicated, but it is not and I will show you everything step-by-step.
I decided to move my Home Assistant installation from raspberry to a desktop PC to test is it going to be faster and more stable. It doesn’t matter If you are getting started with a fresh Home Assistant installation or just like me you want to migrate to a more powerful machine. This guide is tailored for you!
I’m will use VirtualBox on Windows 10, but you can use Linux or MacOS as your VirtualBox host and all of the steps that you will see in this video will be pretty much the same.
So let’s go:
Download and install VirtualBox for your OS
Nothing fancy here, just go to VirtualBox website then download and install the package for your Operating System. In my case this is Winodws.
If you have any difficulties with this step check my video above for detailed instructions.
Download Home Assistant Image file
Open the following link https://www.home-assistant.io/hassio/installation/ and download the VDI file under “As a virtual appliance (x86_64/UEFI)” bullet.
This is the virtual disk image that contains everything we need to start our Home Assistant on Windows.
Configure and install Home Assistant
To prevent yourself from issues in the future with not enough virtual storage, because by default Home Assistant VirtualDisk is 6GB only it is recommended to execute these several steps first.
Add the downloaded Home Assistant VDI image to Virtual Media Manager.
You will need VirtualBox 6 or higher to have this Virtual Media Manager option.
You can increase the size to whatever is suitable for you. In this example the size will be increased to 100GB.
Apply the changes and you should have something similar (of course your VDI version will be different, newer not 3.13)
Next, create New Virtual Machine in VirtualBox application.
Click on the new button.
After that type a name for you virtual machine and choose either Other Linux 32-bit or 64-bit depending of your system.
On the next dialog select the amount of RAM that you want to dedicate for this virtual machine. Absolute minimum should be 512MB.
The good think about this setting is that you can increase or decrease it at later stage if there is such need.
For the hard disk select the “Use an existing virtual hard disk file”.
On the next dialog click on the “Add” button
To add the VDI file just click Add.
At the end you should see something similar like the picture below, if you resize your VDI the digit under Virtual Size should mach your desired size.
Your final step here is to click the “Create” button.
Before you click “Start” button
Next we have to change some settings in VirtualBox to run our Home Assistant on Windows.
Click on the gear-wheel with the label “Settings” inside VirtualBox window.
In the “System” section under “Motherboard” tab click on “Enable EFI” option.
In the “System” section under “Motherboard” tab click on “Enable EFI” option.
Then click on the Network tab and change from Nat Network to Bridged Adapter – this will allow using your home network IP.
Of course you can increase your virtual processors/cores if your host system allows that, but I don’t see point to put here more than 2 processor. You can find this section again in System -> Processors.
When you are ready with everything click “OK”
Now you can freely click “Start” button (BIG green arrow pointed at right) to start Home Assistant on Windows as a Virtual Machine.
Performing one of the most important task
Now it is time to perform one of the most important parts. Without doing it you are putting the whole installation at risk, so be very careful when you are executing this.
Just look below this text and smash the “Subscribe” button to get my free Getting Started Smart Home Guide and to receive my articles every week via email. Thank you. 🙏
Setting a static IP from Home Assistant (Optional Step)
This step is optional. It is recommended if you are using AdGuard. If you don’t know what AdGuard is – check my video article about it.
Open you Home Assistant and go to:
Supervisor > System > Change IP address > Static
Enter the IP that you wish to set. For example: 10.0.0.2/24.
As Gateway type the IP of your router. The DNS is usually your router, or some public DNS service like 8.8.8.8. And if you use AdGuard you should add the AdGuard IP.
To test if everything is OK open in a new browser/tab the configured by you address on port 8123. For example: http://10.0.0.2:8123.
Using Home Assistant Snapshot for migration (Optional Step)
I’m going to use Home Assistant Snapshot functionality to migrate all of my data and configurations from my Raspberry Pi (old machine) to this new fresh installation. If you don’t have anything to migrate from – go directly to the next step/heading.
I will open my Home Assistant installation on the Raspberry Pi (old machine). And I will go to “Supervisor” in the lower left part of the screen and then on “SNAPSHOTS” tab.
Create a full snapshot or use already existing one if you have such.
Then click on you snapshot that you want to migrate and choose “DOWNLOAD SNAPSHOT” button.
Next go to your new HOST (where you want to migrate everything) and again click on “Supervisor” button, but before you click the Snapshots – click on the “ADD-ON STORE”.
Search and install “Samba” add-on.
Open and install this add-on. Don’t forget to add username and password under Config section. You will need them to access the snapshot that we created earlier.
Click “SAVE” when you update your Samba Configuration.
After you save your changes scroll up a bit and click on the “START” button.
Now you have to open that shared folder. Depending of your Operating system you can do one of the following:
Access shared folder from Windows
In Windows you can press WINDOWS + R buttons simultaneously and in the Run dialog you have to enter:
\YOUR_NEW_HA_IP
In my case this is
\10.0.0.15
Access shared folder from macOS
To open a shared folder in macOS, open the Finder and press COMMAND + k, then type something like smb://10.0.0.15 and don’t forget to change the IP.
Access shared folder from Linux
If you are using Linux the universal way is from Terminal using smbclient by typing the following:
smbclient //YOUR_NEW_HA_IP/ -U <user>
Remember to login successfully you have to enter the credentials that you configure in the samba add-on within Home Assistant.
When you open the shared folder find “backup” folder and paste inside the snapshot that you downloaded from your old machine.
paste inside the snapshot that you downloaded from your old machine.
Head back to Supervisor > Snapshots menu in the Home Assistant of your new/target machine and click “refresh” button in the upper right corner.
You should see your snapshot under the “Available snapshot” section.
Click on it and then select “RESTORE SELECTED”.
The only thing left is to wait a bit for the process to finish. It can take up to 20min so be patient please.
Auto Start VirtualBox and Home Assistant after Windows restart
I’m going to configure VirtualBox to automatically start Home Assistant when windows reboots.
Go to your VirtualBox window and right click on your Home Assistant virtual machine and select “Create Shortcut on Desktop”
Then open windows explorer or Run dialog (WINDOWS + R) and type:
shell:startup
this will open a system startup folder in which everything pasted there will try to auto start after restarting Windows.
And we are going to do exactly that. Just paste the created shortcut of your Home Assistant on Windows virtual machine inside this system startup folder.
This is not enough for auto starting VirtualBox and HomeAssistant, because your windows user have to successfully login in order the things inside the startup folder to be executed.
We will fix that “issue” in the next section.
Auto Log in Windows after restart
I’m going to enable auto login feature in Windows, so when the computer restarts our account will be automatically logged in.
And the VirtualBox will auto start Home Assistant virtual machine if you execute the previous step in this tutorial.
Press WINDOWS + R and type
netplwiz
In the window that will be displayed uncheck the “User must enter a username and password to use this computer.”
Then click OK and enter your user password twice and you are ready.
What if netplwiz is not working?
If the above check in netplwiz is not visible for you (and there is a big chance for that if you are using Windows 10 version 1909 or above). Follow these steps:
- Go to windows search (start menu) and type: passwordless sign-in
Then, Click on the result!
- After that disable the following option if it’s enabled.
- Finally execute the netplwiz procedure exactly as described above.
Set your Windows Power Options correctly
Don’t forget to set your power options right to avoid unwanted sleep of your computer after several working hours.
To check if everything is alright open windows control panel and search for “power options” and click on “Change power-saving settings” and then change when the computer sleeps. Last find the option “Put the computer to sleep” and from the dropdown menu select – Never.
Resize Home Assistant Virtual Disk
The following steps are only needed If for whatever reason your Home Assistant Virtual Disk size that you already have is not enough.
How Do I know that my Home Assistant Virtual Disk have not enough space?
You will understand that you have disk space issues when for example you receive warnings in your Home Assistant logs, that your disk is full. Or you cannot update your Home Assistant and/or you can’t create new snapshots anymore. Only if you face any of these symptoms above you will know that it is time to resize your VDI file.
And here is how you can do it.
- Shut down the Home Assistant virtual machine – ensure that the state is set to Powered Off and not to Saved.
- Open command prompt and go to the folder where Virtual Box is installed (C:Program FilesOracleVirtualBox by default) by type the following:
cd “C:Program FilesOracleVirtualBox”
- Then type the following command and don’t forget to replace the full path to your Home Assistant image (VDI file) and to change the size you want to enlarge the image to in Megabytes.
VBoxManage modifymedium disk “C:FULL_PATH_TO_YOUR_HOME_ASSISTANT_IMAGE.vdi” --resize 81920
- This process doesn’t enlarge the partition on the Home Assistant virtual hard disk, so you won’t have access to the new space just yet. You can use a GParted live CD to resize your virtual machine’s partition.
- Simply boot the GParted ISO image in your virtual machine and you’ll be taken to the GParted partition editor. GParted will be able to enlarge the partition on the Home Assistant virtual hard disk.
- Once GParted is booted, right-click the partition you want to enlarge and select Resize/Move.
- Drag the slider all the way to the right to use all the available space for the partition. Click the Resize/Move button after you’ve specified the space you want to use.
- Finally, apply your changes and enlarge the partition.
- After the resize operation completes, restart your virtual machine and remove the GParted ISO file.
- You will now have a resized Home Assistant on Windows.
Question for You
What kind of device are you using for your main home server?
Raspberry PI, some kind of desktop or laptop or maybe enterprise grade server.
If you are feeling lazy like me these days just put one word in the comments like: raspberry or desktop and I will know for what are you talking about.
That doesn’t mean that you cannot put the full configuration specification if you wish. It will be interesting to see that as well.
Support my Work
Any sort of engagement on this site does really help out a lot with the Google algorithm, so make sure you hit the subscribe If you enjoy this article.
Also feel free to add me on Twitter by searching for @KPeyanski.
You can find me on my Discord server as well. This is the invite link.
I really hope that you find this information useful and you now know how to install Home Assistant on Windows using VirtualBox .
Thank you for watching, stay at home, stay safe and see you next time.
Содержание
- Как установить умный дом Home Assistant
- Запускаем Home Assistant на Windows (Portable)
- Устанавливаем Home Assistant на Windows
- Установка Home Assistant
- Первый запуск Home Assistant
- Windows
- Install Home Assistant Operating System
- Download the appropriate image
- Create the Virtual Machine
- Hypervisor specific configuration
- Start up your Virtual Machine
- Install Home Assistant Core
- Install WSL
- Install dependencies
- Create an account
- Create the virtual environment
- Как установить Home Assistant в Virtualbox на Windows 10
Как установить умный дом Home Assistant
Это статья написана для напоминания, что умный дом стал намного ближе, чем мы думали.
Home Assistant-это open-source платформа для автоматизации, работающая на Python 3. Позволяет отслеживать и контролировать все устройства в доме и автоматизировать действия. Идеально может работать на одноплатном компьютере Raspberry PI.
Что такое умный дом можно почитать в википедии тут и тут.
Давайте по порядку:
1. Центральное ядро
Умный дом нуждается в центральном контроллере (хаб, сервер и т.д.). Это связующее звено между всеми элементами умного дома и пользователем. Бывают распределенные системы без центрального контроллера, но все равно нужен один сборщик информации, который покажет пользователю все актуальные новости каждого устройства
ПК-отличный вариант, если требуется большая нагрузка на сервер, т.к. производительности даже старых ноутбуков хватит вполне (только если вы не будете крутить 4К видео или использовать 10 камер с HEVC кодированием). Из минусов- в 95% случаев активное охлаждение и чтобы подключить обычное реле всегда приходится использовать дополнительные костыли.
Специализированные контроллеры — отличный вариант, если вам нужна надежность и отказоустойчивость. Вероятность отказа промышленного контроллера (при правильных руках) приближается к вероятности появления зомби апокалипсиса. Но есть и минус- программировать и настраивать могут либо те, кто уже автоматизировал несколько конвейеров, либо человек в мозгу которого не нейроны а релейные схемы. И чаще всего интерфейс у них, мягко говоря, аскетичный. К сожалению, я не такой умный, поэтому это вариант точно не для меня.
И тут мы приходим к самому современному варианту — это дешевые одноплатные компьютеры на базе ARM архитектуры. Сейчас их выбор просто огромен, но самый популярный родоначальник Raspberri pi. Из плюсов маленькое энергопотребление, есть пользовательские выводы и удовлетворительная производительность для запуска несложных программ.
Есть еще много экзотических вариантов автоматизации своего очага, например, кровать-будильник на Всемирной выставке 1851 года (изобретатель Теофиль Картер). Или любимое извращенство- ардуино с шилдами (прощу прощение за несерьезный мем)
2. Внешние датчики, контроллеры, элементы управления.
Эта тема настолько обширная, что описать все многодикообразие в данной статье не представляется возможным, поэтому оставим это для будущих статей. Вкратце, есть:
— DIY решения и ардуиноподбные решения
— Китайские решения (пример Sonoff)
— Дорогие красивые решения (пример nest)
Тоже вынесем сие обсуждение в отдельную тему. Сегодня мы будем рассматривать только одну из множества открытых платформ. Обзоры еще будут. Сразу отвечу на вопросы, почему именно она:
а) Огромное количество поддерживаемых сервисов,
б) Легко и бесплатно установить,
в) Приятный интерфейс.
4. Сторонние сервисы
Помогают подключить разные существующие решения и автоматизировать действия на смартфонах и ПК. Типичный пример IFTTT.
Что делать если я не умею программировать или у меня есть деньги?
Отдельно стоят решения современных экосистем от Samsung, Xiaomi, Amazon, Apple, Google и т.д. Соглашусь, что порой их решения выглядят намного красИвее, но средняя заработная плата русского человека примерно 500$, что не позволяет ощутить всю гамму вкусов.
Рекомендуется к приобретению:
1. Raspberry Pi 3 (вероятно подойдут и более старые) 35$
2. MicroSD на 16ГБ не ниже 10 класса( чем быстрее, тем лучше) с адаптером к компьютеру 7$
3. Зарядник MicroUSB на 5В и больше чем 2А 0$ (подошел от старого телефона)
4. Ваше драгоценное время. Бесценно.
5. Опционально монитор с HDMI
После записи, извлекаем флешку и вставляем в распберри пи.
ОБЯЗАТЕЛЬНО НАДО ВСТАВИТЬ В МАЛИНУ ИНТЕРНЕТ-ШНУР.
При подаче питания должна загореться красная лампочка и зеленая начать хаотично мигать. Ждем с кружкой чая 10 минут.
После этого нам надо найти уже веб интерфейс нашей системы умного дома. Для этого есть несколько способов:
1) Посмотреть через hdmi нашу командную строку и найти там IP вида 192.168.1.х ( или любого другого)
2) посмотреть в настройках роутера какой DHCP сервер присвоил адрес новому устройству
3) Воспользоваться сканером сети (например, Advanced IP Scanner Portable)
После этого открываем браузер (не программу для скачивания браузеров, а именно браузер)
И вводим наш IP + :8123 (у меня это 192.168.1.101:8123)
И вуаля! Наша система загрузилась!
На официальном сайте все хорошо описано (но на английском) поэтому, если интересно, смогу написать несколько примеров как это делать в реальной жизни.
Все шаги я записал на видео, поэтому не стесняемся и заходим на видео.
Дорогие читатели, напишите в комментариях, что еще очень хочется увидеть?
Источник
Запускаем Home Assistant на Windows (Portable)
У меня уже была статья про установку Home Assistant на Windows.
В этом варианте его не нужно устанавливать:
Портативная версия Home Assistant под Windows. В комплекте уже есть:
PS: не стоит рассматривать HassWP, как боевое решение системы умного дома на века. Он будет полезен скорее для ознакомления и для экспериментов.
На Win10 не хочет работать
Для работы на Win10 необходимо установить Visual studio c компонентами C++
какой-то совсем не портативный вариант получается, это как за дрезиной тянуть два вагона запчастей
очень интересный вариант.
очень правильное направление.
скажите, кто-ниубудь продолжает разработку этого бандла? Может быть на коммерческой основе?
Источник
Устанавливаем Home Assistant на Windows
Конечно можно! Проблема заключается в том, что не все зависимости Home Assistant легко установятся на любую сборку Windows. Об этом можно почитать тут.
На портале уже была статья о подобной установке. В своей версии я чуть подробнее опишу детали.
Установка Home Assistant
На первом экране выбираем Customize installation.
На втором нам вполне хватит только pip. Остальные выключаем.
И последние галочки про precompile и debug. Возможно они помогут при установке хитрых зависимостей Home Assistant, но это не точно 🙂
Я люблю устанавливать Python в корень диска. Так проще его найти и можно избежать проблем с кривыми путями.
В процессе установки Python я встречал следующие проблемы:
Далее нажимаем на клавиатуре win R и запускаем cmd
В запустившейся консоли вводим :
На этом этапе у вас не должно возникнуть особых проблем. Python и HA должны установиться в практически любую систему.
Первый запуск Home Assistant
Начнётся первый запуск HA. Он может быть достаточно долгим. HA будет скачивать и устанавливать разные библиотеки python, которые требуются конфигурации по умолчанию. А их не мало.
Терпеливо ждите пока HA делает свои дела. В идеале в конце лога вы должны увидеть строчку:
Далее попытайтесь открыть в любом браузере страницу:
Только с именем вашего пользователя. Проще вбить этот адрес сразу в проводнике Windows.
Теперь правим файл configuration.yaml.
Заменяем всё его содержимое на 3 простые строки:
Это минимальный набор модулей, необходимый для старта HA и отображения главной страницы. Сильно сократит перечень зависимостей и повысит шансы старта.
Снова запускае м hass и пробуе м открыть страницу.
Это не все проблемы с которыми можно столкнуться. Но, надеюсь, вам хватит советов, описанных в статье.
Источник
Windows
Install Home Assistant Operating System
Download the appropriate image
Follow this guide if you already are running a supported virtual machine hypervisor. If you are not familiar with virtual machines we recommend installation Home Assistant OS directly on a Raspberry Pi or an ODROID.
Create the Virtual Machine
Load the appliance image into your virtual machine hypervisor. (Note: You are free to assign as much resources as you wish to the VM, please assign enough based on your add-on needs)
Minimum recommended assignments:
All these can be extended if your usage calls for more resources.
Hypervisor specific configuration
After creation of VM go to “Settings” and “Options” then “Advanced” and select “Firmware type” to “UEFI”.
Start up your Virtual Machine
With the Home Assistant Operating System installed and accessible you can continue with onboarding.
Install Home Assistant Core
Install WSL
To install Home Assistant Core on Windows, you will need to use the Windows Subsystem for Linux (WSL). Follow the WSL installation instructions and install Ubuntu from the Windows Store.
As an alternative, Home Assistant OS can be installed in a Linux guest VM. Running Home Assistant Core directly on Windows is not supported.
This guide assumes that you already have an operating system setup and have installed Python 3.8 (including the package python3-dev ) or newer.
Install dependencies
Install the dependencies:
Create an account
Create the virtual environment
First we will create a directory for the installation of Home Assistant Core and change the owner to the homeassistant account.
Next up is to create and change to a virtual environment for Home Assistant Core. This will be done as the homeassistant account.
Once you have installed the required Python package it is now time to install Home Assistant Core!
If this address doesn’t work you may also try http://localhost:8123 or http://X.X.X.X:8123 (replace X.X.X.X with your machines’ IP address).
When you run the hass command for the first time, it will download, install and cache the necessary libraries/dependencies. This procedure may take anywhere between 5 to 10 minutes. During that time, you may get “site cannot be reached” error when accessing the web interface. This will only happen for the first time, and subsequent restarts will be much faster.
Источник
Как установить Home Assistant в Virtualbox на Windows 10
В последнее время, мне как-то надоедает включать свою домашнюю виртуализацию, базирующуюся на Debian 10 + Proxmox 6 и работать с VM из-под браузера. Может конечно если что-то масштабное, то да. А вот с целью побыстрее обкатать то можно на рабочем месте использовать Virtualbox (я против использования Hyper-V )
Итак, рабочая Windows 10 Pro (Version 10.0.18363.592)
Шаг №1: На рабочую Windows 10 Pro устанавливаю VirtualBox 6.1.12 (VirtualBox-6.1.12-139181-Win.exe)
Шаг №2: Скачиваю с официального сайта Home Assistant на момент ( 05.08.2020 ) написания данной заметки vmdk файл hassos_ova-4.11.vmdk.gz (его вес 243 395 КБ ), распаковываю получается файл hassos_ova-4.11.vmdk (его вес 752 128 КБ )
Шаг №3: Создаю VM через Virtualbox
Virtualbox – Машина – Создать
После пока VM еще выключена изменять (через меню «Настроить» на VM ) тип сетевого адаптера с
На «Сетевой мост».
После запускаю VM путем нажатия на кнопку «Запустить»
После в консоли нажимаю клавишу Enter и вижу приглашение на авторизацию:
homeassistant login: указываю учетную запись root
И нажимаю клавишу Enter
После вижу приглашение:
Welcome on Home Assistant command line
ha > В этой консоли нужно ввести слово «login»:
Шаг №4: Теперь зная этот адрес я могу в своей локальной сети обратиться к сервису Home Assistant посредством браузера через URL строку: http://IP&DNS:8123 (http://192.168.10.185:8123 )
http://192.168.10.185:8123/onboarding.html — создаю первый раз учетную запись пользователя
И нажимаю «Создать учетную запись»
Именую свой Home Assistant : к примеру, как ekzhome
Итого я в шагах задокументировал для себя, как под Virtualbox быстро и легко развернуть Home Assistant дабы иметь тестовый полигон настройки чтобы в последствии переносить только реально работающие решения и не засорять боевую систему. Так делаю я, да это почти двойная работа, но что в эксплуатации не должно страдать от тестов. На этом моя заметка завершена, с уважением автор блога Олло Александр aka ekzorchik.
Источник