Home Assistant VM on SCALE

Engine1992

Cadet
Joined
Dec 25, 2021
Messages
1
@Norumen
Here is what I used.

Make sure to use a location on your data pool as a working directory, don't use any system directory.

Use wget to get the ova file:
Code:
wget https://github.com/home-assistant/operating-system/releases/download/6.6/haos_ova-6.6.ova

Extract the ova file using tar:
Code:
tar -xvf haos_ova-6.6.ova

Convert the vmdk to a raw image file, I had to use the full working directory for the source:
Code:
qemu-img convert -f vmdk -O raw /must include full working path/home-assistant.vmdk hassos.img

Create a Zvol using the TrueNas Scale GUI - Be sure to make it large enough for dd to complete, I used 35 Gib.

Use dd to write the image file to your zvol
Code:
dd if=hassos.img of=/dev/pool/yourzvolhere

Create a virtual machine using the gui and attach the zvol you just created as the hdd

Enjoy Hassos. Hope this helps.
Hey! I have two questions:

1. I tried to
Code:
dd if=hassos.img of=/dev/pool/yourzvolhere
but console returns "No such file or directory". Only works when i type
Code:
dd if=hassos.img of=/yourzvolhere (my name of zvol)
- is it correct?

2. What do U mean when you text: "must include full working path"? I just type
Code:
qemu-img convert -f vmdk -O raw home-assistant.vmdk hassos.img
and it's going next. I don't know that it is correct.

I am a beginner to using the console, so please be understanding and patient ;)
 

achmetinternet

Explorer
Joined
Jun 13, 2018
Messages
50
TrueCharts should also support HomeAssistant (also thanks to the work by @tprelog ) as a SCALE app come next release of TrueNAS SCALE.
I installed the app from the Truecharts catalogue but somehow it doesn't detect all my devices, i.e. no integration suggestions show up and when I add e.g. one for my FritzBox router, it shows no devices there either, so something doesn't work right.
 

tprelog

Patron
Joined
Mar 2, 2016
Messages
297
I installed the app from the Truecharts catalogue but somehow it doesn't detect all my devices, i.e. no integration suggestions show up and when I add e.g. one for my FritzBox router, it shows no devices there either, so something doesn't work right.

I have not been involved with @truecharts for almost a year by now, though I do try to look in on progress once in awhile.

I think what you're missing is discovery - It's my understanding that things like mDNS, zeroconf or UPNP are not supported. There may be a way around this issue but it will likely be considered an advanced setup, if it's even possible.

Your best bet is probably to join TrueCharts discord - If you do a search there for Home Assistant networking, or Home Assistant discovery, you will find more information. If your going to ask for support, just be sure to read rules and channel topics before you start a thread.
 

patmage

Dabbler
Joined
Oct 21, 2016
Messages
12
Some integrations require you to specify a broadcast address to work when your HA install is on a different subnet. Like a container using a ClusterIP. For instance this is what the section of my configuration.yaml looks like to find my lifx light bulbs. Where 192.168.42.5 is my Truenas server and 192.168.42.255 is the broadcast address of the subnet my lightbulbs are in.
Code:
lifx:
  light:
    - server: 192.168.42.5
      port: 56700
      broadcast: 192.168.42.255


Other devices I simply had to give fixed IP addresses and specify them directly in the config file by setting the host setting. Like this for an LG tv:
Code:
webostv:
  - name: Living Room TV
    host: 192.168.42.193
    turn_on_action:
      service: wake_on_lan.send_magic_packet
      data:
        mac: AB-CD-EF-01-23-45
        broadcast_address: 192.168.42.255


To make things easier to manage I used a HostPath for my Storage and Persistence of my Home Assistant app so I could edit things with VS Code using its Remote Explorer function.
 

achmetinternet

Explorer
Joined
Jun 13, 2018
Messages
50
Does that mean I do not get suggestions for devices but would need to edit the YAML to add each and every service/item?
 

tprelog

Patron
Joined
Mar 2, 2016
Messages
297
Does that mean I do not get suggestions for devices
yes, that is correct
but would need to edit the YAML
maybe sometimes but not necessarily
to add each and every service/item
I think, for a lot of integrations you can still use the UI. You'll need to check the Home Assistant docs for the integrations in question.

Here's a link to the google cast integration for example. It explains how to setup and add you cast devices if discovery does not work
 

achmetinternet

Explorer
Joined
Jun 13, 2018
Messages
50
Thanks for all the help! I could install some installations but sometimes I change the IP addresses in my network and then I need to setup the integrations again. Hence I wanted to run a VM with the supervised version to see what I like better. What would you recommend in terms of CPU, Cores etc.?

And this command from this post
Extract the ova file using tar:
Code:
tar -xvf haos_ova-6.6.ova
doesn't work because I am told
tar: home-assistant.vmdk: Cannot change mode to rw-r--r--: Operation not permitted
Any suggestions?
EDIT: it threw me the errors but apparently still extracted the files.
 
Last edited:

Justin956

Cadet
Joined
Jun 1, 2020
Messages
1
I followed the directions on post #18 and Home Assistant is running very well. My only problem is Qemu Guest Agent fails to start. Has anyone else ran into this issue and know how to resolve?
 

bonestaak

Explorer
Joined
Aug 16, 2020
Messages
72
@Norumen
Here is what I used.

Make sure to use a location on your data pool as a working directory, don't use any system directory.

Use wget to get the ova file:
Code:
wget https://github.com/home-assistant/operating-system/releases/download/6.6/haos_ova-6.6.ova

Extract the ova file using tar:
Code:
tar -xvf haos_ova-6.6.ova

Convert the vmdk to a raw image file, I had to use the full working directory for the source:
Code:
qemu-img convert -f vmdk -O raw /must include full working path/home-assistant.vmdk hassos.img

Create a Zvol using the TrueNas Scale GUI - Be sure to make it large enough for dd to complete, I used 35 Gib.

Use dd to write the image file to your zvol
Code:
dd if=hassos.img of=/dev/pool/yourzvolhere

Create a virtual machine using the gui and attach the zvol you just created as the hdd

Enjoy Hassos. Hope this helps.
Code:
wget https://github.com/home-assistant/operating-system/releases/download/6.6/haos_ova-6.6.ova
Where in Truenas scale dit you put this code? somewhere in a shell?
 

bonestaak

Explorer
Joined
Aug 16, 2020
Messages
72
I installed the app from the Truecharts catalogue but somehow it doesn't detect all my devices, i.e. no integration suggestions show up and when I add e.g. one for my FritzBox router, it shows no devices there either, so something doesn't work right.
And it is still core not supervised
 

speedtriple

Explorer
Joined
May 8, 2020
Messages
75
@Norumen
Here is what I used.

Make sure to use a location on your data pool as a working directory, don't use any system directory.

Use wget to get the ova file:
Code:
wget https://github.com/home-assistant/operating-system/releases/download/6.6/haos_ova-6.6.ova

Extract the ova file using tar:
Code:
tar -xvf haos_ova-6.6.ova

Convert the vmdk to a raw image file, I had to use the full working directory for the source:
Code:
qemu-img convert -f vmdk -O raw /must include full working path/home-assistant.vmdk hassos.img

Create a Zvol using the TrueNas Scale GUI - Be sure to make it large enough for dd to complete, I used 35 Gib.

Use dd to write the image file to your zvol
Code:
dd if=hassos.img of=/dev/pool/yourzvolhere

Create a virtual machine using the gui and attach the zvol you just created as the hdd

Enjoy Hassos. Hope this helps.
Currently running TrueNAS SCALE and Home Assistant as separate VM's on ESXi.

Hope to setup TrueNAS SCALE bare metal and use it as VM-server instead, with only Home Assistant as a VM on SCALE.

Will this described procedure result in an identical Home Assistant instance as with HA on ESXi?
 

Mixel

Explorer
Joined
Jan 11, 2014
Messages
50
I installed the app from the Truecharts catalogue but somehow it doesn't detect all my devices, i.e. no integration suggestions show up and when I add e.g. one for my FritzBox router, it shows no devices there either, so something doesn't work right.
I solved that by adding a bridge from apps adapter to local adapter.
 

Frank Collins

Explorer
Joined
Apr 10, 2019
Messages
53
@Norumen
Here is what I used.

Make sure to use a location on your data pool as a working directory, don't use any system directory.

Use wget to get the ova file:
Code:
wget https://github.com/home-assistant/operating-system/releases/download/6.6/haos_ova-6.6.ova

Extract the ova file using tar:
Code:
tar -xvf haos_ova-6.6.ova

Convert the vmdk to a raw image file, I had to use the full working directory for the source:
Code:
qemu-img convert -f vmdk -O raw /must include full working path/home-assistant.vmdk hassos.img

Create a Zvol using the TrueNas Scale GUI - Be sure to make it large enough for dd to complete, I used 35 Gib.

Use dd to write the image file to your zvol
Code:
dd if=hassos.img of=/dev/pool/yourzvolhere

Create a virtual machine using the gui and attach the zvol you just created as the hdd

Enjoy Hassos. Hope this helps.
Thank you very much for posting this. I have HAOS running on Scale with its own DHCP address. It is very easy to install and I am amazed it could be so easy.

I used this web page guide to install HACS (https://www.wundertech.net/how-to-install-hacs-on-home-assistant/) and it works too. Having a full HAOS is great now that HA Core on TrueNAS Core is now, effectively, defunct. On that note, however, I thank @tprelog for his fantastic contribution and allowing so many people to use HA so easily.

There is a problem, also however, with the downloads, integrations and frontend, from HACS being available for installation both in Settings and as cards or themes. Some appear in the Add Integration menu but some do not. No cards or themes are visible in the list of available cards when I try to add a custom card. Is this a known problem, and, more importantly, is there a fix, please?
 

tprelog

Patron
Joined
Mar 2, 2016
Messages
297
I've switched over to HAOS now as well. I also made an updated guide using SCALE 22.12.0

 

achmetinternet

Explorer
Joined
Jun 13, 2018
Messages
50
I've switched over to HAOS now as well. I also made an updated guide using SCALE 22.12.0

Hi @tprelog

Thanks for the clear instructions. The install works well and it recognizes devices etc. but the add-on store remains empty and when I click on repositories it tells me there are none available. When I try to add the regular one, I am told it already exists. I can ping google and don't know what's wrong...
 
Joined
Mar 22, 2020
Messages
61
Hi, managed to install haos in a vm running on truenas scale according to this instructions and it works great. Even managed to install a skyconnect usb and passthrough it to the vm and homeassistant. My problem now is trying to get the coral usb stick to work. I cant figure out how to get truenas scale to recognize it so that i can then passthrough it. Anyone who has an idea?
 
Top