Home Assistant Core -- TrueNAS CORE Community Plugin

OK, I think I have an idea what might be going on. On FreeNAS 11.3 I was using a Z-Wave.Me stick with your custom_devfs ruleset method. On TrueNAS 12.0 the same stick was giving the problems described above. However I happened to have a Aeotec Z-Stick Gen5 in my ‘tech drawer’. In desperation I plugged in the Aeotec device and bingo, cuaU0 was back and I could start a Z-wave network in HA. The only difference I can think of between those two sticks is that the Aoetec is gen 5 and Z-Wave.me is not. Is it possible that there any difference in the support for pre gen 5 devices?

Anyway I’m going to rebuild the network based on the Aeotec :grinning:

Automated backups work brilliantly.

Thanks, Frank.

1 Like

Ok
Thank you

@troy have just tested this here. A quick recap of how it went.

  • Tried it on my existing plugin jail. => did not work. Probably because I created it on FreeNAS before upgrading to TrueNAS. It did have the correct filestructure using homeassistant instead of hass.
  • Created new plugin jail
  • follow only steps from: https://github.com/tprelog/iocage-homeassistant/wiki/external_dataset#adding-a-mount-point
  • install configurator from menu
  • install appdaemon from menu
  • make sure new plugin jail gets same IP as previous jail
  • restart homeassistant
  • Success!!

Great work again! Next thing to dive into is the blueprint with creating snapshots. First some sleep now :slight_smile:

1 Like

I need to ask again…

Who is ready for TrueNAS SCALE?

Who will consider moving to TrueNAS SCALE when it’s released?

I realize there will be people who wish to remain on TrueNAS CORE. Heck some people don’t even want to upgrade to TrueNAS at all. I don’t understand why anyone wants to keep using an outdated FreeNAS 11.3 release :man_shrugging: – I guess people have their reasons, I just don’t understand them. (I’m talking about home users here, not in large scale or professional deployments)

I’ve been spending some time with SCALE and I really like it so far. And more I use it, the more I like it.

Unless ix-systems completely drops the ball or does something really stupid, it very likely I’m going to switch to over to SCALE sooner, rather than later.

I think, for home users like myself, who are looking to run extra apps (SCALE) or plugins (CORE) there is no comparison. I think the availability of SCALE apps is going to be the “nail in the coffin” for plugins on CORE.


Want a sneak peak at some potential SCALE apps? I suggest you have a look for yourself :smile:

There is also a discussion on GitHub about the future of this plugin on CORE

Hi I followed your excellent guide and got home assistant almost set up how I want. Unfortunately I have been trying to add the stream integration into the config file as instructed but when I do I get the following error. I read on another forum that I might have to manually install PyAV but im not sure how to do that in a Truenas iocage (jail).

Unable to install package av==8.0.2: ERROR: Command errored out with exit status 1: command: /usr/local/share/homeassistant/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-c29i97ay/av/setup.py'"'"'; __file__='"'"'/tmp/pip-install-c29i97ay/av/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-9jhkt8jh cwd: /tmp/pip-install-c29i97ay/av/ Complete output (29 lines): running bdist_wheel running build running build_py creating build creating build/lib.freebsd-12.2-RELEASE-p2-amd64-3.8 creating build/lib.freebsd-12.2-RELEASE-p2-amd64-3.8/av copying av/deprecation.py -> build/lib.freebsd-12.2-RELEASE-p2-amd64-3.8/av copying av/__main__.py -> build/lib.freebsd-12.2-RELEASE-p2-amd64-3.8/av copying av/datasets.py -> build/lib.freebsd-12.2-RELEASE-p2-amd64-3.8/av copying av/__init__.py -> build/lib.freebsd-12.2-RELEASE-p2-amd64-3.8/av creating build/lib.freebsd-12.2-RELEASE-p2-amd64-3.8/av/container copying av/container/__init__.py -> build/lib.freebsd-12.2-RELEASE-p2-amd64-3.8/av/container creating build/lib.freebsd-12.2-RELEASE-p2-amd64-3.8/av/data copying av/data/__init__.py -> build/lib.freebsd-12.2-RELEASE-p2-amd64-3.8/av/data creating build/lib.freebsd-12.2-RELEASE-p2-amd64-3.8/av/audio copying av/audio/__init__.py -> build/lib.freebsd-12.2-RELEASE-p2-amd64-3.8/av/audio creating build/lib.freebsd-12.2-RELEASE-p2-amd64-3.8/av/subtitles copying av/subtitles/__init__.py -> build/lib.freebsd-12.2-RELEASE-p2-amd64-3.8/av/subtitles creating build/lib.freebsd-12.2-RELEASE-p2-amd64-3.8/av/codec copying av/codec/__init__.py -> build/lib.freebsd-12.2-RELEASE-p2-amd64-3.8/av/codec creating build/lib.freebsd-12.2-RELEASE-p2-amd64-3.8/av/filter copying av/filter/__init__.py -> build/lib.freebsd-12.2-RELEASE-p2-amd64-3.8/av/filter creating build/lib.freebsd-12.2-RELEASE-p2-amd64-3.8/av/sidedata copying av/sidedata/__init__.py -> build/lib.freebsd-12.2-RELEASE-p2-amd64-3.8/av/sidedata creating build/lib.freebsd-12.2-RELEASE-p2-amd64-3.8/av/video copying av/video/__init__.py -> build/lib.freebsd-12.2-RELEASE-p2-amd64-3.8/av/video running build_ext running config pkg-config is required for building PyAV ---------------------------------------- ERROR: Failed building wheel for av ERROR: Command errored out with exit status 1: command: /usr/local/share/homeassistant/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-c29i97ay/av/setup.py'"'"'; __file__='"'"'/tmp/pip-install-c29i97ay/av/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-i7tjsn8m/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/share/homeassistant/include/site/python3.8/av cwd: /tmp/pip-install-c29i97ay/av/ Complete output (29 lines): running install running build running build_py creating build creating build/lib.freebsd-12.2-RELEASE-p2-amd64-3.8 creating build/lib.freebsd-12.2-RELEASE-p2-amd64-3.8/av copying av/deprecation.py -> build/lib.freebsd-12.2-RELEASE-p2-amd64-3.8/av copying av/__main__.py -> build/lib.freebsd-12.2-RELEASE-p2-amd64-3.8/av copying av/datasets.py -> build/lib.freebsd-12.2-RELEASE-p2-amd64-3.8/av copying av/__init__.py -> build/lib.freebsd-12.2-RELEASE-p2-amd64-3.8/av creating build/lib.freebsd-12.2-RELEASE-p2-amd64-3.8/av/container copying av/container/__init__.py -> build/lib.freebsd-12.2-RELEASE-p2-amd64-3.8/av/container creating build/lib.freebsd-12.2-RELEASE-p2-amd64-3.8/av/data copying av/data/__init__.py -> build/lib.freebsd-12.2-RELEASE-p2-amd64-3.8/av/data creating build/lib.freebsd-12.2-RELEASE-p2-amd64-3.8/av/audio copying av/audio/__init__.py -> build/lib.freebsd-12.2-RELEASE-p2-amd64-3.8/av/audio creating build/lib.freebsd-12.2-RELEASE-p2-amd64-3.8/av/subtitles copying av/subtitles/__init__.py -> build/lib.freebsd-12.2-RELEASE-p2-amd64-3.8/av/subtitles creating build/lib.freebsd-12.2-RELEASE-p2-amd64-3.8/av/codec copying av/codec/__init__.py -> build/lib.freebsd-12.2-RELEASE-p2-amd64-3.8/av/codec creating build/lib.freebsd-12.2-RELEASE-p2-amd64-3.8/av/filter copying av/filter/__init__.py -> build/lib.freebsd-12.2-RELEASE-p2-amd64-3.8/av/filter creating build/lib.freebsd-12.2-RELEASE-p2-amd64-3.8/av/sidedata copying av/sidedata/__init__.py -> build/lib.freebsd-12.2-RELEASE-p2-amd64-3.8/av/sidedata creating build/lib.freebsd-12.2-RELEASE-p2-amd64-3.8/av/video copying av/video/__init__.py -> build/lib.freebsd-12.2-RELEASE-p2-amd64-3.8/av/video running build_ext running config pkg-config is required for building PyAV ---------------------------------------- ERROR: Command errored out with exit status 1: /usr/local/share/homeassistant/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-c29i97ay/av/setup.py'"'"'; __file__='"'"'/tmp/pip-install-c29i97ay/av/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-i7tjsn8m/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/share/homeassistant/include/site/python3.8/av Check the logs for full command output. WARNING: You are using pip version 20.2.4; however, version 20.3.3 is available. You should consider upgrading via the '/usr/local/share/homeassistant/bin/python3.8 -m pip install --upgrade pip' command.

Hi @des777vg

Fortunately I was able to reproduce the same error, which gives me a better chance to trouble shoot. Case in point… I think this should get you fixed up

iocage console $_JAIL_NAME
# Press `0` to exit the menu
sysrc homeassistant_path="/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin"
service homeassistant check_config

(running the check_config will try to install PyAv again - doing it from the CLI will show more feedback)

If there are no errors, you should be good to go.

Finally restart Home Assistant

service homeassistant restart

EDIT: To add a little information about this error

Basically the problem was this

pkg-config is required for building PyAV

This is the tricky bit with FreeBSD, there is no pkg-config - instead there is pkgconf, which has already been installed but was not in the $PATH for the Home Assistant service, so it did not know it was there.

Hi Troy,
I have installed Scale on my second box and the interface looks cleaner. I’ve yet to set up a pool but will today some time, in the middle of the day in Oz.

Which install for HA should be used, please? I’ll also need to look for instances of LMS, ZoneMinder, DLNA, and a few others.

Scale will have the ability to run either Home-Assistant OS (the one with the add-on) or just the regular docker container.

You will still need a VM to run the OS version, however SCALE will support proper device pass through in VMs

At this point, SCALE it’s still pretty limited from the UI but you can get a basic instance of Home Assistant going by launching a Docker image.

image

You can also use docker-compose from the CLI.


I don’t expect to see the SCALE apps showing up in the UI until spring.

Basically, SCALE apps are Helm charts. You can install charts using helm directly from the CLI but support for this is questionable.

There will be a SCALE app available for Home-Assistant. I believe it is based on the K8s-at-home chart and will run the official Home-Assistant container..

Personally, I think running the container is the way to go. (Just FYI, the Helm chart (and SCALE app) are not supported by Home-Assistant developers, but they are using the official (docker) container, which is.)

I don’t want to sell this plugin short, a few of us have used it for several years, and most of the time it runs just fine. The biggest problem, is that FreeBSD is not supported by the Home Assistant developers, so the is no help when something does go wrong.

Hi Troy,
I tried to install HA on Scale but my skills don’t extend that far. I would like to test and see if Scale offers any advantages, but will have to wait until an app is available.

I assume you’re just a regular home user like myself. From my point of view, both SCALE and CORE work the same as far as providing the NAS device itself - (By NAS device I simply mean, having zfs storage and access using samba shares)

So for my own home use, the decision comes down to one thing. That is the to ability install other applications on the NAS – Sure, we have Home Assistant on CORE, but there is a lot more that we don’t have.

I think the advantage for SCALE is that it’s based on Debian Linux and supports running containers. (Docker containers for example) – In other words, there is a whole world of software that is already available, and it should be more easily accessible on SCALE. - I guess this is not so much about Home Assistant itself, but more about the other things we want to use with Home Assistant.

Yep. When you get technical, SCALE is a completely different animal. I’ve spent a few weeks so far, under the hood, trying to get my head wrapped around how this works. – I don’t think I’m going to be making SCALE apps anytime soon. (don’t worry though, Home Assistant app is being handled by someone who already knows this stuff)

Still, if you want to test some things I can help you get Home Assistant installed using the “Launch Docker Image” button. - You’ll likely want to know how that works anyways, since it will always be there to provide means to install containers that are not available as SCALE apps.

Yep, I’m a home user who wants the advantages of ZFS security. I can muddle through the installation process and probably get it working BUT where is there an installable image? I searched and found nothing.

For now, I’m just using the official docker image I’ve linked above. You don’t need to download anything, that’s all taken care of for you.

  1. Application Name: Must be all lower case and should not contain special charterers or spaces. Use any name with those limits

  2. Image Repository: homeassistant/home-assistant

  3. Image Tag: Stable

  1. HostNetwork Check box to enable

  1. Mount Home Assistant Configuration to /config

Everything else can be left to default values or remain blank.

Thanks Troy. Installed and waiting for it to come up.

Hi Troy,
It is hard to evaluate HA without editor and HACS. I’ve followed a couple of guides but no luck. I think I’ll wait until a Beta of Scale and HA might have an app.

If you would like to continue with this now, Im willing to help. Feel free to drop me a PM if you’d like.

Completely understandable. Just FYI though, having an HA app is not going to change or make it easier to install HACS. There is not going to be any kind of console menu for updating or installing other services like the File Editor.

It’s not that these things are going to become difficult, they are just done differently.


And a note about CORE for all TrueNAS users

The last plugin update (version 5) has been very much simplified, reducing the future maintenance burden. I’ve been considering, no matter what happens with SCALE, I’ll probably try to keep supporting the Home Assistant plugin on CORE for as long as I can.

Thank you so much for the quick reply that fixed my issue perfectly. I recently purchased the GoControl HUSBZB-1 and when I go into zigbee integration and select the port I get /dev/cuaU0 and /dev/cuaU1. If I am correct I no longer need to add the ruleset? If so how do I tell which one is the zigbee radio. Additionally when I select it ask for the radio type and I select HUSBZB-1 and it fails to connect (port speed set to 57600). Any help would be greatly appreciated.

That is correct, the plugin does not need a custom ruleset

Great choice. I have one of these myself.

/dev/cuaU0 is the Z-Wave radio
/dev/cuaU1 is the Zigbee radio

Use radio type ezsp for ZHA (I don’t recall needing to set a port speed)

What is the recommended method of creating a periodic backup job to backup home assistant configuration and scripts, to enable easy restore in case …?

Additionally, I am following the Lets-Encrypt guide and I have encountered some problems (post). Has anyone been able to complete this setup with the TrueNas home assistant jail?

I followed @troy ‘s guide and a nightly snapshot happens every night. An alert appears on my phone when done. Could not be easier.
Without Troy’ s fantastic contribution, I may not have fallen down the HA rabbit hole. :slight_smile:

1 Like