I am changing back to the suggested name, homeassistant user/group. I did not know. I thought the TrueNAS user/group will pass thru the jail user/group permission.
I follow your instruction to the part " pw adduser -u 8123 -n homeassistant -d /home/homeassistant -w no -s /usr/local/bin/bash -G dialer" it stated login name ‘homeassistant’ already exists. What shall I do?
I continue with your instructions, when I run the service outside the jail I get this message: WARNING: failed precmd routine for homeassistant… Can you give me a full instructions and I will delete this jail and create a new one from scratch? Thanks.
I understand this is not an easiest solution compared to other installations methods, one mistake or missed command and nothing works. The guide on this page, contains the most complete instructions. It is the only one with all steps manually laid out. If you are going to start again, the OP contains the guide you should follow.
If you would like to share the out of the following commands, run from inside the jail, I can try to help you troubleshoot the existing install.
id homeassistant
sysrc -a | grep ^homeassistant
If you are really having a hard time no matter what you try, this installation method may not be the best choice for you. Running Home Assistant Core from a jail on TrueNAS (even using the plugin) requires frequent interaction with the command line and may not be the most user friendly experience, if you are not already familiar.
As an alternative to running Home Assistant Core inside a jail, you might also consider installing Home Assistant OS in a VM as shown here.
I follow your link to install manual jail. I create a new jail call Hassio and inside the Jail I run the scripts instruction. I have error when user not found… See screen print.
I can follow instruction just fine using copy paste but if error message occur I not sure how to debug it. I manage to install Plex server, SyncThing on the TrueNAS just fine with youtube instructions. I have Home Assistant and configure a lot of Tasmota and ESPHome but not much of scripts guy.
Back to my first Jail name HomeAssistant,. I paste above command and I get this message:
When I type in the id homeassistant on the Hassio jail, I find out hassio is the group and user. I changed it back to homeassistant as user and group and change the id to 8134. I manage to install homeassistant and run the service. I will see what happen next to see I can bring the GUI up. I am waiting for the setup to complete.
Has your luck improved?
Yes, thanks. I got the HA Core GUI running on the TrueNAS (Hassio) jail. Why I am missing Supervisor tab? I get errors when try to add MQTT and ESPHome on the integrations tab. Any help appreciated…
Do I need to add a mounting point so I can access it using Samba to modify yaml files outside HA?
There is no Supervisor with this installation method. You need to run Home Assistant OS if you’re looking for addons. As defined in the Home Assistant Core ADR, this is consider an advanced installation method and you are responsible for managing your system.
Before you can configure the integrations for ESPHome and MQTT, you must first install the separate plugin, jail, or otherwise be running each application as you see fit. In the land of Home Assistant OS, these would be considered addons and would come pre-configured to work with Home Assistant. For this installation method, you’ll need provide your own instance of MQTT and ESPHome, which you have configured accordingly.
Mosquitto (MQTT broker) and ESPHome can be configured by following the documentation for each project.
Technically no, but I strongly recommend it. Having your config safely separated from the jail will allow for the jail to be destroyed and recreated at any time. If configured, you will retain access to the configuration using a SMB share, even when the jail is destroyed! Configuration can be restored by adding a mount-point to a new jail.
I’m sorry for the confusion, this guide has been around long before the Home Assistant OS, the Supervisor and addons where even a thing.
This project (Home Assistant) was re-branded last year. In general, the has only added to the confusion
First thing first. Where do I create the mounting point from and to? I understand with mounting point is should be similar to the Plex server setup.
So I need to create 2 jails for MQTT and ESPHome. Any link on instruction for MQTT and ESPHome installation? I do need both of this add on. I currently running HA on raspberry and need to run on more stable machine like TrueNAS. I know it has a lot of learning curves but I am ready for the challenges.
Perfect, this should be familiar then - Have a look here, I know it says it’s for the plugin, but the plugin is only a scripted installation of this guide, so same rules apply.
That’s all I need to hear. I will try to help the best I can. I’m going to say upfront through, I’m not an expert either so there is a lot I still do not know myself. I still fumble my way through things by trial and error, more often than people might think
Well there’s TrueNAS plugins for both of those – Maybe you’ll have better luck than you did with the Home Assistant plugin. – If you are not using a password with MQTT, Mosquitto (MQTT) plugin will work with Home Assistant as soon as it’s installed. (personally, I have mqtt on it’s own vlan, I don’t bother with a password because it is sent in plain text over the network anyways)
I have never seen a guide for installing Mosquito. If you create a manual jail, it basically just
pkg install mosquitto
sysrc -f /etc/rc.conf mosquitto_enable="YES"
service mosquitto start
ESPHome is almost the same… If the plugin installation succeeds, you should be ready to add the integration in Home Assistant. The integration should connect the devices - To access the ESPHome UI from Home Assistant, you just add a panel_iframe that points to ESPHome IP address.
Unfortunately, I can’t offer much in the way of ESPHome. I did create that plugin, but it was by request and with the help of another user, who has since moved on to use Docker. For myself, using ESPHome is still on a long list of Things to do
I will try your instructions later. What about the mounting points? Where shall I pointed the Hassio in the jail?
It is all in the link. But to quickly answer, the external dataset should be mount to the $HOME
directory
of the user you have configured to run Home Assistant.
I’m still confused as to which user name you have ended up with so I will show both
- Username
homeassistant
mount dataset to/home/homeassistant
- Username
hassio
mount dataset to/home/hassio
I end up with Hassio user. After I get all these to work and like it, I will create a new production with new homeassistant jail/user. If MQTT and ESPHome on the separate jail, can Hassio communicate to each other between jails? On the HA Configuration screen, Integrations screen, I can add the MQTT and ESPHome modules. Can I add it there? I tried but not able to get it to work because the MQTT it asking for Broker and I enter the IP of the HA, get Failed to connect error. Is it because jail?
Yes. Maybe a picture can help.
Here you can see some of the separate jails I have installed on a TrueNAS.
For MQTT, I look at the IP address of my mosquitto
jail, that is running on TrueNAS.
In Home Assistant, when you add the mqtt integration
EDIT one more to hopefully further illiterate examples
Do you run this cmd on the newly created “mosquitto” jail shell or console shell? Not clear on the instruction to create mosquitto jail.
When I create jail and choose vnet and start the service, my TrueNAS GUI lost try to connect and my home internet down. I have to reboot form the TrueNAS console to bring back up. Do you know why this happen? Same when I use the HA plugin.
I run pkg install Mosquitto (To match my jail name) on the console shell, I got error:
Does jail service have to running?
I think that really points to something else going on. VNET is the only thing I have every used. I guess I’ve been lucky it has always just “worked”, so I have no knowledge to help trouble shoot that. Might be worth asking about that in the TrueNAS forum.
For these jails and plugin, you should think of them as a separate computer. To be clear, you need to run commands for each service, from inside the jail where it’s running.
So, first create, then start your jail.
Next enter the jails console.
iocage console $NAME_OF_JAIL_HERE
Now you should be able to install mosquitto
pkg install mosquitto
sysrc -f /etc/rc.conf mosquitto_enable="YES"
service mosquitto start
This is usually the case. You can start / stop the entire jail from TrueNAS, but typically when your interacting with anything inside the jail, you should begin by entering the jail’s console.
iocage console $NAME_OF_JAIL_HERE
Or from the TrueNAS UI
I do not understand why you think you need to go through all of difficulties of manually installing jails when all of them are available as community plugins, thanks to @troy 's fantastic contribution.
Mine are all installed as plugins and they work with the normal minimal configuration.
Thanks for dropping in @Tromperie
This all started with @MrTeaIOT having trouble getting the community plugin for Home Assistant Core to install correctly.
He has report multiple attempts, that for some reason, are completely crashing the entire TrueNAS server. I have never seen anything like this happen before.
Have you had any trouble like this when using or trying to install any plugins or jails?