TrueNAS CORE is a free and open-source network-attached storage (NAS) software based on FreeBSD and the OpenZFS file system. It is licensed under the terms of the BSD License, runs on virtually any x86_64 system and provide a broad set of features for many users. TrueNAS Plugins can expand your system’s capabilities by adding 3rd party software quickly and easily.
At this time I am no longer using TrueNAS CORE or any iocage jails. As a consequence I may not be aware of, and proactively fixing any issues that could arise. If you’re having trouble with the installation of this plugin you can still open an issue and I will do my best to help. While no further development is currently planned, I will remain open to any suggestions for improvement, try to fix any issues when they are reported, and continue trying to support this plugin for as long as it remains feasible.
This plugin provides a scripted installation of Home Assistant Core. This is considered an advanced installation method and using this plugin will not be an exception. This plugin does not provide a fully managed system like Home Assistant OS. There is no Supervisor hence addons are not available. Manual intervention and use of the command line will be required!
Home Assistant only supports Linux, OSX and Windows using WSL. FreeBSD is not supported. Some integrations may not work as expected!
This plugin will create an iocage jail for Home Assistant Core
- Home Assistant Core will be installed using a Python Virtualenv
- Updates for Home Assistant are performed using the jail’s console
- Also includes options to create separate Python Virtualenvs for the following
- AppDaemon – includes HADashboard
-
Hass Configurator –
File Editor
- A separate directory for each virtualenv ( service ) will be created under
/usr/local/share
- The plugin’s provided services run as non-root user
homeassistant
with a UID of8123
- Separate configuration directories for each service are located in
/home/homeassistant
This plugin provides these basic configuration files to help get started
A simple console menu is provided to help with basic tasks
Quick Start for Home Assistant Core on TrueNAS CORE
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.
Initial Startup
Initial startup may take an additional 5-10 minutes before the Home Assistant UI reachable. It takes my TrueNAS 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
Click Here
You can install HACS, or the optional services using the jail’s console menu. I tried to make this work easily from the browser. In TrueNAS, 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.
From the main 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 homeassistant/custom_components/hacs
.
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 homeassistant/packages/freenas_plugin.yaml
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!
Have Fun!
Using the Z-Wave JS integration
Click Here
You have likely heard about the new Z-Wave JS integration. It is now the recommended Z-Wave integration for Home Assistant. This integration requires the Z-Wave JS Server.
Z-Wave JS Server provides the connection between your Z-Wave USB stick and Home Assistant. This server runs separately from Home Assistant so your Z-Wave mesh will keep running if you restart or stop Home Assistant. The Home Assistant Z-Wave JS integration connects to this server via a web-socket connection. You need to run this Z-Wave server before you can use the integration.
Z-Wave JS to MQTT - TrueNAS CORE Community Plugin
- Z-Wave JS to MQTT includes Z-Wave JS Server
- USB Z-Wave Device are passed through automagically
- Includes a simple console menu to help with basic tasks
Config Directory
The default location for this plugin is /usr/local/etc/zwavejs2mqtt
- After installing the plugin, this directory will be empty! If you plan to use an external dataset (strongly encouraged) I suggest you add your mount point before configuring your Z-Wave device for the first time. By adding your mount point first, files will be stored externally from the start, avoiding the need to copy any pre-existing configuration from inside the jail!
Related Home Assistant guides by @petro
Be sure to give these posts a like, if you find them helpful
Please visit the wiki for more information
- Wiki Home
- No More HASS - V5 Breaking Changes
- Attention FreeNAS Users
- Move Configuration to an External dataset
- Access Configuration using a SMB Share
This plugin and example configuration is only a quick start to get things up and running.
If you want to run Hass.io on your NAS check out this post by @Petrica
Thanks for stopping by!