Homeassistant zeroconf error /mDNS & time machine

ragametal

Contributor
Joined
May 4, 2021
Messages
188
I just installed the official Home-assistant app (with "host network" enabled) and I'm getting the following error:
"Unable to set up dependencies of 'default_config'. Setup failed for dependencies: zeroconf"

According with this post TrueNas APP version of Home Assistant zeroconf error the solution is to disable the mDNS option in scale networking advanced options.

However, i kind of remember that mDNS was needed for the discovery of trueNAS as a target for timemachine backups by MAC users.

This post seems to confirm that fact Hombridge mDNS Problem TrueNAS Scale / Time Machine

In that post they are dealing with Homebridge but the problem seems to be similar. Their solution was to assign a dedicated IP to that app.

But there are 2 problems with that:
  1. Home-assistant wouldn't be using "host network" which, per my understanding, is needed for the discovery of devices on the same network.
  2. And this is the most important one, the official Home-assistant app doesn't have the options to assign a dedicated IP or network interfaces to this APP. It only has "port" and "enable host network"
1704885682226.png

It seems that Home-assistant needs to use mDNS internally for zeroconf and so does the truenas scale for timemachine. And because they are both sharing the same IP this creates a conflict resulting in the zeroconf error I'm seeing in home-assistant.

Has anybody else seen this behavior?
If so, how have you been able to solve it?
Do you have any pointers on things to try that may fix this conflict?
 

ragametal

Contributor
Joined
May 4, 2021
Messages
188
I guess that, once again, I seem to be the only person in the world with this setup and issue.
It surprises me because Truenas is very popular, timemachine is very popular and so is home-assistant. Running them together sounds like something somebody else should have run into.

anyone?
 

tprelog

Patron
Joined
Mar 2, 2016
Messages
297
I can't help with the "apps" but I'm running HAOS in a VM, and mDNS, zeroconf, discovery, etc... all work in Home-Assistant without disabling anything on TrueNAS.

Lots of people may use these Home-Assistant "apps", but they do not provide the same experience as the Home-Assistant developers intended.
 

ragametal

Contributor
Joined
May 4, 2021
Messages
188
@tprelog , thanks for the comment.
I don't really want the complexity pf maintaining another system in a VM if i don't have to. My main motivator for using truenas scale was not to use VMs at all and install everything inside docker contrainers.

If not, i would just use truenas core, install ubuntu in VM and then install all my apps in docker containers managed via portainer.

I admit that my decision is driven mostly by ignorance about proper backups, recovery and snapshots of VMs inside Truenas. However, if this is the only way of running home-assistant properly inside truenas scale, then i may give it a shot.

If you don't mind me asking, are you properly able to pass the USB devices to the VM? The devices i'm talking about are zwave and zigbee adapters. I'm new to all this and i think i read somewhere that there was an issue in truenas passing these USB devices to the VM (or was it to the container)?

Anyway, I'm curious to hear about your setup.
 

tprelog

Patron
Joined
Mar 2, 2016
Messages
297
I don't really want the complexity pf maintaining another system in a VM if i don't have to. My main motivator for using truenas scale was not to use VMs at all and install everything inside docker contrainers.
Maintaining HAOS is simple. Updates and backups are easily done through Home Assistant UI. I also wanted the simplicity of docker, but I ended up switching to HAOS because of the complications and needless overheard I had experienced with the "apps". Just setting an app pool constantly used at least 5% CPU before any apps were even installed. (This was a year ago, so maybe that's been fixed by now) For comparison, my entire HAOS VM with several add-ons uses 0-2% CPU.

Admittedly, I don't know anything about Kubernetes, and I don't have time to spend learning right now. For my single-node home use, I found it to be overly complicated and pointless. I'm sure there must be a way to get Home Assistant to work properly but I have no clue what that is. I just know it doesn't happen by default.

The "app" versions of Home Assistant also ship a custom (and IMO unneeded) configuration that by default is not compatible with any officially supported Home Assistant. For example, if you make a backup (in Home Assistant) using one of the Home Assistant "apps" it will fail on official versions of Home Assistant. (Official in this case means supported by the Home Assistant developers) To be clear, the backup will import but there are numerous errors - Here is an example from another user who made a backup using one of the "app" versions of Home Assistant, and tried importing it on HAOS.
2326c034f21630cc6df9b314a3b7862a9234c0b5_2_230x500.jpeg



If you don't mind me asking, are you properly able to pass the USB devices to the VM? The devices i'm talking about are zwave and zigbee adapters. I'm new to all this and i think i read somewhere that there was an issue in truenas passing these USB devices to the VM

The simple USB passthrough doesn't work well with Z-Wave and Zigbee controllers. It's hit-and-miss depending on the exact controller. However, if you can use PCIe passthrough for an entire USB controller, everything (at least to my knowledge) will work as expected. I started a thread looking for USB card recommendations for this exact purpose but have had no response.


if this is the only way of running home-assistant properly inside truenas scale

It's not. If you want to invest time in learning Kubernetes, I'm sure you'll eventually figure out how to make it work. There's also the following option (see link below) which I have no experience with but will allow you to install Docker in a Linux jail. And it looks like ix-systems will add some official support in the next major release. I've been completely happy with HAOS for over a year now, so I have no reason to switch back to using Docker for Home Assistant at this time.



I'm curious to hear about your setup.

I have two NICs on my MB and attached this VM to the second one with "Trust Guest Filters" enabled, which allows mDNS, zeroconf, discovery, etc. to work. I've set a backup location in Home Assistant to an NFS share hosted on TrueNAS. If you only have one NIC, you'll need to create a bridge to get mDNS stuff working and have Home Assistant communicate with TrueNAS.

Here's the specs of my VM. It's using a 32GB zvol.
Code:
Virtual CPUs: 1
Cores: 2
Threads: 1
Memory Size: 4 GiB
Boot Loader Type: UEFI
System Clock: UTC
Display Port: XXXX
Description: Home Assistant OS
 
Last edited:

ragametal

Contributor
Joined
May 4, 2021
Messages
188
@tprelog thank you so much for the response. I admit that the VM route sounds very appealing right now, I will study a bit more and see how far can i get.

About the jails, that is really wonderful news. I have another system with truenas core running multiple jails and i really like that setup. It's like a container that acts as a VM. Let's wait and see where scale takes it.
 

tprelog

Patron
Joined
Mar 2, 2016
Messages
297
If you need help getting HAOS in a VM, there's a link to a guide in the Home Assistant forum found in my signature.

(I should probably move that to this forum but over there, it's a wiki anybody can edit)
 

sfatula

Guru
Joined
Jul 5, 2022
Messages
608
I will second HAOS as the better choice. In general, I resist running applications in vms as it's a waste IMHO for most things. However, HomeAssistant is an exception and the only exception of my 17 applications. HAOS maintains itself as that is the point of HAOS. 1 of my applications is a VM (HAOS), 1 is a standard app (photoprism as it actually works), and the other 15 are just containers, mostly my own extended from standard docker created containers. My own custom containers are so much more reliable than the app system as currently exists in Scale. Maybe someday.
 

ragametal

Contributor
Joined
May 4, 2021
Messages
188
@tprelog
I'm reading through the comments on the link with your guide. There is a lot of good information there.

@sfatula ,
"My own custom containers are so much more reliable than the app system as currently exists in Scale"
it seems you are applying the wisdom from truenas core regarding their plugin system, which is to NOT use the plugins but to create your own jails and install the applications yourself.

Anyway, you guys are very convincing. I will give it a shot. Do any of you have recommendations for zigbee and zwave controllers that truenas scale can properly passthrough to the VM? I'm thinking on using the skyconnect and some other zwave controller. I would really like to avoid the PCI passthrough if i can as my expansion is limited (althought, i do have an unused usb 2.0 header on the MOBO, would that work without affecting the other ports?).

I have zero experience with home assistant and i just want to try it, experiment with it and learn about automation in general so any advisement would be appreciated.
 

chuck32

Guru
Joined
Jan 14, 2023
Messages
623
Do any of you have recommendations for zigbee and zwave controllers that truenas scale can properly passthrough to the VM?
Copied from my order: SONOFF Zigbee 3.0 USB Dongle Plus TI EFR32MG21 + CH9102F

I can confirm that one working via USB passthrough on scale using HAOS as mentioned here.
 

sfatula

Guru
Joined
Jul 5, 2022
Messages
608
I am using the Zooz ZST10 USB Stick (from the Smartest House) and it USB passes (device) through just fine to HAOS.

My apps are installed via Scale "custom apps" system. Not jails. See documentation.

HomeAssistant is great!

My bad experiences with "apps" came mostly from Truecharts. So many issues. Then I would notice the limitations, and no good way to resolve them. Any limitation was easy to resolve with your own container, so I built mine using docker where needed. Even if not needed, many containers have a bunch of environment variables. If you ever lose your apps pool, you (may) end up with a perfect storm needing to re-create those apps, so, I decided to embed everything possible (such as environment variables) not in the UI but in the container as then recreating them becomes simpler. I was then able to do things like have unique IPs for certain apps where they are appropriate running on standard ports (not > 9000). This made configuring other devices simpler too. All without the need to worry about proxies, ingress, etc. and yet share my wildcard cert to the apps that need it. So much simpler and essentially just like running the "app" natively. But, just needed a few docker skills though really, you could deploy them without docker skills and not modify anything.

Everyone was up in arms when they removed "docker" in Cobia. I make all my x86_64 docker containers (well extended existing ones) using docker on a Raspberry Pi. No need for docker command on Scale, I save them into my own image repo which Scale pulls from. Any other device or even a VM can run docker command line. By making them on another device, they can be easily tested before deploying.

Just some extra thoughts. I get the desire to have an apps system. But if you make 100 apps, it is very difficult to support them. With most containers we all use, they are made with docker and there are many examples out there on the internet and doc on how to deploy them. This moves the support to someone else instead of IX. Not that everyone expects IX to help, but many posts here about how to deploy this or that. I see they are starting to build an official truenas scale apps documentation link. That's great and they are essentially sending you to the software sites, which is where you'd go if you ran your own anyway. Difference being if your questions are docker related, much more likely they'll be familiar with the question vs Scale app based.
 
Last edited:

ragametal

Contributor
Joined
May 4, 2021
Messages
188
@sfatula my train of thought was very similar to yours when i setup my TrueNAS Core system. In there i created all my jails and manually installed whatever app i needed. I have total control of them and know how to fix and troubleshoot them when they break.

I agree that the whole "Apps" thing is kind of broken and in my opinion that is mostly because they are not using docker containers natively. Everything would be much simpler if we could just pull images from the docker hub and, if you wanted a GUI to manage them, just incorporate portainer and be done with it.

I mean, i get it, kubernetes is great if you want to deploy your apps in multiple nodes but the reality is that most people deploying Apps in truenas only have 1 node. People that truly need multiple nodes for an app are already using a different container-orchestration software instead of trueNAS.

Anyway, this is slowly getting off the main topic so I will stop.

Thank you so much for reporting which Z-wave controller has been working for you

@chuck32 thanks for the pointer on that Zigbee controller. I almost bought that one but then I saw that the "skyconnect" supports zigbee but will also support matter in the future. Do you know if skyconnect passes to the VM properly?
 

sfatula

Guru
Joined
Jul 5, 2022
Messages
608
[Everything would be much simpler if we could just pull images from the docker hub
I'll quit too after saying, you can. Perhaps just your wording if you know that. But HAOS is great!
 

tprelog

Patron
Joined
Mar 2, 2016
Messages
297
I don't use any ZigBee devices but I know the Conbee II is one to avoid for sure. It has never worked with USB passthrough. (Technically, you can use a script to start the VM and connect it correctly, but that gets old fast) -- I'm fairly sure the SkyConnect works. I vaguely remember a few people mentioning it in the installation guide's comments.

I use the Aeotec Gen 5 Plus with the Z-Wave JS UI add-on. It works with USB passthrough, but after version 12, an issue has occurred that requires me to disable the controller's soft reset ability, which is not recommended and is considered a last resort.

Here's what the Z-Wave JS developers have to say about it
Restarting (aka. soft-resetting) a Z-Wave controller is automatically done at startup of Z-Wave JS to start from a clean state where the controller isn't doing anything weird. This is also necessary in certain situations, e.g. to apply configuration changes, or to work around firmware bugs.

Simply put, for 700 and 800 series controllers, restarting is required from time to time.
For 500 series and older, it is strongly recommended. Unfortunately, 500 series controllers may reconnect to USB when restarted, which can cause issues in certain setups. This is especially true in VMs, where the USB passthrough stops working unless the VM is configured correctly.
I have not found a way to "configure the VM correctly" in TrueNAS so I've been looking for a good USB card to use with PCIe passthrough.

I am using the Zooz ZST10 USB Stick
@sfatula, I see that it is a 700 series controller. Are you using the Z-Wave JS UI add-on? If so, does it work correctly with soft-reset enabled? Maybe it's time to update my controller instead of looking for a USB card. I see the Zooz ZST10 is marked down to $24 on The Smartest House.
 

sfatula

Guru
Joined
Jul 5, 2022
Messages
608
I am using the Zwave JS integration. I have never enabled or disabled anything. No idea where to find If soft-reset is enabled or not. If you can direct me to it, maybe I can respond, never heard of it. I never restart anything.
 

tprelog

Patron
Joined
Mar 2, 2016
Messages
297
I am using the Zwave JS integration
I'm not familiar with the integration. I know they provide the same function. Just the add-on has additional features. If I get some time, I'll spin up a test VM with my old controller to have a look at the integration

Well, that's all wrong, lol. Both use the same integration. The difference is in the Z-Wave JS Server.
The official add-on provides the Z-Wave Server in its bare minimum variant, just enough to serve the Home Assistant integration.

The Z-Wave JS UI project includes the Z-Wave JS Server for convenience but also provides a Z-Wave control panel and the ability to serve your Z-Wave network to MQTT. This allows you to use the control panel, and if you so choose, to also use MQTT at the same time. For example, some users may use MQTT to interact with Z-Wave from other devices, while the Home Assistant integration still works (as long as you keep the WS Server enabled in Z-Wave JS UI).
I don't use MQTT with Z-Wave but I do like having the control panel - I'm gonna order a new controller and see if it works.

Cheers
 
Last edited:

tprelog

Patron
Joined
Mar 2, 2016
Messages
297
I am using the Zooz ZST10 USB Stick
@sfatula Sorry to bother you again - Please confirm:

Are you using the Zooz ZST10 (which is a 500 series controller) or the Zooz ZST10-700 (which is a 700 series controller)?

EDIT: Just confirmed on Discord with the Z-Wave JS developer.
700/800 series doesn't have these issues, as the USB does not reconnect after soft-reset

@ragametal - Be sure to get a 700 or 800 series Z-Wave controller for best results with USB passthrough
 
Last edited:

sfatula

Guru
Joined
Jul 5, 2022
Messages
608
@sfatula Sorry to bother you again - Please confirm:

Are you using the Zooz ZST10 (which is a 500 series controller) or the Zooz ZST10-700 (which is a 700 series controller)?
700 series, of course the 800 is there now, newer. There was no 800 when I bought it.
 

ragametal

Contributor
Joined
May 4, 2021
Messages
188
Thank you all for the advisement. I ran out of excuses for not installing Homessistant in a VM. I now have to buy a controller and start my home automation learning journey.

I have very few "smart" devices to integrate (some NEST thermostats and some lutron casetta switches) so i will probably buy the skyconnect for now as the zigbee devices tend to be less expensive than their zwave counterparts. I will also need to buy the lutron casetta hub to integrate the switches.
 

sfatula

Guru
Joined
Jul 5, 2022
Messages
608
You may have more than you think, or you may not. My router has an integration, so, it helps to track whether I am home or not which in turn affects automations. My sprinkler controller had an addon. My heat pump had an addon. Roku and AppleTV integrate. My solar inverter had an integration. Network UPS tools as in the UPS service on Scale. And all that was stuff I already had that it turns out integrated. I don't have that many smart switches, mostly in my theater room. The store I mentioned has some inexpensive ZWave though buy what is best for you of course. Glad to hear you are going with HAOS.
 
Top