Home Assistant Core -- TrueNAS CORE Community Plugin

Hi @tebra,

Unfortunately I don’t know how to properly fix this.

There are still two workarounds that might get you by

  1. run homeassistant as root
  2. use custom (previous version) ping integration

You can find information on both options in this issue

Thank you, I take the custom (previous version) ping integration.
Works very good for now.
But there is a log entry telling “Unable to find services.yaml for the old_ping integration”

If anybody is still trying to use the ESPHome plugin on TrueNAS CORE

Tool Manager: Installing platformio/toolchain-xtensa32 @ ~2.50200.0
Error: Could not find the package with 'platformio/toolchain-xtensa32 @ ~2.50200.0' requirements for your system 'freebsd_amd64'

I managed to get an updated version toolchain-xtensa32 compiled using this github repo

EDIT —

And also an updated toolchain-xtensa compiled using this github repo

I uploaded the pre-compiled toolchains to GitHub. Instructions to manually update are in this issue

1 Like

UPDATE on the ESPHome community plugin

By now the updated requirements have made it to the plugin manifest for the 12.2-RELEASE, and I’ve also updated the plugin to use the ESP toolchains I compiled. A clean install of the ESPHome plugin should (at least for now) compile both ESP8266 and ESP32 firmwares out of the box.


For an existing plugin, running a Plugin UPDATE from the TrueNAS UI should also work - but may require some additional steps. If the ESPHome service fails to start after a Plugin UPDATE, you’ll need re-create the ESPHome virtualenv. This can easily be done from the jail’s console menu.

Use number 7 to remove

When the virtualenv is removed, number 7 will change to install

1 Like

Firstly,
Another big thank you for continuing to support the plugins for TrueNAS Core.
I tried to uninstall and install from the menu, but ESPHome webui was unavailable. I then tried uninstall from the plugins menu and re-installed. That worked for me.

Frank

1 Like

@troy So far the plugin was working very well and HA updates from plugin menu worked very well. Until today. When trying to upgrade HA to release 2021.10.0 the process fails at updating cryptography module with the following error:

Building wheels for collected packages: cryptography
  Building wheel for cryptography (PEP 517) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/local/share/homeassistant/bin/python3.8 /usr/local/share/homeassistant/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py build_wheel /tmp/tmp7t48ovwx
       cwd: /tmp/pip-install-7sttgmrm/cryptography
[...]
This package requires Rust >=1.41.0.
  ----------------------------------------
  ERROR: Failed building wheel for cryptography
Failed to build cryptography

Down in the detail log I can see that it fails at finding rust so I tried to install it in the homeassistant venv manually which fails as well. But also I can see that when trying to install rust in 1.41.0 the pip returns message that such version is not available.
Any ideas how to resolve it?

I have also tried to fresh install the plugin on the latest version of TrueNAS and it ends up with the same error. Below the full plugin install log.

Install Notes:

plugin_initialized: -> v6-20210307

plugin_version: -> v6-20210307

homeassistant_umask: -> 002

homeassistant_user: -> homeassistant

homeassistant_group: -> homeassistant

homeassistant_config_dir: -> /home/homeassistant/homeassistant

homeassistant_path: -> /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin

homeassistant_python: -> /usr/local/bin/python3.8

homeassistant_venv: -> /usr/local/share/homeassistant

Collecting wheel

Downloading wheel-0.37.0-py2.py3-none-any.whl (35 kB)

Installing collected packages: wheel

Successfully installed wheel-0.37.0

Collecting homeassistant

Downloading homeassistant-2021.10.0-py3-none-any.whl (14.2 MB)

Collecting aiohttp==3.7.4.post0

Downloading aiohttp-3.7.4.post0.tar.gz (1.1 MB)

Installing build dependencies: started

Installing build dependencies: finished with status 'done'

Getting requirements to build wheel: started

Getting requirements to build wheel: finished with status 'done'

Preparing wheel metadata: started

Preparing wheel metadata: finished with status 'done'

Collecting astral==2.2

Downloading astral-2.2-py2.py3-none-any.whl (30 kB)

Collecting async_timeout==3.0.1

Downloading async_timeout-3.0.1-py3-none-any.whl (8.2 kB)

Collecting attrs==21.2.0

Downloading attrs-21.2.0-py2.py3-none-any.whl (53 kB)

Collecting awesomeversion==21.8.1

Downloading awesomeversion-21.8.1-py3-none-any.whl (12 kB)

Collecting backports.zoneinfo

Downloading backports.zoneinfo-0.2.1.tar.gz (74 kB)

Installing build dependencies: started

Installing build dependencies: finished with status 'done'

Getting requirements to build wheel: started

Getting requirements to build wheel: finished with status 'done'

Preparing wheel metadata: started

Preparing wheel metadata: finished with status 'done'

Collecting bcrypt==3.1.7

Downloading bcrypt-3.1.7.tar.gz (42 kB)

Installing build dependencies: started

Installing build dependencies: finished with status 'done'

Getting requirements to build wheel: started

Getting requirements to build wheel: finished with status 'done'

Preparing wheel metadata: started

Preparing wheel metadata: finished with status 'done'

Collecting certifi>=2021.5.30

Downloading certifi-2021.5.30-py2.py3-none-any.whl (145 kB)

Collecting ciso8601==2.2.0

Downloading ciso8601-2.2.0.tar.gz (18 kB)

Installing build dependencies: started

Installing build dependencies: finished with status 'done'

Getting requirements to build wheel: started

Getting requirements to build wheel: finished with status 'done'

Preparing wheel metadata: started

Preparing wheel metadata: finished with status 'done'

Collecting httpx==0.19.0

Downloading httpx-0.19.0-py3-none-any.whl (77 kB)

Collecting jinja2==3.0.1

Downloading Jinja2-3.0.1-py3-none-any.whl (133 kB)

Collecting PyJWT==2.1.0

Downloading PyJWT-2.1.0-py3-none-any.whl (16 kB)

Collecting cryptography==3.4.8

Downloading cryptography-3.4.8.tar.gz (546 kB)

Installing build dependencies: started

Installing build dependencies: finished with status 'done'

Getting requirements to build wheel: started

Getting requirements to build wheel: finished with status 'done'

Preparing wheel metadata: started

Preparing wheel metadata: finished with status 'done'

Collecting pip<20.3,>=8.0.3

Downloading pip-20.2.4-py2.py3-none-any.whl (1.5 MB)

Collecting python-slugify==4.0.1

Downloading python-slugify-4.0.1.tar.gz (11 kB)

Collecting pyyaml==5.4.1

Downloading PyYAML-5.4.1.tar.gz (175 kB)

Installing build dependencies: started

Installing build dependencies: finished with status 'done'

Getting requirements to build wheel: started

Getting requirements to build wheel: finished with status 'done'

Preparing wheel metadata: started

Preparing wheel metadata: finished with status 'done'

Collecting requests==2.26.0

Downloading requests-2.26.0-py2.py3-none-any.whl (62 kB)

Collecting voluptuous==0.12.2

Downloading voluptuous-0.12.2.tar.gz (48 kB)

Collecting voluptuous-serialize==2.4.0

Downloading voluptuous_serialize-2.4.0-py3-none-any.whl (6.7 kB)

Collecting yarl==1.6.3

Downloading yarl-1.6.3.tar.gz (176 kB)

Installing build dependencies: started

Installing build dependencies: finished with status 'done'

Getting requirements to build wheel: started

Getting requirements to build wheel: finished with status 'done'

Preparing wheel metadata: started

Preparing wheel metadata: finished with status 'done'

Collecting multidict<7.0,>=4.5

Downloading multidict-5.2.0.tar.gz (49 kB)

Installing build dependencies: started

Installing build dependencies: finished with status 'done'

Getting requirements to build wheel: started

Getting requirements to build wheel: finished with status 'done'

Preparing wheel metadata: started

Preparing wheel metadata: finished with status 'done'

Collecting typing-extensions>=3.6.5

Downloading typing_extensions-3.10.0.2-py3-none-any.whl (26 kB)

Collecting chardet<5.0,>=2.0

Downloading chardet-4.0.0-py2.py3-none-any.whl (178 kB)

Collecting pytz

Downloading pytz-2021.3-py2.py3-none-any.whl (503 kB)

Collecting six>=1.4.1

Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)

Collecting cffi>=1.1

Downloading cffi-1.14.6.tar.gz (475 kB)

Collecting rfc3986[idna2008]<2,>=1.3

Downloading rfc3986-1.5.0-py2.py3-none-any.whl (31 kB)

Collecting sniffio

Downloading sniffio-1.2.0-py3-none-any.whl (10 kB)

Collecting httpcore<0.14.0,>=0.13.3

Downloading httpcore-0.13.7-py3-none-any.whl (58 kB)

Collecting charset-normalizer

Downloading charset_normalizer-2.0.6-py3-none-any.whl (37 kB)

Collecting MarkupSafe>=2.0

Downloading MarkupSafe-2.0.1.tar.gz (18 kB)

Collecting text-unidecode>=1.3

Downloading text_unidecode-1.3-py2.py3-none-any.whl (78 kB)

Collecting idna<4,>=2.5

Downloading idna-3.2-py3-none-any.whl (59 kB)

Collecting urllib3<1.27,>=1.21.1

Downloading urllib3-1.26.7-py2.py3-none-any.whl (138 kB)

Collecting pycparser

Downloading pycparser-2.20-py2.py3-none-any.whl (112 kB)

Collecting anyio==3.*

Downloading anyio-3.3.2-py3-none-any.whl (78 kB)

Collecting h11<0.13,>=0.11

Downloading h11-0.12.0-py3-none-any.whl (54 kB)

Building wheels for collected packages: aiohttp, bcrypt, ciso8601, cryptography, python-slugify, pyyaml, voluptuous, yarl, cffi, MarkupSafe, multidict, backports.zoneinfo

Building wheel for aiohttp (PEP 517): started

Building wheel for aiohttp (PEP 517): finished with status 'done'

Created wheel for aiohttp: filename=aiohttp-3.7.4.post0-cp38-cp38-freebsd_12_2_release_p10_amd64.whl size=655487 sha256=e2074326405a8d1a44b04cb0e9c4b24e62a221eb71e98cd8c6031cab651597ef

Stored in directory: /tmp/pip-ephem-wheel-cache-9ffewl3s/wheels/70/a6/74/e3ee8e169262359ed1d452bdfbe82e6420aa40ccfc2d727126

Building wheel for bcrypt (PEP 517): started

Building wheel for bcrypt (PEP 517): finished with status 'done'

Created wheel for bcrypt: filename=bcrypt-3.1.7-cp38-cp38-freebsd_12_2_release_p10_amd64.whl size=33910 sha256=6e76f787586d84ee6517ea1254e23c577141ce988cea48b9fbf11cab4dfa4845

Stored in directory: /tmp/pip-ephem-wheel-cache-9ffewl3s/wheels/08/dd/04/63fe9a4002c36105c358f90221e4882825a264edb9d8554163

Building wheel for ciso8601 (PEP 517): started

Building wheel for ciso8601 (PEP 517): finished with status 'done'

Created wheel for ciso8601: filename=ciso8601-2.2.0-cp38-cp38-freebsd_12_2_release_p10_amd64.whl size=14400 sha256=fb1beffd4586af1d4174a613b006162645ecfff04a1d3106ce99a643aff2ab0a

Stored in directory: /tmp/pip-ephem-wheel-cache-9ffewl3s/wheels/43/60/a0/19cfc2653f825144b434d455710d205ce1f80cdb498e202391

Building wheel for cryptography (PEP 517): started

Building wheel for cryptography (PEP 517): finished with status 'error'

Building wheel for cryptography (PEP 517): finished with status 'error'

ERROR: Command errored out with exit status 1:

command: /usr/local/share/homeassistant/bin/python3.8 /usr/local/share/homeassistant/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py build_wheel /tmp/tmpg1faoexz

cwd: /tmp/pip-install-unkw18pm/cryptography_a937159bdf8d46de9496eaf129a02a93

Complete output (165 lines):

running bdist_wheel

running build

running build_py

creating build

creating build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8

creating build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography

copying src/cryptography/__about__.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography

copying src/cryptography/fernet.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography

copying src/cryptography/utils.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography

copying src/cryptography/__init__.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography

copying src/cryptography/exceptions.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography

creating build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/x509

copying src/cryptography/x509/name.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/x509

copying src/cryptography/x509/extensions.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/x509

copying src/cryptography/x509/__init__.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/x509

copying src/cryptography/x509/ocsp.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/x509

copying src/cryptography/x509/base.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/x509

copying src/cryptography/x509/certificate_transparency.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/x509

copying src/cryptography/x509/oid.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/x509

copying src/cryptography/x509/general_name.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/x509

creating build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/hazmat

copying src/cryptography/hazmat/_types.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/hazmat

copying src/cryptography/hazmat/_oid.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/hazmat

copying src/cryptography/hazmat/__init__.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/hazmat

copying src/cryptography/hazmat/_der.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/hazmat

creating build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/hazmat/primitives

copying src/cryptography/hazmat/primitives/poly1305.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/hazmat/primitives

copying src/cryptography/hazmat/primitives/_cipheralgorithm.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/hazmat/primitives

copying src/cryptography/hazmat/primitives/keywrap.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/hazmat/primitives

copying src/cryptography/hazmat/primitives/_serialization.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/hazmat/primitives

copying src/cryptography/hazmat/primitives/padding.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/hazmat/primitives

copying src/cryptography/hazmat/primitives/hmac.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/hazmat/primitives

copying src/cryptography/hazmat/primitives/hashes.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/hazmat/primitives

copying src/cryptography/hazmat/primitives/cmac.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/hazmat/primitives

copying src/cryptography/hazmat/primitives/__init__.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/hazmat/primitives

copying src/cryptography/hazmat/primitives/constant_time.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/hazmat/primitives

copying src/cryptography/hazmat/primitives/_asymmetric.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/hazmat/primitives

creating build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/hazmat/backends

copying src/cryptography/hazmat/backends/interfaces.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/hazmat/backends

copying src/cryptography/hazmat/backends/__init__.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/hazmat/backends

creating build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/hazmat/bindings

copying src/cryptography/hazmat/bindings/__init__.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/hazmat/bindings

creating build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/hazmat/primitives/serialization

copying src/cryptography/hazmat/primitives/serialization/__init__.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/hazmat/primitives/serialization

copying src/cryptography/hazmat/primitives/serialization/base.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/hazmat/primitives/serialization

copying src/cryptography/hazmat/primitives/serialization/pkcs12.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/hazmat/primitives/serialization

copying src/cryptography/hazmat/primitives/serialization/pkcs7.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/hazmat/primitives/serialization

copying src/cryptography/hazmat/primitives/serialization/ssh.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/hazmat/primitives/serialization

creating build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/hazmat/primitives/kdf

copying src/cryptography/hazmat/primitives/kdf/kbkdf.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/hazmat/primitives/kdf

copying src/cryptography/hazmat/primitives/kdf/__init__.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/hazmat/primitives/kdf

copying src/cryptography/hazmat/primitives/kdf/concatkdf.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/hazmat/primitives/kdf

copying src/cryptography/hazmat/primitives/kdf/hkdf.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/hazmat/primitives/kdf

copying src/cryptography/hazmat/primitives/kdf/pbkdf2.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/hazmat/primitives/kdf

copying src/cryptography/hazmat/primitives/kdf/x963kdf.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/hazmat/primitives/kdf

copying src/cryptography/hazmat/primitives/kdf/scrypt.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/hazmat/primitives/kdf

creating build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/hazmat/primitives/ciphers

copying src/cryptography/hazmat/primitives/ciphers/aead.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/hazmat/primitives/ciphers

copying src/cryptography/hazmat/primitives/ciphers/modes.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/hazmat/primitives/ciphers

copying src/cryptography/hazmat/primitives/ciphers/base.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/hazmat/primitives/ciphers

copying src/cryptography/hazmat/primitives/ciphers/algorithms.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/hazmat/primitives/ciphers

copying src/cryptography/hazmat/primitives/ciphers/__init__.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/hazmat/primitives/ciphers

creating build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/hazmat/primitives/asymmetric

copying src/cryptography/hazmat/primitives/asymmetric/dsa.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/hazmat/primitives/asymmetric

copying src/cryptography/hazmat/primitives/asymmetric/dh.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/hazmat/primitives/asymmetric

copying src/cryptography/hazmat/primitives/asymmetric/x448.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/hazmat/primitives/asymmetric

copying src/cryptography/hazmat/primitives/asymmetric/utils.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/hazmat/primitives/asymmetric

copying src/cryptography/hazmat/primitives/asymmetric/x25519.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/hazmat/primitives/asymmetric

copying src/cryptography/hazmat/primitives/asymmetric/__init__.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/hazmat/primitives/asymmetric

copying src/cryptography/hazmat/primitives/asymmetric/rsa.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/hazmat/primitives/asymmetric

copying src/cryptography/hazmat/primitives/asymmetric/ec.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/hazmat/primitives/asymmetric

copying src/cryptography/hazmat/primitives/asymmetric/ed25519.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/hazmat/primitives/asymmetric

copying src/cryptography/hazmat/primitives/asymmetric/ed448.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/hazmat/primitives/asymmetric

copying src/cryptography/hazmat/primitives/asymmetric/padding.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/hazmat/primitives/asymmetric

creating build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/hazmat/primitives/twofactor

copying src/cryptography/hazmat/primitives/twofactor/utils.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/hazmat/primitives/twofactor

copying src/cryptography/hazmat/primitives/twofactor/hotp.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/hazmat/primitives/twofactor

copying src/cryptography/hazmat/primitives/twofactor/__init__.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/hazmat/primitives/twofactor

copying src/cryptography/hazmat/primitives/twofactor/totp.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/hazmat/primitives/twofactor

creating build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/hazmat/backends/openssl

copying src/cryptography/hazmat/backends/openssl/dsa.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/hazmat/backends/openssl

copying src/cryptography/hazmat/backends/openssl/ed25519.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/hazmat/backends/openssl

copying src/cryptography/hazmat/backends/openssl/ec.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/hazmat/backends/openssl

copying src/cryptography/hazmat/backends/openssl/backend.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/hazmat/backends/openssl

copying src/cryptography/hazmat/backends/openssl/hmac.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/hazmat/backends/openssl

copying src/cryptography/hazmat/backends/openssl/ciphers.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/hazmat/backends/openssl

copying src/cryptography/hazmat/backends/openssl/x448.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/hazmat/backends/openssl

copying src/cryptography/hazmat/backends/openssl/ocsp.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/hazmat/backends/openssl

copying src/cryptography/hazmat/backends/openssl/poly1305.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/hazmat/backends/openssl

copying src/cryptography/hazmat/backends/openssl/x25519.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/hazmat/backends/openssl

copying src/cryptography/hazmat/backends/openssl/ed448.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/hazmat/backends/openssl

copying src/cryptography/hazmat/backends/openssl/rsa.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/hazmat/backends/openssl

copying src/cryptography/hazmat/backends/openssl/decode_asn1.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/hazmat/backends/openssl

copying src/cryptography/hazmat/backends/openssl/dh.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/hazmat/backends/openssl

copying src/cryptography/hazmat/backends/openssl/x509.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/hazmat/backends/openssl

copying src/cryptography/hazmat/backends/openssl/cmac.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/hazmat/backends/openssl

copying src/cryptography/hazmat/backends/openssl/hashes.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/hazmat/backends/openssl

copying src/cryptography/hazmat/backends/openssl/aead.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/hazmat/backends/openssl

copying src/cryptography/hazmat/backends/openssl/utils.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/hazmat/backends/openssl

copying src/cryptography/hazmat/backends/openssl/__init__.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/hazmat/backends/openssl

copying src/cryptography/hazmat/backends/openssl/encode_asn1.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/hazmat/backends/openssl

creating build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/hazmat/bindings/openssl

copying src/cryptography/hazmat/bindings/openssl/__init__.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/hazmat/bindings/openssl

copying src/cryptography/hazmat/bindings/openssl/_conditional.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/hazmat/bindings/openssl

copying src/cryptography/hazmat/bindings/openssl/binding.py -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography/hazmat/bindings/openssl

running egg_info

writing src/cryptography.egg-info/PKG-INFO

writing dependency_links to src/cryptography.egg-info/dependency_links.txt

writing requirements to src/cryptography.egg-info/requires.txt

writing top-level names to src/cryptography.egg-info/top_level.txt

reading manifest file 'src/cryptography.egg-info/SOURCES.txt'

reading manifest template 'MANIFEST.in'

no previously-included directories found matching 'docs/_build'

warning: no previously-included files found matching 'vectors'

warning: no previously-included files matching '*' found under directory 'vectors'

warning: no previously-included files matching '*' found under directory '.github'

warning: no previously-included files found matching 'release.py'

warning: no previously-included files found matching '.coveragerc'

warning: no previously-included files found matching 'codecov.yml'

warning: no previously-included files found matching '.readthedocs.yml'

warning: no previously-included files found matching 'dev-requirements.txt'

warning: no previously-included files found matching 'tox.ini'

warning: no previously-included files found matching 'mypy.ini'

warning: no previously-included files matching '*' found under directory '.zuul.d'

warning: no previously-included files matching '*' found under directory '.zuul.playbooks'

adding license file 'LICENSE'

adding license file 'LICENSE.APACHE'

adding license file 'LICENSE.BSD'

adding license file 'LICENSE.PSF'

writing manifest file 'src/cryptography.egg-info/SOURCES.txt'

copying src/cryptography/py.typed -> build/lib.freebsd-12.2-RELEASE-p10-amd64-3.8/cryptography

running build_ext

generating cffi module 'build/temp.freebsd-12.2-RELEASE-p10-amd64-3.8/_padding.c'

creating build/temp.freebsd-12.2-RELEASE-p10-amd64-3.8

generating cffi module 'build/temp.freebsd-12.2-RELEASE-p10-amd64-3.8/_openssl.c'

running build_rust

=============================DEBUG ASSISTANCE=============================

If you are seeing a compilation error please try the following steps to

successfully install cryptography:

1) Upgrade to the latest pip and try again. This will fix errors for most

users. See: https://pip.pypa.io/en/stable/installing/#upgrading-pip

2) Read https://cryptography.io/en/latest/installation.html for specific

instructions for your platform.

3) Check our frequently asked questions for more information:

https://cryptography.io/en/latest/faq.html

4) Ensure you have a recent Rust toolchain installed:

https://cryptography.io/en/latest/installation.html#rust

5) If you are experiencing issues with Rust for *this release only* you may

set the environment variable `CRYPTOGRAPHY_DONT_BUILD_RUST=1`.

=============================DEBUG ASSISTANCE=============================

error: can't find Rust compiler

If you are using an outdated pip version, it is possible a prebuilt wheel is available for this package but pip is not able to install from it. Installing from the wheel would avoid the need for a Rust compiler.

To update pip, run:

pip install --upgrade pip

and then retry package installation.

If you did intend to build this package from source, try installing a Rust compiler from your system package manager and ensure it is on the PATH during installation. Alternatively, rustup (available at https://rustup.rs) is the recommended way to download and update the Rust compiler toolchain.

This package requires Rust >=1.41.0.

----------------------------------------

Building wheel for cryptography (PEP 517): finished with status 'error'

ERROR: Failed building wheel for cryptography

Building wheel for python-slugify (setup.py): started

ERROR: Failed building wheel for cryptography

Building wheel for python-slugify (setup.py): finished with status 'done'

ERROR: Failed building wheel for cryptography

Created wheel for python-slugify: filename=python_slugify-4.0.1-py2.py3-none-any.whl size=6769 sha256=394be10099a1acd913860d116f245f7b1bdb37f09f2dc84b424245e62aabda61

Stored in directory: /tmp/pip-ephem-wheel-cache-9ffewl3s/wheels/91/4d/4f/e740a68c215791688c46c4d6251770a570e8dfea91af1acb5c

ERROR: Failed building wheel for cryptography

Building wheel for pyyaml (PEP 517): started

ERROR: Failed building wheel for cryptography

Building wheel for pyyaml (PEP 517): finished with status 'done'

ERROR: Failed building wheel for cryptography

Created wheel for pyyaml: filename=PyYAML-5.4.1-cp38-cp38-freebsd_12_2_release_p10_amd64.whl size=45670 sha256=5ffb8dc253e98f78786a21235d74379d1cace768ea3bd8de0523e18dff8994f1

ERROR: Failed building wheel for cryptography

Stored in directory: /tmp/pip-ephem-wheel-cache-9ffewl3s/wheels/dd/c5/1d/5d7436173d3efd4a14dcb510eb0b29525ecb6b0e41489e716e

ERROR: Failed building wheel for cryptography

Building wheel for voluptuous (setup.py): started

ERROR: Failed building wheel for cryptography

Building wheel for voluptuous (setup.py): finished with status 'done'

ERROR: Failed building wheel for cryptography

Created wheel for voluptuous: filename=voluptuous-0.12.2-py3-none-any.whl size=29551 sha256=4f9c0ab42a6d462cd67e3e929666f28313f7f4a1ea3ccd84a4164ed16921c9dc

ERROR: Failed building wheel for cryptography

Stored in directory: /tmp/pip-ephem-wheel-cache-9ffewl3s/wheels/63/c0/d7/d09babb5ec150707e09d6cabd2850c2ab322b3fb37b3081511

ERROR: Failed building wheel for cryptography

Building wheel for yarl (PEP 517): started

ERROR: Failed building wheel for cryptography

Building wheel for yarl (PEP 517): finished with status 'done'

ERROR: Failed building wheel for cryptography

Created wheel for yarl: filename=yarl-1.6.3-cp38-cp38-freebsd_12_2_release_p10_amd64.whl size=126659 sha256=b76649aa3c5eb16c088defde1218020e5634002671d52b29dbf15878ee159fd1

ERROR: Failed building wheel for cryptography

Stored in directory: /tmp/pip-ephem-wheel-cache-9ffewl3s/wheels/03/1d/d3/9693ea3024088fd2555f0cdbb42cb6b133e389a8e68502f85f

ERROR: Failed building wheel for cryptography

Building wheel for cffi (setup.py): started

ERROR: Failed building wheel for cryptography

Building wheel for cffi (setup.py): finished with status 'done'

ERROR: Failed building wheel for cryptography

Created wheel for cffi: filename=cffi-1.14.6-cp38-cp38-freebsd_12_2_release_p10_amd64.whl size=181707 sha256=e34142f9e237b45122537db811e5af610e432a2517cedc769c5b99157bbca665

ERROR: Failed building wheel for cryptography

Stored in directory: /tmp/pip-ephem-wheel-cache-9ffewl3s/wheels/21/a9/81/c074a48686fe8c1ffada1f9e5f53b553c0f766503c0b991c23

ERROR: Failed building wheel for cryptography

Building wheel for MarkupSafe (setup.py): started

ERROR: Failed building wheel for cryptography

Building wheel for MarkupSafe (setup.py): finished with status 'done'

ERROR: Failed building wheel for cryptography

Created wheel for MarkupSafe: filename=MarkupSafe-2.0.1-cp38-cp38-freebsd_12_2_release_p10_amd64.whl size=15220 sha256=cc7479f2756bd87c353e16491824e4182d11c324110b512591bdd358c93cd8b2

ERROR: Failed building wheel for cryptography

Stored in directory: /tmp/pip-ephem-wheel-cache-9ffewl3s/wheels/fd/ac/52/de22dc1b1f975843caa5d0e8c817618b816345617c1b01039b

ERROR: Failed building wheel for cryptography

Building wheel for multidict (PEP 517): started

ERROR: Failed building wheel for cryptography

Building wheel for multidict (PEP 517): finished with status 'done'

ERROR: Failed building wheel for cryptography

Created wheel for multidict: filename=multidict-5.2.0-cp38-cp38-freebsd_12_2_release_p10_amd64.whl size=48701 sha256=0b239ad5f4af584c87f8f96db6068f20591afbdd46dce9a4926fea909537632c

ERROR: Failed building wheel for cryptography

Stored in directory: /tmp/pip-ephem-wheel-cache-9ffewl3s/wheels/cb/1d/38/bdfe293de7fdfdd2a0bd91c93059ffd2eb3f747a63d6018629

ERROR: Failed building wheel for cryptography

Building wheel for backports.zoneinfo (PEP 517): started

ERROR: Failed building wheel for cryptography

Building wheel for backports.zoneinfo (PEP 517): finished with status 'done'

ERROR: Failed building wheel for cryptography

Created wheel for backports.zoneinfo: filename=backports.zoneinfo-0.2.1-cp38-cp38-freebsd_12_2_release_p10_amd64.whl size=37306 sha256=63aafdccd43827dea26a246c9771c13546f49191087c87758a0ecb7a9808744f

ERROR: Failed building wheel for cryptography

Stored in directory: /tmp/pip-ephem-wheel-cache-9ffewl3s/wheels/c7/de/cc/c405827ed64f81b56142f1e0075a970b2731b00d21983d54fb

ERROR: Failed building wheel for cryptography

Successfully built aiohttp bcrypt ciso8601 python-slugify pyyaml voluptuous yarl cffi MarkupSafe multidict backports.zoneinfo

ERROR: Failed building wheel for cryptography

Failed to build cryptography

ERROR: Could not build wheels for cryptography which use PEP 517 and cannot be installed directly

homeassistant_enable: -> YES

ERROR: Could not build wheels for cryptography which use PEP 517 and cannot be installed directly

homeassistant_enable: -> YES

/usr/local/etc/rc.d/homeassistant: ERROR: /usr/local/share/homeassistant/bin/hass is not found or is not executable

/usr/local/etc/rc.d/homeassistant: ERROR: /usr/local/share/homeassistant/bin/hass is not found or is not executable

Admin Portal:

http://10.144.1.112:8123

Doc URL:

https://github.com/tprelog/iocage-homeassistant/wiki

@adorobis – I think you’ll need to install rust in the jail itself, not directly in the virtualenv.

Please try the following

iocage console $JAIL_NAME
# press 0 to exit menu
pkg install rust

Now you should be able to restart the menu and try again to upgrade Home Assistant.
The command to restart the menu is simple - menu

Please let me know if this works.

1 Like

Yeah, I’ve just realised that rust is not a python package… And bingo! now the upgrade was successful :slight_smile:
Many thanks! Probably the plugin will have to be updated to include rust now.

1 Like
1 Like

Worked perfectly, thanks Troy.

1 Like

Hello, thank you very much for your guide on the plugin.

PS: I am a noob on FreeBSD, TrueNAS and jails.

The installation isn’t working on my server. The plugin installs fine but the management page does not show up. Running service homeassistant start on the jail shell gives me this error : /usr/local/etc/rc.d/homeassistant: ERROR: /usr/local/share/homeassistant/bin/hass is not found or is not executable

The file /usr/local/share/homeassistant/bin/hass doesn’t exist and installing AppDaemon and the Configurator through the Console Menu didn’t help.
The only thing from the guide I did different was the jail DHCP, which I turned off and set as a static IP, however I think this shouldn’t cause a problem.

Thank you for your much appreciated help.

Hi @davifah – Sorry for the trouble

Currently there is a missing dependency in the plugin manifest.

I have just pushed a temporary fix for the plugin installation, please try the install again and let me know if it works. Thanks

It works now, thank you

1 Like

Thanks @adorobis for reporting another missing requirement - libjpeg-turbo

Quick recap - if your trying to upgrade to Home Assistant 2021.10, there are two packages you’ll need to install before the upgrade is successful.

iocage console $JAIL_NAME
# press 0 to exit menu
pkg install -y rust libjpeg-turbo 

These packages have been added to the plugin manifest in the master branch at https://github.com/ix-plugin-hub/iocage-plugin-index - However they will still need to be merged with the 12.2-RELEASE branch before a Plugin UPDATE will install them.


NOTE about manually installing packages in a plugin jail

So how iocage handles Plugin UPDATES is that it completely removes all packages from the jail on update and then installs them new. This means if you manually install any packages in your jail they will be removed during the Plugin UPDATE and will not be reinstalled.

Some time ago, I added a workaround so users can install extra packages not included in the manifest and preserve them though a Plugin UPDATE. This workaround has never been documented before

Here’s how it works.

This is done inside the jail - For any additional packages you would like to have installed in your jail, you can create a pkglist. The pgklist is simply a text file containing on package per line. When created, there are two remaining steps to follow

  • Use sysrc plugin_pkglist="/path/to/pkglist" to set a pkglist
  • Use sysrc plugin_enable_pkglist=YES to enable

You do not need to implement this workaround for rust or libjpeg-turbo since they will be added to plugin manifest but I figure now is a good time to mention this, since I have not done so before

1 Like

Thanks @troy or sharing that info on jail updates! I have quite a few packages installed on the HA jail which are not part of the HA requirements. I’m hesitating to update jail the plugin and jail from the plugin menu, what would be your recommendation on when to do it? With every TrueNAS major update?

This is a great question but one that’s not so easy to answer because I (or any plugin maintainer) really don’t have full control over the process.

One quick example - When you run a Plugin UPDATE the artifact repo is cloned first, then the pre_updates.sh script is run before anything else - Since the repo was cloned first, a Plugin UPDATE will always run the most recent version of the pre_update.sh script – However a Jail UPGRADE does not clone the repo until after the upgrade has completed so the pre_update.sh could be outdated or even missing all together.

It would take me a month of Sundays to lay it all out in detail so let’s just say for now, there are differences in the way Plugin UPDATES and Jail UPGRADES are handled by TrueNAS.


I think a Jail UPGRADE should only be needed when a Plugin UPDATE fails as seen below

image

In reality, it’s pretty hard to break the underlying jail and this plugin has several undocumented ways to reinstall Home Assistant, but troubleshooting takes time and often requires multiple attempts to get everything working again – Honestly, I think a Jail UPGRADE is more trouble than it’s worth.

I recommend users just reinstall the plugin instead. If you’re using an external dataset for the configuration, this should be rather trivial.


For a Plugin UPDATE… The more I think about it, the harder it is to answer. On one hand, even if the plugin manifest and artifact repo have not changed, regular plugin updates will keep system packages up to date. On the other hand, if that update includes a python point release (from 3.8.5 to 3.8.6) you should rebuild all the virtualenv to take advantage of any optimisations or bug fixes. In other words, they may continue to work, but you really should reinstall them.

There’s already some options for re-installing or upgrading Home Assistant during a Plugin UPDATE. I can trigger these as needed, or they can be enabled by users for every Plugin UPDATE.

clean-install will delete the existing, then re-install Home Assistant to a new virtualenv

  • Use sysrc plugin_clean_install_service=YES to enable

force-reinstall will re-install Home Assistant to the existing virtualenv

  • Use sysrc plugin_force_reinstall_service=YES to enable

upgrade will update Home Assistant

  • Use sysrc plugin_upgrade_service=YES to enable

They are checked in the order listed above. Only the first enabled action will be taken. Depending on the server hardware combined with the number of integration you’re using, it can take anywhere from just a few minutes to almost an hour to completely reinstall Home Assistant and all your integrations.

Thinking about it now, I need to add an option that updates the plugin overlay, without relying on a Plugin UPDATE - This would allow to at least keep the main files I provide up to date.

At that point, I would suggest to enable clean-install and run a Plugin UPDATE every 3-6 months, depending on how long it takes. At minimum everyone needs to clean-install Home Assistant about once per year, that is when the minor python version is changed (say from 3.8 to 3.9)

I think for the slowest servers or if you’re only updating to meet minimum python requirements, I would recommend to just reinstall this plugin on the about yearly basis.


Fortunately, TrueNAS will always take a snapshot of your plugin before a Plugin UPDATE (or Jail UPGRADE). You can see this clearly when updating a plugin using the TrueNAS console.

iocage update ha-example

Snapshot: tank/iocage/jails/[email protected]_update_12.2-RELEASE-p10_2021-10-09_10-07-14 created.
Updating plugin...

If this update failed or in some way breaks Home Assistant you can usually just rollback the snapshot.

iocage stop ha-example
 ...
iocage rollback ha-example -n ioc_update_12.2-RELEASE-p10_2021-10-09_10-07-14

This will destroy ALL data created including ALL snapshots taken after the snapshot ioc_update_12.2-RELEASE-p10_2021-10-09_10-07-14

Are you sure? [y/N]: y
Rolled back to: tank/iocage/jails/ha-example

Also worth mentioning here, any TrueNAS plugin can be exported to a zip file. If you’re planning to re-install, this is a good way to backup a plugin before its destroyed.

iocage export ha-example

Exporting dataset: tank/iocage/jails/ha-example
Exporting dataset: tank/iocage/jails/ha-example/root

Preparing compressed file: /mnt/tank/iocage/images/ha-example_2021-10-09.zip.

Exported: /mnt/tank/iocage/images/ha-example_2021-10-09.zip

Keep in mind, if you are using a separate dataset for your configuration (as I recommend) it will not be deleted when you destroy the plugin, This also means it will not be included in either the snapshot or exported zip backup shown above. With that in mind, I suggest taking separate snapshots of your configuration on a regular basis, and especially before a Plugin UPDATE

1 Like

Probably in the next month or two, I’ll need to update this plugin to use python 3.9. Since my last reply I’m thinking about some other small improvements I can make.

As I mentioned earlier, there’s a way to ensure FreeBSD packages get reinstalled after an update. But there is nothing to get your packages installed if you reinstall the plugin.

Here’s a quick way to that manually

First command will create a pkglist. This will contain packages from the manifest and those you installed. You can use this as is, or edit and delete any packages you did not install yourself. The second command will reinstall the packages from the list.

pkg prime-list > pkglist
cat pkglist | xargs pkg install -y

Have you installed additional python packages inside any of the virtualenv ?

I, for one, am intrigued. Which other packages have you installed in HA and for what purpose?

@troy Many thanks for comprehensive explanation. Need to find some time to try the plugin update, good to know that standard snapshots are enough to restore it in case the update fails.
Regarding python packages - yes I have a few installed in HA venv as well as in another venv I’ve created in the same jail (I could actually consider moving it to a separate jail). But there is not many of them and I should be good to install them manually after plugin update (they show up in HA log immediately if missing).