Skip to content

No More HASS

Troy Prelog edited this page Sep 19, 2021 · 12 revisions

What's changed

I dropped the old hass username and refactored the installation scripts. These changes were made back in July of 2020, in time for the release of TrueNAS CORE BETA. If you installed this plugin after that, you are likely using the new defaults already.

These changes will affect users who have initially installed this plugin on FreeNAS 11.x, before August 2020.

  • Username switched from hass to homeassistant
  • Prefix to Python Virtualenv changed to /user/local/share/

The easiest way to know for sure is to check in Home Assistant. On the ⚙️ Configuration -> Info page you can see the path to the configuration directory. If the path is /home/hass/homeassistant, then this page applies to you!

[add_img_here]

Change of User Name

CHANGED OLD VALUE NEW VALUE
$USER hass homeassistant
$HOME /home/hass /home/homeassistant

Changes to Configuration

CONFIGURATION
DIRECTORY
OLD VALUE NEW VALUE ADDITIONAL
NOTES
HOW TO
RESOLVE
Home Assistant
Core
$HOME/homeassistant $HOME/homeassistant Only the $HOME directory has changed as result of switching the $USER see below
Configurator
(File Editor)
$HOME/configurator $HOME/configurator The configuration file is
renamed to config.json
see below
Appdaemon /
HADashboard
$HOME/appdaemon/conf $HOME/appdaemon The configuration is no longer
in a nested directory
see below

Suggested steps to upgrade

You'll need a fresh install of the plugin to go along with these changes. Having your configuration on an external dataset will make it easier to restore, now and forever more!

Begin by following this guide to create the external dataset

  • When you get the step for copying the existing config, come back here to continue.

From the TrueNAS console, copy the contents of the jail's existing /home/hass/ directory to the new dataset.

  • This is likely the most tricky part

The full path to the existing hass directory will vary depending on your setup.

  • Replace $ZPOOL with the name of the zpool where iocage has been activated
  • Replace $JAIL with the name of your Home Assistant jail
  • Note, this is the only time on this page, paths should include a trailing forward slash (/) at the end
cp -a /mnt/$ZPOOL/iocage/jails/$JAIL/root/home/hass/ /mnt/path/to/dataset/

Next, create a SMB share for the external dataset

Now you can use the SMB share to correct the breaking changes while waiting for the plugin to reinstall. Nice!

If you have not already done so, I suggest moving your configuration to an external dataset and creating a smb share before you continue.


Home Assistant Core

This should not affect the function of Home Assistant Core directly. However, it is possible this change could affect certain integrations. For example if you are using a shell script, the path to the script may have changed.

To resolve this issue: You will need to change any paths referencing /home/hass to /home/homeassistant

The path to the Home Assistant configuration directory can be overridden using sysrc

  • This is not recommended and will not be supported
  • To manually restore the previous hass settings
sysrc homeassistant_config_dir="/home/hass/homeassistant"

Configurator (File Editor)

The configuration file for the configurator was renamed to config.json. The .json extension was added simply to provide syntax highlighting when viewing in a capable editor.

To resolve this issue: Rename configurator/configurator.conf to configurator/config.json

The path to the Configurator configuration file can be overridden using sysrc

  • This is not recommended and will not be supported
  • To manually restore the previous hass settings
sysrc configurator_config="/home/hass/configurator/configurator.conf"

AppDaemon / HaDashboard

The nested appdaemon/conf configuration directory for AppDaemon has been removed.

To resolve this issue: Simply move the contents out of appdaemon/conf to appdaemon. Paths to other directories such as appdaemon/dashboards and appdaemon/apps are set in the appdaemon.yaml configuration file. You will also need to go through this file and change any paths referencing /home/hass to /home/homeassistant.

The path to the AppDaemon configuration directory can be overridden using sysrc

  • This is not recommended and will not be supported
  • To manually restore the previous hass settings
sysrc appdaemon_config_dir="/home/hass/appdaemon/conf"

One last thing... If there is a .cache directory, you should always delete it before attaching your dataset to a new jail.

Hopefully that wasn't too bad.

Now, using a fresh install of this plugin, head back over the page for the external dataset and follow the final instructions for adding a mount point to your jail