Home Assistant Core -- TrueNAS CORE Community Plugin

[root@freenas /mnt/zfs_data2/iocage]# iocage set plugin_repository https://github.com/ix-plugin-hub/iocage-plugin-index.git homeassistant

plugin_repository is is missing a value!

:man_facepalming: Sorry, forgot the =

iocage set plugin_repository=https://github.com/ix-plugin-hub/iocage-plugin-index.git homeassistant

That did it! Thanks.

1 Like

Interesting side note: After running iocage upgrade homeassistant, I had to update the jail via the UI as the upgrade process left the jail in a bad state, missing many key libraries and packages. Fortunately, the ā€œupdateā€ process via the UI is robust enough to address that issue and re-install much of what was missing. Weird stuff.

Thereā€™s been a few people that have had similar trouble immediately after the upgrade. Another user had informed me of these commands, which also seems to correct the problems.

pkg-static update -f
pkg-static upgrade -f

I never thought to try that. It makes sense when you say it though.

When you update the plugin via the UI, it is not just running a pkg upgrade.

Instead it works by first removing all FreeBSD packages that have been installed, then packages are reinstalled according to what is listed in the most recent plugin manifest.

Thanks for letting me know that works well.

Hi Troy. I just casually ran the HomeAssistant update from the shell menu and I got an OpenSSL runtime error and my instance is no longer working. Any ideas?
Error reads ā€œYou are running against OpenSSL 1.0.2 which is no longer supported by the OpenSSL projectā€ and tells me I need to upgrade it.

Hi @axg20202

I might suggest trying to upgrade openssl, however the 11.3-RELEASE has now past itā€™s EOL date. Iā€™m no longer able to support using this plugin with the expired release

Please read this post for more info, before attempting to upgrade openssl in your 11.3-RELEASE jail.

Great, thanks Troy. Somehow I skipped past that post! I might go for the TrueNas upgrade route. I assume people are updating their jails to 12.1 as part of this process?

1 Like

Yes, but itā€™s a two step process

  1. Upgrade to TrueNAS
  2. Upgrade your jails

The latter is not automatic, and must be preformed separately for each jail.

After the upgrade, this plugin will be using either 12.2-RC3 or 12.2-RELEASE.

1 Like

I just went through the process and it didnā€™t go well, sadly. TrueNas update fine, then upgraded jail (it set it to 12.1) and followed your wiki but now I canā€™t complete the HA reinstall process. Iā€™m getting the error /usr/local/etc/rc.d/homeassistant: ERROR: /usr/local/share/homeassistant/bin/hass is not found or is not executable.

What was strange is that when checking the rcvars list as per the wiki instructions, one of the locations was correct (python location) but the other was using the old location. So I proceeded to remove the old directories and set the new ones, but then hit a wall when trying to do the reinstall because of the above error.

Just use the install command instead of reinstall

service homeassistant install homeassistant

Thatā€™s what Iā€™m entering - throws the not found error.

Please try

rm -r /usr/local/share/homeassistant
service homeassistant install homeassistant

Thanks Troy, that sparked an install, but there were some errors about folder permissions during the process and also when I run a test from the shell menu, so it is still broken I think.

WARNING: The directory ā€˜/home/hass/.cache/pipā€™ or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you may want sudoā€™s -H flag.

You can just remove the cache directory. It will recreate and repopulate itself as needed.

rm -r /home/hass/.cache

Check your Home Assistant installation. That error should not affect the running of HA, it is more related to storing packages that are downloaded and built during the pip install.

Edit
Sorry, I should have just linked to the steps on the wiki page.

I forgot, I should have told you to remove the cache directory before reinstalling Home Assistant. Would have avoided those cash related errors. Sorry thatā€™s my fault

Thanks for your help as usual Troy, much appreciated. I canā€™t actually delete the cache folder using that command as itā€™s saying it doesnā€™t exist, which is odd. It would be good to get rid of that error somehow. However, it does look like my instance can run now, which is good! The only thing that isnā€™t working is ZWAVE. I reset the ruleset to 4 as per instructions but zwave isnt starting.

Iā€™m sure we can get Z-Wave fixed up for you.

Now that we have HA back running, can you try restarting the jail.

If itā€™s not that easy, thereā€™s a few more steps we can try however Iā€™m not home right now and kind of difficult to help troubleshoot from my phone.

Are you on discord by chance? Maybe I can reach you there to further help you when I get home

Troy, you are a legend to offer this help.
I usually reboot my whole server when I have zwave startup issues. Have tried that a few times - no dice. I imagine the issue is changing the lookup address of the USB stick somehow?

Hereā€™s a clue as to why it probably isnā€™t working, from my config yaml - that config path is probably wrong now maybe?:

zwave:
  network_key: !secret zwave_key
  usb_path: /dev/cuaU0
  config_path: /srv/homeassistant/lib/python3.7/site-packages/python_openzwave/ozw_config
1 Like

I must be onto something as there is definitely a new (empty) zwave config file in the new python 3.8 site-packages folder. Not sure how to get my old config file into there though, if it even still exists to copy.

Yep, I bet thatā€™s it!

Iā€™m not sure if you still even need this line these days. Maybe you can just comment it out.

If you think it need to be set, i think this should do the trick

  config_path: /usr/local/share/homeassistant/lib/python3.8/site-packages/python_openzwave/ozw_config

If itā€™s still giving you grief (with an updated config path) you can also try reinstalling the pyozw

service homeassistant install --force-reinstall --no-cache homeassistant-pyozw

I almost forgot, Also be sure the USB deice is showing up with the new ruleset

ls -al /dev