Home Assistant Core -- TrueNAS CORE Community Plugin

There is one main reason for that: custom integrations. Sometimes you need a python package or software package for a custom component to work. I have also build my own service to integrate ventilation system over serial cable which is deployed in a separate venv with some specific python packages. This one I might consider moving to a dedicated jail.

Hi @troy, I didn’t find (huge thread) if your scripts cover a particular version of HA?

As I want to install a particular version of HA on a git branch on my side.

Thanks for your answer

Hi @rousseldenis - Sorry for this short answer, I have limited time today.

There is some basic functionality but it’s not much.

iocage console $JAIL_NAME
# press 0 to exit menu

## Example to install v 2021.09.3
service homeassistant install --upgrade homeassistant==2021.09.3

## Example to install beta version
service homeassistant install --pre --upgrade homeassistant

I’ve never tested this so results may vary. Here is an example that would install from the Home Assistant repo, using the dev branch. Hopefully you can just change the git repo and branch to match your needs.

iocage console $JAIL_NAME
# press 0 to exit menu
pkg install git-lite
service homeassistant install --upgrade git+https://github.com/home-assistant/core.git@dev

Ok, if I understood, --upgrade command will use pip standard functionnalities through git branches ?

I assume but I’m not 100% sure.

I included --upgrade because they show it here

Basically all my script does is to activate the virtual environment and passes arguments to pip install

service homeassistant install [SOMETHING]

The command translates to the following

su - $homeassistant_user
source $homeassistant_venv/bin/activate
pip install [SOMETHING]
deactivate ; exit

:warning: Support for Python version 3.8 is deprecated and will be removed in Home Assistant 2022.1.

I expect to have this plugin updated to python 3.9 before the next release - 2021.12

If you want to upgrade python now, you can do so manually using the following commands

 iocage console $JAIL_NAME
# press 0 to exit menu
pkg install -y python39 py39-sqlite3
sysrc homeassistant_python=/usr/local/bin/python3.9
service homeassistant reinstall homeassistant

Hi
I received a notification recommending that I upgrade from python 3.8 to 3.9.
I’ve installed the new python version using pkg install, and updated the reference in /usr/local/etc/rc.d/homeassistant as well as in /root/.plugin/bin/menu-service
but the process is still being started using python3.8

how can change the python version used to start home-assistant?

Hi @hanan

The steps for upgrading Python are here, just above your post

Thanks so much
Your support is amazing!!

btw, do you recommend performing the same steps (upgrading to python 3.9) for configurator and appdaemon?
and if I do upgrade them as well, should I remove the python3.8 packages from the jail?

1 Like

I don’t keep up with these like I do Home Assistant so I can’t say I recommend it, but there’s no reason you couldn’t try. If things don’t work as expected, you should be able to just revert the python version, then reinstall the service again.


I would just leave it installed for now because there maybe FreeBSD system packages that still require it

Plugin Version 7 - 2021.11.2

I pushed a quick update that will switch to Python 3.9 for all clean installs

Running a Plugin UPDATE should ensure all the requirements are met for Python 3.9 but your existing services (virtualenv) will not automagically update.

After you update to version 7

  • your installed services will continue to run a virtualenv with python 3.8
  • switch a virtualenv to python 3.9 by reinstalling the service

Reinstall the Home Assistant service (virtualenv)

  • Python 3.8 has been deprecated
  • Support will be dropped in Home Assistant 2022.1
iocage console $JAIL_NAME
# press 0 to exit menu
sysrc homeassistant_python=/usr/local/bin/python3.9
service homeassistant reinstall homeassistant

Reinstall the AppDaemon or Configurator service (virtualenv)

  • This is optional for these services

For appdaemon and configurator services, use number 8 to remove the virtualenv

When the service is removed, number 8 will change back to install

1 Like

Hi Troy,
Have you installed HA on Scale? I’ve tried but the app repository can’t be downloaded? I am using RC-1.

Regards, Frank

Yes, but I am using docker-compose to manage all my containers, which is technically unsupported by SCALE. I have a post-init script to setup /etc/docker/daemon.json that also enables and starts Docker after SCALE updates. I am not using or managing any apps from the SCALE UI

Make no mistake, TrueCharts is doing amazing work - I’m just not sure using Kubernetes is what I’m looking for at home.

Have you checked the docs recently? I guess they’ve been improving and even starting to add some videos to help.

If you still having trouble, it’s best to get help directly from the TrueCharts folks

It’s time to start thing about the next version of TrueNAS CORE

That’s right, TrueNAS CORE 13.0 has been announced and will be based on FreeBSD 13-STABLE. The nightlies will begin this month and BETA will start early in 2022.

If you’re still using this plugin, please help me decide

Should this continue on to the next TrueNAS CORE release?
  • Yes, make this plugin available on TrueNAS CORE 13
  • No, there’s too much manual intervention or trouble shooting
  • No, I plan on switching to TrueNAS SCALE when it’s released

0 voters

Hi Troy,
I wish to thank you again for all your work.
If there is anything I can do to help lighten the load, more than happy to help, if I am able.
With the highest regards,

Frank

1 Like

Hi @Tromperie - thanks for the offer. I’m always open to suggestions if anyone has ideas. My plugins are basically just an installation script, and since I’ve decided to follow the KISS approach, maintenance is not much a burden these days.

My concern is that I’ve (for) now switched to TrueNAS SCALE, so I’m not using any CORE plugins. I feel like I should be using the plugins I’m trying to maintain. If I’m not, I’d rather put an EOL date on these plugins now, giving users plenty of notice to find an alternative, instead of them just falling apart some day.

If there’s a demand to continue the Home Assistant plugin in the next release, I’ll likely switch my server back to TN CORE, otherwise I’m gonna continue with my completely unsupported method of using docker-compose directly on SCALE, at least till it blows up in my face, lol.

I wish I could make more sense of GitHub analytics - I can see that the Home Assistant plugin repo is getting traffic, but there’s no way to derive exactly how many people are actually using it

Hi @troy, well I for one am very appreciative of your plugin. It just works!
I must admit I was lucky to check this post & see your survey as I only tend to check for recent posts occasionally. That’s testament to how well the integrations works! I’m sure a lot of others who use the plugin are in a similar position.
I’m definitely keen to keep my HA on TrueNAS CORE if I can…
Cheers,
Craig

2 Likes

Hi @troy, also still using your plugin with great joy. Thanks for all the effort you put in. Just upgraded to python 3.9 therefore was checking this topic. I think when SCALE is released I’ll give it a try. But not sure if it will be able support both my Z-wave stick and my deconz USB stick in different docker containers. If it doesn’t I’ll probably go back to TrueNAS Core 13.

1 Like

hello everyone, I just installed home assistant by following this tutorial: nice job!
I will just have one question: I have an RFXCOM that I am trying to integrate into home assistant.
When I choose Serial connexion, then my device appears like that: /dev/cuaU0 - n/a, s/n: n/a
When I submit it, I got an error:
Logger: homeassistant.components.rfxtrx
Source: components/rfxtrx/init.py:76
Integration: RFXCOM RFXtrx (documentation, issues)
First occurred: 16:04:06 (2 occurrences)
Last logged: 17:05:32

Connection timeout: failed to receive response from RFXtrx device

On configuration.yalm, I added these two lines at the end of the file:
rfxtrx:
device: /dev/cuaU0

Does somebody have an idea?

Hi @doum - Sorry I’m not familiar with this integration but I’ve a few guesses for you to try

First. Please check your yaml indentation

I think it should look like this

rfxtrx:
  device: /dev/cuaU0

That being said, I checked the integration docs and I don’t see any yaml configuration. Have you tried to add the integration manually, using the Home Assistant UI.

(You should remove any yaml configuration for this integration, before trying these steps)

Manual configuration steps

  • Browse to your Home Assistant instance.
  • In the sidebar click on Configuration.
  • From the configuration menu select: Integrations.
  • In the bottom right, click on the Add Integration button.
  • From the list, search and select “RFXCOM RFXtrx”.
  • Follow the instruction on screen to complete the set up.