Installing on FreeNAS (ish)

No troubles at all.

I did ask about the hardware but did not get an answer. I suspect the hardware is considerably underpowered, particularly the amount of RAM. I have a HP Gen8 microserver with 16G of RAM, a boot SSD, and a Xeon 1265L which barely gets past 15% usage. An under-resourced TrueNAS config will struggle with several jails. I think an answer to the hardware is needed before proceeding further.

1 Like

I figure out how to work around ( I think) I have to configure the each new jail, VNET, Berkeley Packet, pick my other vnet_default Interface (1 have 2 NIC), IPV4 interface: vnet0 and the jail started without freeze up. My default card is the built-in card not configure correctly.
It just happen recently. I installed Plex server and Syncthing from plug-in just fine.

Thanks, Troy for you good help. I got the MQTT service running on the separate jail. Then I goto the HA and add integration for MQTT and it works!!!
I will try the ESPHome next same manual way and scripts…
Do I need to add the mounting point on MQTT ??

1 Like

No luck getting the ESPHome from repositories. I entered “pkg install esphome” on the new ESPHome jail shell. Message stated No packages available to install matching ‘esphome’ have been found in the repositories. IS the ESPHome spelling is incorrect or I did it wrong way??

I’ve asked before; what hardware do you have?

1 Like

ESPHome is a pip install, just like Home Assistant.

I was hoping you would be able to install the plugin… Then you would have only needed to add the integration

Are you able to choose the which NIC you are using with the plugins? Can you install the ESPHome plugin if you assign the other NIC?

I can probably whip up a quick guide sometime today if this needs installed manually, but please, if you are able, try the plugin first.

ESPHome is not difficult to install manually, but it does involve a few extras steps beyond just creating the virtualenv and pip installing it

And I just realized that the ESPHome plugin is still using the older format I had on FreeNAS 11.2…

This could be helpful since that is still a “hybrid” – meaning it works as a plugin and as a manual install script!

@MrTeaIOT if the plugin does not work, you may still be able to use the install script with the following steps, inside a manually created jail.

  1. Create, then start a new jail for ESPHome

  2. Enter the jails console

iocage console $JAIL_NAME
  1. Run the rest of these commands inside the jail
pkg install autoconf bash ca_root_nss curl gcc git-lite gmake pkgconf python37 py37-pillow
git clone https://github.com/tprelog/iocage-esphome.git /root/.iocage-esphome
bash /root/.iocage-esphome/post_install.sh standard

EDIT to add: One more thing to keep in mind about using ESPHome on FreeNAS / TrueNAS

There is currently no USB detection for device flashing on FreeNAS . You can create, compile and download the initial firmware using ESPHome on FreeNAS. You will need to use esphomeflasher on a separate computer for the initial flash . After the initial flash and your device is connected to your network, you will be able to manage and flash future firmwares using the ESPHome OTA process.

I have [email protected] Dell PC with 5x10TB drives, 24GiB memory and 2 NIC.

I understand, I very familiar with ESPHome create and compile in bin using PC then use OTA on ESPHome. I got it esphome running now on my TrueNAS on separate jail. I tried to integrate to HA with the IP from ESPHome but I got this message:image

What is best way to edit the yaml file? I usually do it on the Notepad++ but I need to use Samba share so I can open up on my PC. I already have samba share pointing to the iocage folder. Then I have permission issue to make changes on the yaml files. How do I do this on the permission issue so the TrueNAS user group can full access these yaml files?

Progress!

I have a question about this.

Does this go in an ESPHome file or are they referring to the Home Assistant api ?

I’m just asking for my own reference. As mentioned, I have only looked at esphome, never actually used it before.

Is this an example of the files you need to edit?

I got the ESPHome GUI comes up by using the panel_iframe shortcut at HA. Why not work like MQTT using the ESPHome on the HA intregration? Is there any differences?

I still need a way on how to edit the yaml files inside the TrueNAS jails.I need help on how to get the correct permission so I can use samba share and use Notepad++ to edit the files inside jail. Or create a new mounting point for HA and user in TrueNAS to assess using correct permission. Which way is better way?

So basically, this is a rinse and repeat of the same process you have already used for Plex and Home Assistant. There are more than a few ways to set this up, but these are general steps can be applied to almost any Jail or Plugin on TrueNAS

First, you need to know a few things about the jail.

  1. What is the username, group and UID of the the user who is running the service inside the jail?
  2. What is location you need to mount the dataset inside the jail?

Next on your TrueNAS, create the following

  1. User/Group using the same UID as the user inside the jail
  2. A separate dataset, with owner /group set to the user you just created
  3. Group permissions set to RW, since these methods use the group to control access

Then copy the existing configuration (from inside the jail) to the new dataset you have created.

And finally add dataset to correct mount point inside the jail.


Again, I’m sorry I don’t have every step available to just copy and paste. I’ve only looked at ESPHome but have not used it for more than testing the plugin installation.

You did not answer my question, so I will guess, this should be all the information you need.

NAME | SERVICE | PORT | USER | CONFIG DIR
:—: | :—: | :—: | :—: | :—: | :—: |
ESPHome | esphome | 6052 | esphome | /var/db/esphome

You should be able to follow the guides for moving the Home Assistant configuration to an external dataset and setting up the samba share, except for ESPHome, you should use substitute the information provided in the table above, when setting everything up.

That is an old system that seems to give problems when you ask it to work hard. There are two possibilities;
First, the power supply cannot cope with the demands of all the hardware. Do you have a spare PSU that has enough power to test?
Second, some component/s are faulty, again manifesting under load. There are bootable ISOs available on the Web that can run a full range of diagnostics.
I would try them in that order. Have you checked the TrueNAS logs too?