Home Assistant Core is available as a Community Plugin on FreeNAS 11.3 / TrueNAS Core 12.x
FreeNAS and TrueNAS Core are free and open-source network-attached storage (NAS) software based on FreeBSD and the OpenZFS file system. They are licensed under the terms of the BSD License, run on virtually any x86_64 system and provides a broad set of features for many users. Community Plugins like Home Assistant Core allow the functionality of a system to be expanded.
Plugin Update: 07/20/2020 – New defaults beginning with ver_0.4.0
The default virtualenv location, user and config directories have changed. The new defaults will apply to clean installations only. An existing plugin will retain the previous settings. There is also an updated service script that aims to simplify standard tasks for all users while also allowing advanced users to easily reconfigure the service after the initial installation.
- This plugin will create an iocage jail for Home Assistant Core
- The included rc service will install and run Home Assistant Core using a python virtualenv
- Also includes options to create and install separate python virtualenvs for the following
- A separate directory for each ( service ) virtualenv will be created under
- The plugin’s provided services run as non-root user
homeassistantwith a uid of
- Separate configuration directories for each service are located in
This Community Plugin provides these basic configuration files to help get started
Quick Start for Home Assistant Core on FreeNAS 11.3 and TrueNAS Core 12
Installation - Community Plugin
Install Home Assistant Core from the Community Plugins page
At a minimum you only need to enter a name for this jail to enable the save button. I manage all of my device IP address from my router, so I leave DHCP checked and click save to begin the install.
Installation - Standard jail
Use the standard jail if you need to compile packages from the ports tree or if you need more advanced control over the FreeBSD system itself. With regards to Home Assistant Core and the other services running in virtualenvs, there should be no advantage to using a standard jail.
Initial startup may take an additional 5-10 minutes before the Home Assistant UI reachable. It takes my FreeNAS about 10 min from the time I press install until I am able to login for the first time. This amount of time will vary depending on your setup and hardware. After the initial startup is complete, you will able to reach Home Assistant Core from the Plugins page by pressing MANAGE.
The first time you connect to Home Assistant, you will need to complete the onboarding process. At the end of onboarding you will be given an opportunity to add any auto discovered integrations. If you plan to add the optional services for the Configurator and AppDaemon, or install HACS (Home Assistant Community Store), just skip this step for now. At this point, we are just interested in getting everything installed. Any of these extras are of course optional.
Installing optional services
You can install the optional services and HACS using the jails console or shell, its the same thing. Don’t worry, there are no commands to copy paste at this point. You can connect with ssh if you want but I tried to make this all work easily from the browser. Back in FreeNAS, your Home Assistant Core plugin will show up under both, Plugins and Jails, it is still a jail after all. Enter the console from the Jails page by pressing SHELL.
The FreeNAS plugin includes a simple console menu to help with some common functions inside the jail. From the main console menu, number 2 will be the Configurator. Use option 8 to install.
After the install has finished, use the given link to open the Configurator in a new browser tab. We’re gonna use it in the next steps to add the long lived access token(s) to the configuration file(s). Leave the Configurator open and head back over to the Home Assistant tab in your browser.
We’re gonna create two tokens at this point. One for the Configurator and one AppDaemon. Hopefully, this is where the included configuration starts to make things easy. You can create your your long lived access token from your profile page. Start by creating an access token for the Configurator and copy it to your clipboard.
Using the Configurator, add the token you just created to
configurator/config.json. Paste your access token to the second line where indicated. Be sure to save the file!
Next, if you plan to install AppDaemon, you should set that up now as well. The example configuration included with AppDaemon is set up to share the Home Assistant secrets file to store its access token and location information. Go back to your Home Assistant profile page and create another long live access token for AppDaemon. Use the Configurator to add the token to
homeassistant/secrets.yaml. While you there, you should also configure your correct location information as well. Make sure you save your changes!
We are done with the Configurator for now. You can close it’s browser tab and head back over to FreeNAS. From the Configurator service menu, select 3 to restart the configurator.
After the Configurator restarts, press 1 to return to the main menu, then press 3 to enter the AppDaemon service menu. Use option 8 to install
Saving the best for last! There’s one more step before you restart Home Assistant. Installing HACS. There’s no service menu since HACS is a custom integration. This is just a little shortcut to download the latest HACS release and extract it to
At the main console menu of the jail, type
install hacs and press enter.
Now head into the Home Assistant Core service menu and select 3 to restart Home Assistant. Notice here that option 8 is check_config. The service will also check_config automatically before restarting Home Assistant. The first time check_config used, you may see an additional package or two get installed. This is normal and only happens the first time.
After you restart Home Assistant you should have links for File Editor and AppDaemon added to the side panel. These are simply iframes that have been enabled in
Finally, head to the integrations and finish adding HACS.
At this point, it’s all yours!
Continue to add any auto discovered integrations and begin your Home Assistant journey!
Attention HomeKit Users
FreeNAS 11.3 - HomeKit requires openssl 1.1.0 or later as the HomeKit Accessory Protocol (HAP) uses the ChaCha20 stream cipher and the Poly1305 authenticator. Please beware that the 11.3-RELEASE base only contains openssl 1.0.2. A Home Assistant jail ( including this plugin ) can be manually updated to use openssl 1.1.1 in order to allow HomeKit to work again.
TrueNAS Core 12.x - This does not apply to FreeBSD 12 / TrueNAS Core. The 12.1-RELEASE base already contains openssl-1.1.1. HomeKit should work without intervention.
Using a USB Z-Wave or Zigbee Controller
To directly access USB devices like the Aeotec Gen-5 Z-Stick, Nortek HUSBZB-1 or similar USB controllers inside an iocage jail, you will need to use a custom devfs_ruleset. Before a jail can use the custom devfs_ruleset, it must first be created on the FreeNAS host.
The TrueNAS Core 12.x Community Plugin now creates the custom ruleset from the plugin manifest. No additional steps are required to access Z-Wave or Zigbee USB controllers!
Using the OpenZWave (beta) Integration
- Outline steps to use a RPI with Docker for ozwdaemon
- Create a separate iocage jail for ozwdaemon ( unofficial build )
Additional information might be found in the plugin project wiki
My FreeNAS Community plugins
Most of these are available on the community plugin page in FreeNAS
- Home Assistant Core
- Mosquitto (MQTT Broker)
This plugin and example configuration is only a quick start to get things up and running
Thanks for stopping by!