Home Assistant Core -- TrueNAS CORE Community Plugin

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!

[email protected]:~ # 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)

[email protected]:~ # 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
[email protected]:~ # 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

Hi Troy

Thanks for all your great work and support. I am looking for your Z-wave JS plugin, but I can’t find it. Maybe I’m doing something wrong. Can you help me out?

1 Like

You’re not doing anything wrong… I’m actually ahead of this one :smile:

It won’t show up in TrueNAS until this pull request is merged. Probably my fault it’s not there already, I wanted to make a last minute change and I think it’s holding things up.


If you don’t want to wait, you can use some git magic - However, I do feel an obligatory warning is in order… I do this frequently when I’m working on plugins and have never had an issue, but I can not guarantee this will not cause an issue for you – :warning: Using git magic is not officially supported.

OK. It’s not really magic but the warning still applies.

cd /mnt/$ZPOOL/iocage/.plugins/github_com_ix-plugin-hub_iocage-plugin-index_git
git fetch origin master
git checkout origin/master INDEX
git checkout origin/master icons/zwavejs2mqtt.png
git checkout origin/master zwavejs2mqtt.json

After that, go back to the TrueNAS UI, Community Plugins and press REFRESH INDEX – Finally you should see the new plugin

1 Like

Thanks, Troy. I have it installed. and my Z-stick (Aeotec Gen5) is added. Need to connect it with HA… I will get back to you, with updates. If you are interested?
Where is the donate Coffee button?

1 Like

Yes please :smile:

I really do appreciate the offer - If you could give my GitHub repo a star, that would be great.

I don’t think I really do much beyond putting some bash scripts together. The real work is being done by the developers of these great projects we get to install and use. If you would like to buy a coffee, please make your contribution directly to the project developers. Without their work, we would have nothing to install.

@troy Thanks for putting this together!

While I’m very familiar with HA via docker in Unraid, Ubuntu, or Rpi…I just installed your plugin on my first TrueNas yesterday. So I’m stumbling my way through.

From my limited understanding of TrueNas, I need to replicate the host network / privileged option of a docker setup if I run it on the same IP. I’ve tried using NAT but that doesn’t seem to work as I’m not sure how to provide host network / privileged option via NAT. I then messed with the settings and got this working with a static IP, but is this the best method to accomplish this?

So long story short, what’s the best way to implement a non changing IP address, either of the TN box or a static IP?

The easiest way is to use DHCP and set a permanent (static) lease on the DHCP server, usually on your router. Set the lease IP address, stop HA, wait a few seconds then start. HA should have the new address but check it with a network sniffer, like Fing, on your phone.
Edit: don’t use NAT.

1 Like