Home Assistant Core - TrueNAS CORE Community Plugin
In an effort to make managing python easier, I'm going to have it removed completely from the plugin manifest. Moving forward python will be initially installed from post_install.sh
and reinstalled after Plugin UPDATES according to the version set in the rcvar. Hopefully this will allow users more freedom to upgrade Python (or not) at their own discretion.
Upgrading python for your existing plugin will require manual intervention. On average this will take at least 15-30 minutes to complete. However a few users have reported waiting over an hour for the Home Assistant web UI to become available again! The amount of time it takes will vary depending on the speed of your NAS and the number of integrations you have added to Home Assistant.
Remember to take a snapshot of your jail before attempting to upgrade python
iocage snapshot JAIL_NAME -n SNAPSHOT_NAME
Install the new python version then reinstall the Home Assistant service (virtualenv)
iocage console JAIL_NAME
# Press 0 to exit the menu
pkg install python310 py310-sqlite3
sysrc homeassistant_python=/usr/local/bin/python3.10
service homeassistant reinstall homeassistant
If something goes wrong you can revert to the snapshot you took before
iocage stop JAIL_NAME
iocage rollback JAIL_NAME -n SNAPSHOT_NAME
update-overlay
scriptThis script should finally provide an easy way to update the plugin overlay without running a Plugin UPDATE. It can be run from the jail's console. With no options, it will pull the overlay directory from the master
branch
# Press 0 to exit the menu
update-overlay
Or you can pull the overlay directory from the latest tagged release
# Press 0 to exit the menu
update-overlay release
Workaround an issue where Home Assistant fails to restart using GUI
The rc script runs Home Assistant using the FreeBSD daemon. This workaround simply adds the -R restart_delay_seconds
to the rc-flags for the daemon. The default delay is set for 1 second.
-R restart_delay_seconds
Supervise and restart the program after the specified delay if it
has been terminated.
The delay can be adjusted by setting the rcvar homeassistant_restart_delay
For example, the following would set a 3 second delay
sysrc homeassistant_restart_delay=3
fix for issue #52 - Home Assistant 2022.2 not starting
This will start using Python 3.9 for all services on clean installs
Running a Plugin UPDATE should ensure all the requirements are met for Python 3.9
The services for this jail are installed in a Python Virtualenv
When the Python version changes, the services should be reinstalled
iocage console $JAIL_NAME
# press 0 to exit menu
sysrc homeassistant_python=/usr/local/bin/python3.9
service homeassistant reinstall homeassistant
For appdaemon and configurator services, use number 8 to remove the virtualenv
When the service is removed, number 8 will change back to install
Temporary work around
Temporary work around
Part 1: Jail UPGRADE -- FreeBSD 12.2-RELEASE
packagesite
has also been switched from quarterly
to latest
Part 2: Plugin UPDATE -- Version 6 2021.03.07
You will need to allow extra time before the Home Assistant UI is reachable after the update is finished
Refresh INDEX for community plugins
Run Plugin UPDATE from the TrueNAS UI
You will need to allow extra time before the Home Assistant UI is reachable after the update is finished