Hi @troy - nightmare! I’ve been putting off the inevitable for quite a while now having used your TrueNAS Core plugin successfully for a number of years. Thank you so much for all of your work. Home Assistant along with your AppDaemon plugin and your guide to running with an external dataset for back-up purposes has give me everything that I needed
What is your preferred way of running Home Assistant within a TrueNAS environment? I’m happy to change to TrueNAS Scale if required, but want to be as ‘future-proof’ as possible whilst having a robust back-up method.
Do you suggest the official Scale plugin, or do you prefer running a Docker instance within a VM (hence giving a Supervised install)? My thoughts are that by having a Supervised install I could add a number of other components (Grafana, InfluxDB, Mosquitto etc) within that installation, hence reducing the need for additional Jails/Plugins/VM’s.
I have a second trial server that I tested Scale with, but I struggled with the networking having Docker containers within a VM.
Unfortunately another complication that I have is that I’m running the old legacy encryption on my hard drive, so there will be a certain amount of pain transferring all of my files off and then back on the the server once the hard drive Datasets are recreated…
I also have additional jails running within Core at the moment (Unifi, Octoprint, Duplicati, ESPhome, TasmoAdmin etc), which I would need to get running too.
What would be your suggestion?
If I may, I’ll share my very recent experience. After running HA and all other home automation components (zigbee2mqtt, zwavejs2mqtt, Marian, gardena etc) I have moved HA, appdaemon and esphome (a bit earlier) to docker (compose) running on very lightweight Debian 11 on a low power mini PC. It is one of the two mostly recommended install methods so it should be future proof. Migration was super easy. The pc takes 7W of power on average. For now I kept all other components on TrueNAS Core, so far no urgency to move it out and the DB will benefit from much more powerful hardware.
OK. Ideally I was after keeping it all on one PC (the server’s running 24/7 anyway). Out of interest, what are the specs of your mini PC?
It’s a Zotac ZBOX BI324 intel N3060, 8 GB RAM (not really needed that much) and 120GB SSD (the smallest I’ve had).
OK, thanks. I’ve got a similar old mini PC lying around somewhere, so that might be an option. I think I’ll investigate the VM option too though.
Honestly, the best (and my favorite) experience has been using docker-compose and this hack to enable native docker without kubernetes. It’s simple and has been flawless for over a year now. Using this combined with macvlan to assign containers an ip address matching the previous jail provided almost seamless change over. The problem here is that it is a hack, it’s unsupported by TrueNAS SCALE, and docker could be removed at some point in the future – This is not an issue for me since my desktop is also Linux and already has docker installed. If it’s removed from SCALE, I can migrate everything to my desktop in a matter of minutes while I find another solution.
I don’t use any SCALE apps for a number of reasons - one of them being cpu overhead. Just setting a dataset, which enables the k3s.service responsible for running the apps, uses continuous 3-5% cpu just sitting idle (no apps even installed). For comparison, I only see 0-2% cpu usage with everything running while using native docker and docker-compose.
You can do basically the same thing using the docker-compose app by TrueCharts. In fact it’s rather trivial to switch between using native docker-compose and the docker-compose app.
It’s certainly worth a try - personally it wasn’t my cup of tea. Nothing against the amazing work being done by the TrueCharts team. I just don’t think Home Assistant was designed to be run in kubernetes.
This is the recommended approach to using native docker on TrueNAS - This should also work on both CORE and SCALE so it could possible to add this approach to your current setup. I’ve seen a few post around this forum about installing the supervisor to a VM on TrueNAS - One is linked at the end of the OP in this thread. Unfortunately I don’t have any experience with VM’s on TrueNAS so I can’t offer much assistance here.
Stick with TrueNAS CORE for now - Create a VM for running native docker and docker-compose or use Home Assistant OS – I’d move TasmoAdmin, ESPhome, mosquitto… basically anything to do with home automation to your VM as containers with Home Assistant (or install as add-ons with HA OS) – I don’t have experience with Unifi, Octoprint or Duplicati running on TrueNAS, but if they are working fine in your jails, I would leave them alone. IMO those are not related to home automation so I would not use their add-ons even if I was using HA OS.
I’m trying to keep everything on one server for now as well but something like this is looking more attractive since my server is starting to show some age. I’m not sure if I’m going to build another one or just a mini PC to run a few apps.
Hi @troy, thank you so much for your very comprehensive reply. On my test server I’ve actually been trying the HA OS installed as a standalone VM by following the guide at Alternative way of running HassOS (full OS) on FreeNAS (without iocage or Docker), however I used the Generic x86-64 image, which meant that I could shortcut the initial few stages of converting the vdi file to an img.
It was actually surprisingly straightforward and I have ended up with what appears to be a fully functioning supervised version of HA. That was on TrueNAS Scale, so I tried the same thing on my main Core server & that’s worked too!
As you say, that gives the added advantage that I can run quite a few of the extra services within HA (TasmoAdmin, ESPhome, mosquitto). The other advantage is that I can keep my existing install running alongside the new one whilst I start setting it up. When I’m ready to bite the bullet I’ll just have to change the mqtt settings in my multiple Tasmota nodes and jump across to the new install. I’m sure I’ll hit a few hurdles on the way, but hopefully it can be done in a slower and more controlled manner than a complete reinstall! Particularly important when HA controls my heating & hot water!
Also as you say, I can sit with Core for now & it won’t affect any of my other jails/plugins.
Thank you for helping me to brainstorm the various options and I really appreciate the work that you’ve done with your original plugins.
Be sure to ask around first. I’m pretty sure you can use a backlog command to change all your devices at once! Sorry, I don’t know how to do it myself.
Thanks, yes. It actually looks quite straightforward with TasmoAdmin. You can send commands to a select number of units. Backlog would be useful if I need to change a number of parameters at the same time, but if I keep the MqttUser and MqttPassword the same it will just be MqttHost that I need to change.
If you’re still using this plugin… Here’s another sign of its impending doom
So I have moved out just in time Btw, esphome TrueNAS plugin also does not work anymore due to some other dependencies not available on FreeBSD.
esphome plugin has been broke for a while and was the reason I switched to SCALE over a year ago.
I submitted a PR back in June to have it removed from TrueNAS but somehow it came back – I’ll delete it again when I submit the PR to have Home Assistant removed.
It’s done…
This plugin will be removed from TrueNAS CORE
Home Assistant only supports Linux, OSX and Windows using WSL. This plugin runs in a FreeBSD jail, therefore it is not supported. As Home Assistant continues to grow and add new integrations, installation on FreeBSD no longer “just works” as it had for so many years in the past. It is no longer feasible for me to continue maintaining this plugin.
How does it work with the community store? I can still see it there. Is it going to be removed after system upgrade or somehow differently?
These changes will still need to be merged with the 13.1-RELEASE
branch before they take effect. I assume the option to install will disappear after that. Existing plugin will not be removed and should continue to function as a normal jail. However trying to run a Plugin UPDATE will likely fail and completely brick the plugin. Rolling back a snapshot will be the only chance of recovery.
Technically it will still be possible to (re)install this plugin from the console, or into a regular jail but I’ve decided against providing those instructions since it would basically be setting people up to fail.
@troy, thank you for your great work
I tried upgrading home assistant from the menu, and it failed building maturin
which is a dependency of orjson
I was hoping to get a quick fix to the problem in this forum, but I see that, unfortunately, the plugin is not supported any more
- What are your recommendations for migrating the home assistant server from TrueNas? Do you suggest running home assistant on raspberry pi and using TrueNas to routinely backup data?
If so, a migration tutorial would be greatly appreciated - Do you have any suggestions for a short-term fix to the build problem of the current home assistant version
Hi @hanan
The CI test was still passing on 13.1 so there’s hope it should still be working if everything is up to date. What version of TrueNAS are you using? Is your jail using the 13.1-Release
and HA using python 3.10?
In any case you can try this to rebuild the virtualenv
# Press 0 to exit the menu
service homeassistant stop
service homeassistant reinstall homeassistant SQLAlchemy fnvhash
service homeassistant check_config
It depends. I don’t think there’s gonna be a one size fits all answer. There’s been a few options mentioned a few post back - starting here.
I am still on version 12, specifically TrueNAS-12.0-U8.1
Do you recommend upgrading to version 13?
btw, since home assistant is supported on Linux, would it be possible to run a home assistant server on the Linux based TrueNas Scale?
I’ll try to spin up a VM after work today or tomorrow and see if it’s still working. From your Home Assistant menu, what are results of the test_service
command (Number 7) ?
I always ran the latest version of TrueNAS CORE. Usually I switched during the RC phase but that is certainly a personal preference of when to switch. From a plugin standpoint it is usually best to be on the latest version of TrueNAS but the earlier you switch, the more likely there are still some bugs to work out. I would assume it’s fairly safe to switch by now since they are up to U2 I believe. I switched to SCALE over a year ago so I can’t share any personal experience of TN CORE 13.
EDIT: I forgot to say the most important part. That is, you really should reinstall the plugin after you switch to TN CORE 13, if / when you do. Trying to upgrade the plugin jail to a new release very seldom goes as planned. If you do stick with this plugin for now, updating to TN CORE 13 and reinstalling will give you the best shot to keep it alive until you can have another solution for running Home Assistant.
Absolutely – See this post
I have been running HA on TrueNAS Core 13 for a while, last version of HA I have there is 2022.8.4
I can try to bring it up and see if I can upgrade HA to latest release, just need to disconnect it from my DB which is now used by the HA hosted on Docker on Debian.
EDIT: I have just brought up HA on TrueNAS Core 13 and upgraded to latest release (also TrueNAS is running on latest release). All working fine and no issues whatsoever.
EDIT2: I’ve just got a message in that system that ESPHome integration can’t be established, and it is due to the fact that bluetooth component is not working on FreeBSD systems. So if you are using it the esphome integration won’t work anymore and I think there is no way around it…