Home Assistant Core -- TrueNAS CORE Community Plugin

Thanks Troy. Installed and waiting for it to come up.

Hi Troy,
It is hard to evaluate HA without editor and HACS. I’ve followed a couple of guides but no luck. I think I’ll wait until a Beta of Scale and HA might have an app.

If you would like to continue with this now, Im willing to help. Feel free to drop me a PM if you’d like.

Completely understandable. Just FYI though, having an HA app is not going to change or make it easier to install HACS. There is not going to be any kind of console menu for updating or installing other services like the File Editor.

It’s not that these things are going to become difficult, they are just done differently.


And a note about CORE for all TrueNAS users

The last plugin update (version 5) has been very much simplified, reducing the future maintenance burden. I’ve been considering, no matter what happens with SCALE, I’ll probably try to keep supporting the Home Assistant plugin on CORE for as long as I can.

Thank you so much for the quick reply that fixed my issue perfectly. I recently purchased the GoControl HUSBZB-1 and when I go into zigbee integration and select the port I get /dev/cuaU0 and /dev/cuaU1. If I am correct I no longer need to add the ruleset? If so how do I tell which one is the zigbee radio. Additionally when I select it ask for the radio type and I select HUSBZB-1 and it fails to connect (port speed set to 57600). Any help would be greatly appreciated.

That is correct, the plugin does not need a custom ruleset

Great choice. I have one of these myself.

/dev/cuaU0 is the Z-Wave radio
/dev/cuaU1 is the Zigbee radio

Use radio type ezsp for ZHA (I don’t recall needing to set a port speed)

What is the recommended method of creating a periodic backup job to backup home assistant configuration and scripts, to enable easy restore in case …?

Additionally, I am following the Lets-Encrypt guide and I have encountered some problems (post). Has anyone been able to complete this setup with the TrueNas home assistant jail?

I followed @troy ‘s guide and a nightly snapshot happens every night. An alert appears on my phone when done. Could not be easier.
Without Troy’ s fantastic contribution, I may not have fallen down the HA rabbit hole. :slight_smile:

1 Like

could you please be more specific regarding the link to the nightly snapshot guide. I could not find it in the blog.
I did find, however, the instructions to move all configuration data to an external dataset. I plan to follow these instructions, but would still prefer to have snapshots of that data

Post above by @troy on December 20.

I followed this guide a few years ago, but haven’t tried it since. These days I’m only using NabuCasa for remote access so I can’t offer much help here, sorry.

Based on what I’ve seen other mention, I think it’s preferred to setup a separate jail that handles ssl termination, then just forwards non-encrypted traffic to other jails. But again, I’m only repeating what I’ve heard. Sorry I can’t help with details.


EDIT I should also point out, once your configuration is moved to the external dataset, you can also configure snapshot using the usual methods from the TrueNAS UI - The idea with using Home Assistant to do this this, is just because we can.

1 Like

@troy thanks a lot for the great plugin and documentation. :ok_hand: This is definitely saving a lot of people a lot of time.

I’m currently facing a small issue with an integration, which I couldn’t resolved. Maybe one of you already encountered a similar problem.

I wanted to use this integration:

Seems straight forward, but after editing the config to something like:

climate:
  - platform: eq3btsmart
    devices:
      room1:
        mac: "XX:XX:XX:XX:XX:XX"

and restarting I’m getting:

Failed config
  General Errors:
    - Platform error climate.eq3btsmart - Requirements for eq3btsmart not found: ['python-eq3bt==0.1.11'].

I’m not sure if this is releted to this installation or do I just miss something here?

1 Like

Hi @Lol

The Home Assistant Core ADR states

Based on the integrations that you’re running, you will need a lot of extra packages installed.

I suspect we’re missing some system dependency - If that’s the case, and we can figure out what that is, I’ll add it to the plugin manifest.

Installing python-eq3bt to the HA virtualenv from the jail’s console should provide more details of the error. - Please try the following and share the output

iocage console $_Jail_Name
# Press `0` to exit the menu
service homeassistant install python-eq3bt==0.1.11
1 Like

Thanks for the quick help! Super nice community!

root@HomeAssistant:~ # service homeassistant install python-eq3bt==0.1.11
Collecting python-eq3bt==0.1.11
  Using cached python_eq3bt-0.1.11-py3-none-any.whl (12 kB)
Requirement already satisfied: click-datetime in ./lib/python3.8/site-packages (from python-eq3bt==0.1.11) (0.2)
Requirement already satisfied: construct in ./lib/python3.8/site-packages (frompython-eq3bt==0.1.11) (2.10.56)
Requirement already satisfied: click in ./lib/python3.8/site-packages (from python-eq3bt==0.1.11) (7.1.2)
Collecting bluepy>=1.0.5
  Using cached bluepy-1.3.0.tar.gz (217 kB)
Building wheels for collected packages: bluepy
  Building wheel for bluepy (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/local/share/homeassistant/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-stw5k147/bluepy/setup.py'"'"'; __file__='"'"'/tmp/pip-install-stw5k147/bluepy/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-1kzqkyi0
       cwd: /tmp/pip-install-stw5k147/bluepy/
  Complete output (10 lines):
  running bdist_wheel
  running build
  running build_py
  Working dir is /tmp/pip-install-stw5k147/bluepy
  execute make -C ./bluepy clean
  Failed to compile bluepy-helper. Exiting install.
  Command was 'make -C ./bluepy clean' in /tmp/pip-install-stw5k147/bluepy
  Return code was 1
  Output was:
  b'make: "/tmp/pip-install-stw5k147/bluepy/bluepy/Makefile" line 16: Missing dependency operator\nmake: "/tmp/pip-install-stw5k147/bluepy/bluepy/Makefile" line 18: Need an operator\nmake: "/tmp/pip-install-stw5k147/bluepy/bluepy/Makefile"line 20: Need an operator\nmake: Fatal errors encountered -- cannot continue\nmake: stopped in /tmp/pip-install-stw5k147/bluepy/bluepy\n'
  ----------------------------------------
  ERROR: Failed building wheel for bluepy
  Running setup.py clean for bluepy
Failed to build bluepy
Installing collected packages: bluepy, python-eq3bt
    Running setup.py install for bluepy ... error
    ERROR: Command errored out with exit status 1:
     command: /usr/local/share/homeassistant/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-stw5k147/bluepy/setup.py'"'"'; __file__='"'"'/tmp/pip-install-stw5k147/bluepy/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-t72zzo7l/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/share/homeassistant/include/site/python3.8/bluepy
         cwd: /tmp/pip-install-stw5k147/bluepy/
    Complete output (10 lines):
    running install
    running build
    running build_py
    Working dir is /tmp/pip-install-stw5k147/bluepy
    execute make -C ./bluepy clean
    Failed to compile bluepy-helper. Exiting install.
    Command was 'make -C ./bluepy clean' in /tmp/pip-install-stw5k147/bluepy
    Return code was 1
    Output was:
    b'make: "/tmp/pip-install-stw5k147/bluepy/bluepy/Makefile" line 16: Missingdependency operator\nmake: "/tmp/pip-install-stw5k147/bluepy/bluepy/Makefile" line 18: Need an operator\nmake: "/tmp/pip-install-stw5k147/bluepy/bluepy/Makefile" line 20: Need an operator\nmake: Fatal errors encountered -- cannot continue\nmake: stopped in /tmp/pip-install-stw5k147/bluepy/bluepy\n'
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/local/share/homeassistant/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-stw5k147/bluepy/setup.py'"'"'; __file__='"'"'/tmp/pip-install-stw5k147/bluepy/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-t72zzo7l/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/share/homeassistant/include/site/python3.8/bluepy Check the logs for full commandoutput.
WARNING: You are using pip version 20.2.4; however, version 21.0.1 is available.
You should consider upgrading via the '/usr/local/share/homeassistant/bin/python3.8 -m pip install --upgrade pip' command.

:frowning: I’m guessing but my first feeling is, this may be a compatibility issue with FreeBSD

Missing dependency operator\nmake: "/tmp/pip-install-stw5k147/bluepy/bluepy/Makefile"

In my experience, when it is a dependency issue that can be solved by installing additional system packages, there is some clue (example here) in the error about a missing lib or similar, that is relativity easy to figure out with the help of Google. – Unfortunate, with these errors that is not the case.

You may need to open an issue on GitHub for some help, or suggestion from the integration developer. However, this is not an officially supported installation because the OS is FreeBSD, which is not a supported by the devs, so I’m not sure if they will help.

Still I think it’s worth a shot, maybe they will work with us to add FreeBSD support if that’s what’s missing. Or it could also be something on our end that I may be able to address with the devs help.

Hey, thanks for the help. I will create an issue and let you know if I get any response.

1 Like

Are there more people having issues with upgrading to version 2021.2? I have OpenZwave beta running without issues in a separate jail on version 2021.1.5. Reading the release notes I thought it should remain working although it will not be updated anymore. But when I upgrade to 2021.2 it gets broken.

From the logs it looks like Home Assistant is trying to install openzwave again which should not be necessary as it is running in a separate jail. See below from the log file. i tried deleting the integration and reinstalling it again but reinstalling doesn’t seem to finish.

Unable to install package homeassistant-pyozw==0.1.10: ERROR: Command errored out with exit status 1: command: /usr/local/share/homeassistant/bin/python3.8 -u -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘"’"’/tmp/pip-install-_bg_95nb/homeassistant-pyozw/setup.py’“'”‘; file=’“'”‘/tmp/pip-install-_bg_95nb/homeassistant-pyozw/setup.py’“'”‘;f=getattr(tokenize, ‘"’“‘open’”’“‘, open)(file);code=f.read().replace(’”‘"’\r\n’“'”‘, ‘"’"’\n’“'”‘);f.close();exec(compile(code, file, ‘"’“‘exec’”’“‘))’ bdist_wheel -d /tmp/pip-wheel-s19_l33o cwd: /tmp/pip-install-_bg_95nb/homeassistant-pyozw/ Complete output (17 lines): sysargv [‘/tmp/pip-install-_bg_95nb/homeassistant-pyozw/setup.py’, ‘bdist_wheel’, ‘-d’, ‘/tmp/pip-wheel-s19_l33o’] Found SETUP_DIR : /tmp/pip-install-_bg_95nb/homeassistant-pyozw <pyozw_setup.EmbedTemplate object at 0x801f31e80> {‘name’: ‘libopenzwave’, ‘sources’: [‘openzwave-embed/open-zwave-hass/python-openzwave/src-lib/libopenzwave/libopenzwave.cpp’], ‘include_dirs’: [‘src-lib/libopenzwave/’, ‘openzwave-embed/open-zwave-hass/cpp/src’, ‘openzwave-embed/open-zwave-hass/cpp/src/value_classes’, ‘openzwave-embed/open-zwave-hass/cpp/src/platform’, ‘openzwave-embed/open-zwave-hass/cpp/build/linux’], ‘define_macros’: [(‘PY_LIB_VERSION’, ‘0.1.10’), (‘PY_SSIZE_T_CLEAN’, 1), (‘PY_LIB_FLAVOR’, ‘embed’), (‘PY_LIB_BACKEND’, ‘cpp’)], ‘libraries’: [‘usb’, ‘stdc++’], ‘extra_objects’: [‘openzwave-embed/open-zwave-hass/libopenzwave.a’], ‘extra_compile_args’: , ‘extra_link_args’: , ‘language’: ‘c++’} [‘six’, ‘PyDispatcher>=2.0.5’] running bdist_wheel running build running build_openzwave Found g++ : None Found gcc : None Found make : /usr/bin/make Found gmake : None Found cython : None Found pkg-config : None fetching https://raw.githubusercontent.com/home-assistant/python-openzwave/hass/archives/open-zwave-hass-0.1.10.zip into openzwave-embed/open-zwave.zip for version 0.1.10 Clean openzwave in openzwave-embed/open-zwave-hass … be patient … error: [Errno 2] No such file or directory: ‘gmake’ ---------------------------------------- ERROR: Failed building wheel for homeassistant-pyozw ERROR: Command errored out with exit status 1: command: /usr/local/share/homeassistant/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '”‘"’/tmp/pip-install-_bg_95nb/homeassistant-pyozw/setup.py’“'”‘; file=’“'”‘/tmp/pip-install-_bg_95nb/homeassistant-pyozw/setup.py’“'”‘;f=getattr(tokenize, ‘"’“‘open’”’“‘, open)(file);code=f.read().replace(’”‘"’\r\n’“'”‘, ‘"’"’\n’“'”‘);f.close();exec(compile(code, file, ‘"’“‘exec’”’“‘))’ clean --all cwd: /tmp/pip-install-_bg_95nb/homeassistant-pyozw Complete output (8 lines): sysargv [‘/tmp/pip-install-_bg_95nb/homeassistant-pyozw/setup.py’, ‘clean’, ‘–all’] Found SETUP_DIR : /tmp/pip-install-_bg_95nb/homeassistant-pyozw <pyozw_setup.EmbedTemplate object at 0x801f31e80> {‘name’: ‘libopenzwave’, ‘sources’: [‘openzwave-embed/open-zwave-hass/python-openzwave/src-lib/libopenzwave/libopenzwave.cpp’], ‘include_dirs’: [‘src-lib/libopenzwave/’, ‘openzwave-embed/open-zwave-hass/cpp/src’, ‘openzwave-embed/open-zwave-hass/cpp/src/value_classes’, ‘openzwave-embed/open-zwave-hass/cpp/src/platform’, ‘openzwave-embed/open-zwave-hass/cpp/build/linux’], ‘define_macros’: [(‘PY_LIB_VERSION’, ‘0.1.10’), (‘PY_SSIZE_T_CLEAN’, 1), (‘PY_LIB_FLAVOR’, ‘embed’), (‘PY_LIB_BACKEND’, ‘cpp’)], ‘libraries’: [‘usb’, ‘stdc++’], ‘extra_objects’: [‘openzwave-embed/open-zwave-hass/libopenzwave.a’], ‘extra_compile_args’: , ‘extra_link_args’: , ‘language’: ‘c++’} [‘six’, ‘PyDispatcher>=2.0.5’] running clean Clean openzwave in openzwave-embed/open-zwave-hass … be patient … error: [Errno 2] No such file or directory: ‘gmake’ ---------------------------------------- ERROR: Failed cleaning build dir for homeassistant-pyozw ERROR: Command errored out with exit status 1: command: /usr/local/share/homeassistant/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '”‘"’/tmp/pip-install-_bg_95nb/homeassistant-pyozw/setup.py’“'”‘; file=’“'”‘/tmp/pip-install-_bg_95nb/homeassistant-pyozw/setup.py’“'”‘;f=getattr(tokenize, ‘"’“‘open’”’“‘, open)(file);code=f.read().replace(’”‘"’\r\n’“'”‘, ‘"’"’\n’“'”‘);f.close();exec(compile(code, file, ‘"’“‘exec’”’“‘))’ install --record /tmp/pip-record-gontij00/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/share/homeassistant/include/site/python3.8/homeassistant-pyozw cwd: /tmp/pip-install-_bg_95nb/homeassistant-pyozw/ Complete output (16 lines): sysargv [‘/tmp/pip-install-_bg_95nb/homeassistant-pyozw/setup.py’, ‘install’, ‘–record’, ‘/tmp/pip-record-gontij00/install-record.txt’, ‘–single-version-externally-managed’, ‘–compile’, ‘–install-headers’, ‘/usr/local/share/homeassistant/include/site/python3.8/homeassistant-pyozw’] Found SETUP_DIR : /tmp/pip-install-_bg_95nb/homeassistant-pyozw <pyozw_setup.EmbedTemplate object at 0x801f32eb0> {‘name’: ‘libopenzwave’, ‘sources’: [‘openzwave-embed/open-zwave-hass/python-openzwave/src-lib/libopenzwave/libopenzwave.cpp’], ‘include_dirs’: [‘src-lib/libopenzwave/’, ‘openzwave-embed/open-zwave-hass/cpp/src’, ‘openzwave-embed/open-zwave-hass/cpp/src/value_classes’, ‘openzwave-embed/open-zwave-hass/cpp/src/platform’, ‘openzwave-embed/open-zwave-hass/cpp/build/linux’], ‘define_macros’: [(‘PY_LIB_VERSION’, ‘0.1.10’), (‘PY_SSIZE_T_CLEAN’, 1), (‘PY_LIB_FLAVOR’, ‘embed’), (‘PY_LIB_BACKEND’, ‘cpp’)], ‘libraries’: [‘usb’, ‘stdc++’], ‘extra_objects’: [‘openzwave-embed/open-zwave-hass/libopenzwave.a’], ‘extra_compile_args’: , ‘extra_link_args’: , ‘language’: ‘c++’} [‘six’, ‘PyDispatcher>=2.0.5’] running install flavor embed running build_openzwave Found g++ : None Found gcc : None Found make : /usr/bin/make Found gmake : None Found cython : None Found pkg-config : None Clean openzwave in openzwave-embed/open-zwave-hass … be patient … error: [Errno 2] No such file or directory: ‘gmake’ ---------------------------------------- ERROR: Command errored out with exit status 1: /usr/local/share/homeassistant/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '”‘"’/tmp/pip-install-_bg_95nb/homeassistant-pyozw/setup.py’“'”‘; file=’“'”‘/tmp/pip-install-_bg_95nb/homeassistant-pyozw/setup.py’“'”‘;f=getattr(tokenize, ‘"’“‘open’”’“‘, open)(file);code=f.read().replace(’”‘"’\r\n’“'”‘, ‘"’"’\n’“'”‘);f.close();exec(compile(code, file, ‘"’“‘exec’”’"‘))’ install --record /tmp/pip-record-gontij00/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/share/homeassistant/include/site/python3.8/homeassistant-pyozw Check the logs for full command output. WARNING: You are using pip version 20.2.4; however, version 21.0.1 is available. You should consider upgrading via the ‘/usr/local/share/homeassistant/bin/python3.8 -m pip install --upgrade pip’ command.

No problems here

You mention you’re using OpenZwave Beta. I just had a look at the integration’s manifest to confirm that homeassistant-pyozw==0.1.10 is not a requirement.

Were you running the original (now depreciated) Z-Wave integration with this install, before switching to the beta. I believe this package is from that original zwave and no longer required if you are using the beta or the just released Z-Wave JS

You mentioned trying to reinstall. Did you use

service homeassistant reinstall

If this failed, then there is likely something hiding in the configuration (maybe in the .storage) that is triggering an attempt to reinstall homeassistant-pyozw even though it’s no longer needed.


EDIT: Regardless of what’s needed, I have just install homeassistant-pyozw==0.1.10 without issue on 2021.2.2 so I’m not sure why that’s failing. Again, you should not need it but if you wouldn’t mind testing something for me – Please try setting the homeassistant_path and see if that fixes your issue with homeassistant-pyozw

iocage console $_JAIL_NAME
# Press `0` to exit the menu
sysrc homeassistant_path="/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin"
service homeassistant check_config

(running the check_config should try to install homeassistant-pyozw)

1 Like

Ok, looks like I have got it working again by doing a service homeassistant reinstall

What I tried and in this order was:

  • Removing the openzwave beta component before upgrading and then installing it again. But that didn’t work. Fortunately I was able to switch easily go back with: service homeassistant install homeassistant==2021.1.5

  • looked through the files in .storage but didn’t find anything regarding openzwave.

  • I tried the sysrc part you suggested but that didn’t do anything, just finished (see below)

root@homeassistant:~ # sysrc homeassistant_path="/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin"
homeassistant_path:  -> /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
root@homeassistant:~ # service homeassistant check_config
Testing configuration at /home/homeassistant/homeassistant
  • In the end I tried service homeassistant reinstall and clearing the cache option there and that worked.

Thanks for your help again!

1 Like

Thanks for the feedback @wmn79

:thinking: If I set the --no-cache-dir option for pip, I’m pretty sure it would avoid this scenario in the future – However, Home Assistant updates would take longer, I think.

:information_source: Attention Z-Wave users

Z-Wave JS to MQTT - TrueNAS CORE Community Plugin

  • EDIT - please see the OP for details
1 Like