I personally prefer the iocage - virtualenv install on FreeNAS but I still think this is a great post. I gave it try and everything worked great. This was super easy to have Hassio running on FreeNAS!
I think there are a good handful (or more) of people who followed my manual install guide to run HA on FreeNAS because it seemed the only option. You should consider to change the category from “Share your Projects” to “Installation”. I suspect more people will be interested in this. Thanks to @Koen for sharing the original link. (Unfortunate it’s buried in the thread and easy to miss so I will also add a link to the OP of my install guide)
Great post Patricia, this was so easy to setup and feels easy to keep updated as well. As you write the only downside is a zigbee/zwave USB interface, such as HUSBZB-1, is very hard, to pass through to the VM in the current Freenas (11.2).
However if you like me have an raspberry pi lying around, you could possibly re purpose that as a USB-server or a USB/IP interface. So Raspberry Pi with HUSBZB-1 somewhere else in the house connected to the same network as the VM and then the “USB-over-IP” connection.
I haven’t tried it yet but I’m about to.
Instructions here: https://derushadigital.com/other%20projects/2019/02/19/RPi-USBIP-ZWave.html
I’m using a NUC for the main HA instance (on Ubuntu Server, virtualenv) to which I have connected all the gateway peripherals (Zigbee, Z-wave and RFLink) and a separate install on FreeNAS VM for Hassio (only Hassio instance is exposed to web and to Google Assistant so I don’t share all my devices with Dark Empire; the two instances have some common MQTT topics for devices I wanted to control from GA).
Until recently I had Hassio running on Rpi v3 but SD card corruption is annoying and this second instance of HA was offline just as I needed it the most (not a big issue tough as the automations are only on the main install). After moving it to FreeNAS there haven’t been any issue.
Also, with so many nice addons for Hassio I didn’t need to run another Docker install.
Nice guide for FreeNAS! However you are still using docker with this install. The only difference is that it is included in the image of HassOS and is running within your VM. There is no “docker-less” installation of Hassio.
No; it is an IO issue in regard of USB: different from the more established VMWare or VirtualBox, Bhyve cannot pass (at least not natively supported and free) USB devices so for the case of using RF gateways this is a shortcoming. However, there are some easy alternatives:
install HA as a FreeNAS plugin (although it wasn’t difficult to setup before, this is now available in FreeNAS 11.3 RC) and then pass USB devices to this instance;
use a secondary device (for example Rpi) as an RF to MQTT hub (ie with Hassio addons for Zigbee2MQTT, Z-Wave to MQTT) that would connect to the main HA installation; this requires a second device to use but would be relatively cheap. Although the entire Hassio can run fine (depending on the number and complexity of the smart home components) on the Rpi, at least for the ones before Rpi v4 there would be the issues with the tear & wear of MicroSD cards; with only these two addons communicating over MQTT is more likely that the MicroSD card failure won’t be a problem.
My install is as following:
Main HA on Ubuntu Server on a NUC (Celeron J4005) running MQTT broker; has Zigbee, Z-wave and 433 Mhz gateways attached to it; not exposed to the internet; vs. a Rpi 3 (haven’t tried with 4) this works way faster (although there haven’t been too many problems with the Rpi, some automations would linger for several seconds which was quite annoying for the lights).
Hassio on FreeNAS as a VM, communicating with main instance over MQTT; exposed to internet with Nginx Hassio addon, also connected to Google Assistant; I use this second HA for two main reasons: i) don’t want to expose to internet or to Google Assistant all my devices; ii) use the nice Hassio addons (obviously could have used a regular Docker installation for the programs I like, but would have required additional maintenance and the Hassio addons are very clean and easy to use).
I’m unsure if the Xiaomi Gateway would be available in this setup but, alongside security and privacy issues of running a cloud component there are some problems with the Gateway loosing connection (I’ve had a fair share of such problems myself):
I would totally recommend switching to a local controlled Zigbee hub (either ConBee, ZHA or Zigbee2MQTT). I use a lot of Xiaomi Zigbee devices connected to Zigbee2MQTT and they work much better than the Xiaomi Gateway.
Sadly this install method didn’t work for me on FreeNas 11.3. I started with a downloaded vdk image file and followed all of the steps. Ultimately, the FreeNas VM starts but doesn’t boot. It gets stuck on the “EFI Interactive Shell V2.1”. With no boot to file options present in this BHYVE Shell I can see no way that I can fix the boot options. Has anyone experienced and managed to overcome this issue?
I got it loaded up and started, but now I’m having network issues. I don’t think this would be related to the image I used, but who knows.
If it matters- I have no internet connection in the VM. I’m getting a DHCP reservation on my router, but not getting that same address to show on the vm. I’ve tried both the VirtIO and Intel e82545 options in the FreeNAS VM options.
So, I restarted FreeNAS and I can now access the web interface.
For what it’s worth- I double checked on the command line, and the HA command “core info” is still giving me a weird IP address… Completely different that what I see on my router, or what I’m accessing by the web interface. I use a 10.x.x.x for my home network, and the vm says it’s a 172.x.x.x address. I’m guessing this is some kind of docker translation shenanigans.
Yes, all the Docker addons inside that VM are using 172.x.x.x addresses. The “external” (not really external because is still inside your lan) ip of the VM will be in the 10.x.x.x subnet and you use that one for access.
If you want to do mac binding you can see the mac of the VM in Devices menu of the VM in FN (mac shown in the ssh addon of not-hassio-anymore is not the one that gets the ip from the router).