Installing Home Assistant on Intel Compute Stick Via Docker

by NiteshC5 in Circuits > Linux

92 Views, 0 Favorites, 0 Comments

Installing Home Assistant on Intel Compute Stick Via Docker

intelstick.jpg

Today will install Home Assistant on Intel compute Stick. I am installing it on 2 Gb variant .

Step: 1

First download Debian 10 ISO file link . Note only amd64 is supported by Home Assistant.

Download the first CD or DVD image file only, as it the only bootable ISO rest images are entirely optional.

Step : 2

Next Download Rufus link.

Now open rufus.exe and attach pen drive. Select the pen drive form drop down devices. Under boot section select the Debian iso file Select GPT partition scheme. Note you are going to format your pen drive make sure no important data is stored on it. Now hit start and wait for the process to complete.

Step : 3

Attach the pen drive to Intel stick. go in to bios setup, select Ubuntu x64 in boot menu also enable UEFI bash shell you will need it later. Now reboot and select the proper usb boot device and start the installation. At the end of installation you will receive error failed to load GRUB (Grub will not be installed automatically) you may skip the Grub installation and proceed further. You will also get the prompt "Continue without boot loader" take a snapshot of it from your cell phone it will provide all the details to boot into os will need it later.

Step : 4

Installing Grub on Intel stick is simple. Copy grubx64.efi file from Debian ISO image located in EFI\boot to the pen drive now attached it to Intel stick and reboot in UEFI Shell. we need to manually copy this grubx64.efi in our Intel stick efi folder with below steps.

FS1 will be pen drive and FS0 will be EFI partition on Intel stick.

Type FS1: and hit enter

cp FS1:/grubx64.efi FS0:/EFI/boot/

you can check it with ls command

ls /EFI/boot/

Next remove the pen drive and reboot the Intel stick and you will see the Grub page

type below command

linux (hd0,gpt2)/boot vmlinuz-version-generic root=/dev/mmcblk1p2

initrd (hd0,gpt2)/boot/initrd.img-version-generic

boot

Note- for vmlinuz and initrd.img versios you can hit tab to at linux (hd0,gpt2)/boot vim file will be loaded automatically similarly for initrd.img

once you hit boot debian os will get booted and this time you have to update grub configuration so that after reboot you will not go in uefi shell menu again.

In terminal -

sudo apt-get update

sudo update-grub

Now reboot and check you should successfully boot in Debian now.

Next you can install home assistant from below link.

https://community.home-assistant.io/t/installing-h...

It is straight forward installation you can customize it as your requirements.

Note: Home Assistant entirely takes control of your audio devices. If you install another docker like volumio mpd will not work and will give error device is busy.

To solve it connect to hassio_audio docker

docker exec -it hass_audio /bin/bash

pactl load-module module-suspend-on-idle

exit

audio device is free now and you have to do it after every reboot i could not find any other way to stop hass_audio from blocking audio device.

Installing Volumio docker

https://hub.docker.com/r/jbonjean/volumio/

docker run --restart=always -d --name volumio \
-e HOST=http://192.168.1.1:3000 \

-p 3000:3000 \

-v ${MUSIC_DIR}:/var/lib/mpd/music/:ro \

-v ${VOLUMIO_DATA_DIR}:/data \

--device /dev/snd \

jbonjean/volumio

In volumio if you get no device and mpd device busy

then follow this steps

docker exec -it volumio /bin/bash

create asound.conf in /etc/

touch /etc/asound.conf

vi /etc/asound.conf

pcm.!default {
type hw

card 1

}

ctl.!default {

type hw

card 1

}

Note- in my case card 1 is my usb sound card

you can check the status by command alsamixer it will give your default audio device.

now edit /etc/mpd.conf

and modify

bind_to_address "/run/mpd/socket"

now save it and run mpd command you should not get any error like below port already in use.

socket: Failed to bind to '127.0.0.1:6600': Address already in use

Also volumio will now run normally.

Thanks for reading.

Regards

Nitesh Chavan

nitesh.chavan@outlook.com