[OUTDATED] FreeNAS Plugin: Demo includes Home Assistant + AppDaemon + Configurator

OK, i will destroy it, i dont have anything but my wink connected to it so nothing special, Once i delete it i will reboot and see if these happens again and will let you know
THank you

@fvargasfrank
If you do choose to reinstall I think this would be better. It will install the same thing but it will be installed a s a jail… not a plugin. As I mention in the OP I don’t fully understand that difference but what I do understand is that a jail is a standalone unit running its applications.


Create a jail using a pkg-list to install requirements

echo '{"pkgs":["bash","ca_root_nss","git","gmake","python36","py36-sqlite3","screen","wget"]}' > /tmp/pkg.json
sudo iocage create -r 11.1-RELEASE boot=on dhcp=on bpf=yes vnet=on -p /tmp/pkg.json -n homeassistant

Note the end of the second command -n homeassistant this is the jail name. You can change it if you want.
For example -n hass-3io


Git script and install

sudo iocage exec homeassistant git clone https://github.com/tprelog/iocage-homeassistant.git /root/.iocage-homeassistant
sudo iocage exec homeassistant bash /root/.iocage-homeassistant/homeassistant-install.sh

Ok i will try it these way now,
Thank you by the way for all the help

This is brilliant, and worked like a charm! Now just need to migrate some of my configuration from a docker install I have running, although will do that manually and try and understand it a little better this time :wink:

This has been working perfectly for the last 22 days, but for some reason today I can’t access the Configurator section. I did update to FreeNAS 11.1-U6 a couple of days ago, so not sure if that’s related. Everything else seems to be working fine. Any ideas where to start looking? Thanks

@adrianwi Hopefully I can help you get this sorted.

First lets check the Configurator is running by connecting to your FreeNAS console (CLI). Typically I use ssh but you can also use the console in the FreeNas web GUI. From there you should connect to the JAIL (Hass-io3) console using:

sudo iocage console hass-3io

Now we can check if the configurator is running with (sudo not needed since you’ll already be login as root)

service configurator status

If the Configurator is running can you access it directly in your web browser (without using the HA GUI)? The Configurator will have the same IP address as HA but is on port 3218 .

If the Configurator is not running can you start manually? What is any output do you get when trying to start manually?

service configurator start

Also what version of Home Assistant is running in your jail? have you updated it at all?
I’m using HA 0.76.2 but I jumped to the FreeNas 11.2 train. I think there might be some needed changes to the HA configuration if your using Home Assistant > 0.77.0 due to the new authentication system.

Not quite sure how I resolved this, but it suddenly came back to life yesterday when I was trying to get it working! Thanks again for the script, which works a treat, and for the heads up on the authentication changes.

How do you go about updating the jail and HA? I seem to remember seeing an update message in the HA WUI, but I’m still on 0.76.2 and haven’t seen anything to update to 0.77.0.

@adrianwi
Sorry for the delay. I’m glad that’s working again. Thank you for trying this FreeNAS plugin! Im glad you find it helpful.

So first I notice also that the update badge in HA seems to come and go. Meaning it may be showing in the GUI but if I restart HA it goes away and it may or may not return. I usually just try to update right after I listen to the Pod Cast

Let’s start with the jail itself.


These commands are run from FreeNAS Consol:

update the Jail for example from 11.1-RELEASE-p10 to 11.1-RELEASE-p14

sudo iocage update hass-3io

upgrade the Jail for example from 11.1-RELEASE-p10 to 11.2-RELEASE-p3

sudo iocage upgrade -r 11.2-RELEASE hass-3io

I have not tried the upgrade command though. – iocage docs



Moving inside the jail

sudo iocage console hass-3io

These command are run from jail console:

To upgrade the packages inside the jail I use:

pkg update && pkg upgrade

Upgrade homeassistant:
service homeassistant stop
su hass
source /srv/homeassistant/bin/activate
pip3 install --upgrade homeassistant
exit
service homeassistant start

Upgrade appdaemon:
service appdaemon stop
su hass
source /srv/appdaemon/bin/activate
pip3 install --upgrade appdaemon
exit
service appdaemon start

Upgrade configurator:
service configurator stop
wget https://raw.githubusercontent.com/danielperna84/hass-configurator/master/configurator.py -O /srv/configurator/configurator.py
chmod +x /srv/configurator/configurator.py
service configurator start

So I tried the upgrade and it worked

homeassistant successfully upgraded from 11.1-RELEASE-p10 to 11.2-RELEASE-p3!

Just a note to clarify I am not using the hass-3io “plugin jail” which is installed following the OP. Instead I have installed Home Assistant into a “standard jail” using these steps I shared with @fvargasfrank above. Also my HA jail is named homeassistant and not hass-3io


While the upgrade command should have the same outcome for a “plugin jail” and a “standard jail” I just want to clarify that I tested on a “standard jail”. In either case it’s probably a good idea to make backup (snapshot) in case things go south. In this example HA_0.76.2-09-16-2018 is the name of the snapshot and homeassistant is the name of the jail. These names should be adjusted to match your needs.

sudo iocage snapshot -n HA_0.76.2-09-16-2018 homeassistant
sudo iocage upgrade -r 11.2-RELEASE homeassistant

a short while later I see…
homeassistant successfully upgraded from 11.1-RELEASE-p10 to 11.2-RELEASE-p3!

Thanks for the update guidance!

I’ve pointed a few people from FreeNAS forums to this thread, but it would be great to have this over there too? I don’t want to steal your thunder, so would be great if you could post something at forums.freenas.org? Even if it’s just a thread linking to this one, it would be a good start?