My (outdated) Quick Start for Home Assistant Core on FreeNAS 11.2

Just wondering if you got anywhere with zwave working with the updates?

It looks like openzwave has been updated to 0.1.4 but I don’t believe home assistant has been updated beyond 0.91.1 to include the changes, I assume it will be in the next update

1 Like

Unfortunately this is beyond my skill level. I’ve been watching the link @ggoldfingerd has posted above.

It looks like the fix was merged to upstream openzwave and slated for 91.2 but that mile-stone was removed yesterday. Hopefully this makes it in for 91.3.

I think now it’s up to HA developers to merge the fix into homeassistant-pyozw. I tried upgrading to 91.2 and it still did not work

Thanks Troy. Ya I tried updating HA this morning too. No luck and rolled back to 90.2. Guess will wait and see.

I also tried to update to 91.2 yesterday. I was expecting it to be fixed because the milestone was in 91.2. However I had the same issue as @troy and @Dayve67. The changes were rolled into homeassistant-pyozw==0.1.4 so we have to wait until HA starts using that version.

1 Like

@scooper86 @Dayve67 @ggoldfingerd

Update and workaround on the z-wave issue.
91.3 is still using homeassistant-pyozw==0.1.3 :frowning:

However homeassistant-pyozw==0.1.4 does install successfully :slight_smile:

Temporary workaround is to manually edit zwave/__init__.py to use pyozw==0.1.4.

We’ll have to do this every homeassistant update until they bump the version but it seems to work without any issues. To be clear this is a workaround. This is working fine on my system so I wanted to share but use at your own risk

First upgrade to latest homeassistant. As of today that’s 91.3

Next edit zwave/__init__.py

iocage console homeassistant

service homeassistant stop
ee /srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/zwave/__init__.py

On line 40 you will see:
REQUIREMENTS = ['pydispatcher==2.0.5', 'homeassistant-pyozw==0.1.3']

Change this to :
REQUIREMENTS = ['pydispatcher==2.0.5', 'homeassistant-pyozw==0.1.4']

Press Esc twice to save and exit the editor

Finally restart homeassistant

service homeassistant start

You should have working z-wave again :smile:

3 Likes

Thank you. Worked perfect :smiley:

I did that.
Installed a VM running Ubuntu Server 18.04
Installed hass.io (using this: https://www.home-assistant.io/hassio/installation/) and it runs well.

But, I cannot update it from the hass.io panel. Any idea why?

@Gabriel
I’m really sorry but I don’t think I can offer much help. I’m just completely unfamiliar with docker so I have no ideas for troubleshooting.

You say hass.io is running well? I assume you have internet inside your Ubuntu VM? That’s the first place I would start. If your VM is OK I don’t think this would be a FreeNAS issue but rather a general question for anyone using a VM running Ubuntu to host hass.io. I think you can just start a general topic and ask about the issues your having.

You would probably get better help making a separate topic. I don’t think many people not using FreeNAS would be reading this topic to offer assistance. But please do tag me. I would like to follow along with your experience and see you get this working 100%.

I do have internet inside of the VM. As a matter of fact, in that VM I run under Ubuntu Server Hass.io and Ombi. It is probably a permissions issue.
Anyways, I will try to make a new post on the FreeNAS forums.

I am currently testing (lot of IoT devices):

  • Hass.io under Raspberry Pi 3B+
  • Hass.io under a NUC
  • Hass.io under Ubuntu Server VM in FreeNAS
  • Home Assistant as a jail, as instructed here

All of them working one way or another, but not 100% satisfied with either of them.

Cool. I’m on over there too


If I was going to use hass.io, this is the way I would go.

Hi

Really helpful guide, I am trying to get my pulse eight CEC usb adaptor to work via this. I have had it working in a previous version of FreeNAS but I can’t for the life of me remember how I did it.

I see the adaptor under FreeNAS as uhid0 I have forwarded this via the method you used for Zwave but it still cant connect in the jail

I get the below error when connected and nothing when the adaptor is discounted

ERROR: [ 3380] error opening serial port ‘/dev/ttyU0’: No such file or directory
ERROR: [ 3380] could not open a connection (try 1)

any help?

Thanks

FIXED!

Sorry my fault never included * after TTY madness moment

1 Like

@Thomas_Pember

where do you see this error? Is it in the jail or homeassistant logs?

For troubleshooting you can try setting devfs_ruleset=3 See here This should pass everything through to the jail.

1 Like

Very well laid out and informative! Thanks for taking the time to write this.

1 Like

Since the release of 0.81 or something around that z-wave stopped working for, there was a bug with freebsd systems, it was supposed to be fixed in 8.2, but I have since not been able to get my aeonlabs z-wave stick to work, anyone here that has it working with latest version of hass?

@pomah

Welcome! I have zwave working in the latest homeassistant release, 93.2.

You are correct, there have been a few issues that have come and gone but as of today zwave should be working without any additional fixes or workarounds related to Home Assistant. What version of Home Assistant are you currently running?

There was also a change in FreeNAS at some point, which now requires a custom devfs_ruleset to be created on the FreeNAS host and then the Home Assistant jail must be set to use it. Without this, your jail will not be able to see your USB zwave controller. What version of FreeNAS are you running? Have you created the custom_devfs?

Not working can mean a lot of things? Can you please describe the zwave issues your having?
Do your Home Assistant logs shown any errors related to zwave? What do they say?

Assuming something is not physically wrong with zwave device we should be able to help get you back and running.

1 Like

Hi, when I setup the jail a while back I did not follow your recommendation and opened all the devices for the jail to see.

I am running 0.93.2, updated today.

When I try to add the z-wave device I get the following error: “Unknown error” in the integration view, when looking in the logs I see this:

Error handling request
Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.6/site-packages/aiohttp/web_protocol.py”, line 418, in start
resp = await task
File “/srv/homeassistant/lib/python3.6/site-packages/aiohttp/web_app.py”, line 458, in _handle
resp = await handler(request)
File “/srv/homeassistant/lib/python3.6/site-packages/aiohttp/web_middlewares.py”, line 119, in impl
return await handler(request)
File “/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/http/real_ip.py”, line 33, in real_ip_middleware
return await handler(request)
File “/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/http/ban.py”, line 68, in ban_middleware
return await handler(request)
File “/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/http/auth.py”, line 216, in auth_middleware
return await handler(request)
File “/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/http/view.py”, line 115, in handle
result = await result
File “/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/config/config_entries.py”, line 154, in post
return await super().post(request, flow_id)
File “/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/http/data_validator.py”, line 46, in wrapper
result = await method(view, request, *args, **kwargs)
File “/srv/homeassistant/lib/python3.6/site-packages/homeassistant/helpers/data_entry_flow.py”, line 86, in post
result = await self._flow_mgr.async_configure(flow_id, data)
File “/srv/homeassistant/lib/python3.6/site-packages/homeassistant/data_entry_flow.py”, line 80, in async_configure
flow, step_id, user_input)
File “/srv/homeassistant/lib/python3.6/site-packages/homeassistant/data_entry_flow.py”, line 98, in _async_handle_step
result = await getattr(flow, method)(user_input) # type: Dict
File “/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/zwave/config_flow.py”, line 50, in async_step_user
user_path=self.hass.config.config_dir)
File “/usr/local/lib/python3.6/concurrent/futures/thread.py”, line 56, in run
result = self.fn(*self.args, **self.kwargs)
File “/srv/homeassistant/lib/python3.6/site-packages/openzwave/option.py”, line 82, in init
libopenzwave.PyOptions.init(self, config_path=config_path, user_path=user_path, cmd_line=cmd_line)
File “src-lib/libopenzwave/libopenzwave.pyx”, line 690, in libopenzwave.PyOptions.init
libopenzwave.LibZWaveException: “LibOpenZwave Generic Exception : Can’t autoconfigure path to config”

I’m not really a fan of these automatic discovery integrations, they usually give me headaches as well. I just assume we are a very small portion of users on FreeNAS so they can not always take us into consideration.

I just add thing to my configuration the old way. Everything works much better that way and zwave is no exception. The End of your errors look like zwave can’t find it’s own configuration which was something that always needed to set manually as long as I’ve been using HA on NAS

If you remove the automatic integration and setup zwave to your configuration.yaml, you can set this yourself and will hopefully start working. Either Way this should at least be the first step to get started.

Here’s my zwave entry for configuration.yaml.

zwave:
  network_key: !secret zwave_key
  usb_path: /dev/cuaU0
  config_path: /srv/homeassistant/lib/python3.6/site-packages/python_openzwave/ozw_config

I don’t know if you already have or even need a network_key but just in case… I used the following command from inside the jail (won’t work from FreeNAS host) to generate my network_key.

cat /dev/urandom | tr -dc '0-9A-F' | fold -w 32 | head -n 1 | sed -e 's/\(..\)/0x\1, /g'
1 Like

Well thank you again, so yeah, the only way that worked (for me) was to add it manually to the config.yaml file as explaiined above, now i cand find the stick, lets try and pair some z-wave units now :slight_smile: