Home Assistant Core -- TrueNAS CORE Community Plugin

Hey Troy, been following your work for a while, thanks for the hard work.

Working on Moving configuration to an external dataset, a note and a question.

Create the group

I already had a Group “hass” with the GID of 8123, The add user wizard recommended against it, but I checked the “Allow Duplicate GID”.
Not sure when I added it, original install was back in FN-11.2 and was just a Jail, then HAC in 12.1. I guess at some point I set up an external dataset, but did not use it when going to HAC. (oops).

Add the user

Going off the instructions and screenshot, the SUBMIT stays greyed out until you enter a password. Can we assume the password can be anything since its using “nologin” in the shell?

1 Like

That should be fine for now. I’m working on a page to cover the switch from hass to homeassistant. There’s really a few ways to set this all up but I’m only going to cover one simple approach. But basically homeassistant is replacing hass.

Good catch! Just go back and Disable Password to YES. I’ll update the picture ASAP. I updated the picture! Thanks for pointing that out @Arb1es

The password will only need to be set if certain cases when connecting using the SMB share. I will cover if and when the password should be enabled on the SMB page of the wiki

EDIT to add. I don’t want to make it confusing so I’m going to suggested switching from hass to homeassistant for everyone still using those settings. Technically if understanding the relation of the permissions, the part that really matters is that UID and GID match. The name on TrueNAS doesn’t really matter so much but it be easy to get confused when they don’t match also

When attempting an update, the message said it wouldn’t and required manual intervention. Using this as an “excuse”, I deleted the jail, installed V5 of HA plug-in and went through the process of creating an external dataset detailed in the wiki and, voila, an up-to-date instance of HA with the external dataset I created two days ago. Worked perfectly.

1 Like

It should fail if you originally installed this plugin before August 2020 and did not run a Plugin -> UPDATE since. That message means the previous hass setting had not been explicitly set (version 5 is no longer setting those)

Perfect, that’s be the idea!

I’m happy to say plugin version 5 is now installing!

First, let me briefly say (again) what this plugin is and what a plugin update actually means

This plugin provides a scripted installation method to install Home Assistant Core. This is considered an advanced installation method and using this plugin is not an exception. Home Assistant Core is Python application that runs inside the jail, using a Python Virtualenv created during the installation. Updates for this plugin refer to the installation script and files provided in the overlay. Updates to this plugin are not related to updates for Home Assistant Core. Updates for Home Assistant are preformed using the jail’s console. A simple console menu has been provided to help simplify this task. The console menu is provided in the overlay and is an example of something that could be updated in a plugin update.

:warning: This plugin does not provide a fully managed system like Home Assistant OS. There is no Supervisor and addons are not available here.

There will be occasions that require manual intervention!

:information_source: A simple console menu is provided to help with basic tasks

Plugin Version 5 only on TrueNAS Core

  • Focused, Refactored and KISS
  • Support on FreeNAS has depreciated
  • Now with version numbers :smile:
  • Updated wiki with new pages added (still more to come)

Please visit the wiki for more information

1 Like

So, with the configuration on a separate dataset, not only is it safely separated from the jail but we can now take snapshots as well!

I know snapshots are nothing new for zfs and the functionality is built right into TrueNAS UI already so I’m not sure if worth anything but I thought I’d ask…

Is anybody interested in triggering snapshots from Home Assistant?

I don’t even know how many different ways you can do this already with Home Assistant but I made a simple rest_command and modified this blueprint to configure automations that can trigger it.

It seems like a lot but using a simple script to activate the automation, I can now say “Hey Google, activate snapshot config” and TrueNAS will create a zfs snapshot of my configuration dataset.

1 Like

I’m interested. Having a separate dataset is fantastic, but to have a backup too keeps the critical part more secure.

Well, I was hoping somebody would be interested…

So blueprints will be in the next release…

I’m not applying this in the typical manner so the import function doesn’t work. But of course we can add the file manually.

There’s a few parts to this, I’ve started a wiki page with the first example using a blueprint.

Here’s what the blueprint looks like

I think, I still want to make some changes to the snapshot name that is generated by the automation. Currently, it is not bad, something like


But with an additional version sensor we can include the current Home Assistant version that was installed at the time of snapshot. That would look something like


The main part is only the rest_command. Using the blueprint only one approach to creating automations that use the rest_command. I’ll probably add some more traditional examples to use the rest_command as well

I installed the plug in for HA on my TrueNAS but it crash when middle of installation. Any idea what’s wrong? I have 2 network cards. I chose DHCP during installation.

Hmm, too little information. What is your NAS set up and why two NICs?
TrueNAS requires minimum hardware and jails demand more.

Whenever I restart my truenas, the configuration of the mqtt plugin disappears.
I have to uninstall, and reinstall. I’ve tried to follow this procedure and I can’t. My user / pass is casa / casa
How do I do it, so that the user / pass settings are memorized?

Hello Troy, I wonder if you can help again. Since upgrading to TrueNAS 12, I can’t access my USB Z-wave controller. If I list cua* devices, I see cuau0 and cuau1 but no cuaU0 as I did before. I have tried creating a fresh jail using plugin v5 (to check if it was a problem with my upgraded jail) but still no sign of the Z-wave radio device. I have done a dmesg on the host OS and it confirms it is seeing the stick at ugen 0.6. I have tried changing the HA configuration to point to cuau0 but that fails as well. Any ideas?

:thinking: Are you talking about the actual Mosquitto plugin (running in a separate jail)?

  • This case, I’m not sure off hand. I’ll see if I can reproduce the issue for further investigation

Or do you mean your configuration in Home Assistant, for the MQTT integration.

  • This case, my first guess would be a permission error that is preventing Home Assistant from saving the configuration to necessary files

So there are lower case now? That is odd. How does it look inside the jail

iocage console $JAIL
# Press 0 to exit the menu
ls -al /dev
Here's my HUSBZB-1

[email protected]:~ # ls -al /dev
total 10
dr-xr-xr-x  14 root  wheel       512 Dec 15 13:01 .
drwxr-xr-x  19 root  wheel        23 Dec  8 23:37 ..
crw-------   1 root  wheel      0x17 Dec 15 13:01 bpf
lrwxr-xr-x   1 root  wheel         3 Dec 15 13:01 bpf0 -> bpf
crw-rw-rw-   1 root  wheel      0x53 Dec  9 23:13 crypto
crw-rw----   1 uucp  dialer    0x1aa Dec 15 13:01 cuaU0
crw-rw----   1 uucp  dialer    0x1ab Dec 15 13:01 cuaU0.init
crw-rw----   1 uucp  dialer    0x1ac Dec 15 13:01 cuaU0.lock
crw-rw----   1 uucp  dialer    0x1b0 Dec 16 12:05 cuaU1
crw-rw----   1 uucp  dialer    0x1b1 Dec 15 13:01 cuaU1.init
crw-rw----   1 uucp  dialer    0x1b2 Dec 15 13:01 cuaU1.lock
dr-xr-xr-x   2 root  wheel       512 Dec  9 23:13 fd
crw-rw-rw-   1 root  wheel      0x31 Dec 16 12:00 null
crw-rw-rw-   1 root  wheel       0xf Dec  9 23:13 ptmx
dr-xr-xr-x   2 root  wheel       512 Dec 15 13:01 pts
crw-r--r--   1 root  wheel       0x7 Dec  9 23:14 random
lrwxr-xr-x   1 root  wheel         4 Dec 15 13:01 stderr -> fd/2
lrwxr-xr-x   1 root  wheel         4 Dec 15 13:01 stdin -> fd/0
lrwxr-xr-x   1 root  wheel         4 Dec 15 13:01 stdout -> fd/1
lrwxr-xr-x   1 root  wheel         6 Dec 15 13:01 urandom -> random
crw-rw-rw-   1 root  wheel      0x32 Dec  9 23:13 zero
crw-rw-rw-   1 root  operator   0x51 Dec  9 23:13 zfs

Did you previously create the custom_devfs ruleset for pass through? We don’t need that anymore with the TrueNAS plugin. Please try

iocage set devfs_ruleset=4 $jail
iocage restart $jail

I also notice I can lock-up my HUSBZB-1 from time to time. Though, this really only happens if I restart Home Assistant multiple time in row, without waiting several minutes in between. When this happens, I must 1) Stop the jail. 2) Unplug, then re-plugin again the HUSBZB-1 from the USB port. 3) Start the Jail

yea. is the truenas plugin, working separately

I’ll look into that for you… I apologize in advance, it may be a short time before I can get to it though

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

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