Commented out the config path and she started up. Thanks Troy. Have a great weekend.
Sorry to be a pain, Troy, but Iâve just discovered that Appdaemon wonât run in my new TrueNAS install. Have tried upgrading it, restarting etc. Refuses to run. Any ideas? Could it be related to new folder locations, Python versions?
Happy Cake Day @axg20202
I donât think itâs Python. Maybe the config path has not been set correctly.
Whatâs the current settings ?
sysrc -a | grep ^appdaemon
Whatâs in the logs ?
cat /var/log/appdaemon_daemon.log
Cake day?
appdaemon_config_dir: /home/hass/appdaemon/conf
appdaemon_enable: yes
appdaemon_group: hass
appdaemon_python: /usr/local/bin/python3.8
appdaemon_umask: 002
appdaemon_user: hass
appdaemon_venv: /srv/appdaemon
The log command was file not found.
EDIT: Correction, the log command returns the following:
Traceback (most recent call last):
File "/srv/appdaemon/bin/appdaemon", line 5, in <module>
from appdaemon.__main__ import main
File "/srv/appdaemon/lib/python3.7/site-packages/appdaemon/__main__.py", line 23, in <module>
import appdaemon.http as adhttp
File "/srv/appdaemon/lib/python3.7/site-packages/appdaemon/http.py", line 12, in <module>
import bcrypt
File "/srv/appdaemon/lib/python3.7/site-packages/bcrypt/__init__.py", line 25, in <module>
from . import _bcrypt
ImportError: Shared object "libffi.so.6" not found, required by "_cffi_backend.so"
You have by your name, itâs the anniversary you joined the forum.
Please try reinstalling appdaemon using the menu.
From the console menu
- 3
is appdaemon - then use 8
to remove it.
When appdaemon has been removed number 8
will change to install
.
If it still wonât start, please share new results
sysrc -a | grep ^appdaemon
cat /var/log/appdaemon_daemon.log
ahah, wondered what you were on about there . And what a lovely year it has been! If this year were a dog, Iâd have it put down. Thanks for your help, Troy, and sorry this was such a trivial thing. Looks like the reinstall got it running. After some head scratching I realised I needed to reinstall some Appdaemon apps too. All working now. Cheers!
TrueNAS Upgrade
Hello Troy - I love this plugin and have been using it for most of 2020.
When 118.2 came along though it did throw up a few issues for me. The 11.3 based plugin didnât like the upgrade due to OpenSSL and Python 3.8. I tried various upgrade methods suggested on this forum and the FreeNAS forum, none of them worked so I tried to upgrade the jail and the plugin to TrueNAS 12.0-RELEASE. I also destroyed the custom ruleset script but, although the upgraded Home Assistant ran fine, it would not talk to the Z-wave controller. At this point I created a new jail / plugin. The new plugin talked to my Z-wave controller straight away. I then copied my config files from âold jailâ/home/hass to ânew jailâ/home/homeassistant. Again this worked pretty well. I had to reconfigure many of the Z-wave devices but I figured this was my fault when trying to make the upgraded jail work (could someone explain where Z-wave configs are stored because it baffles me?). There was one snafu that I need help with however. When the new GUI comes up on the new jail, the Configurator link, on the left hand panel, points to the IP address of the old jail. As you can imagine this caused me several hours of confusion when my changes had no effect!! The Configurator is working fine because I can access it by going to directly port 3218 in a new tab. I would just like to edit the link in the main GUI. Also if anyone could do a guide to upgrading from FreeNAS to TrueNAS without tears, that would be great
Hi @Dabbler
Sorry for the trouble. Basically the 11.3-RELEASE has past itâs EOL date. This makes it difficult trying to install or update anything.
The TrueNAS plugin is able to create the ruleset from the plugin manifest The location of the Z-Wave config depends on which integration you are using. The original Z-Wave ( 1.4 ) component stores its config inside the homeassistant configuration directory (same directory you find the configuration.yaml
) â The new OpenZwave Beta ( 1.6 ) integration store itâs config files inside the docker container or jail itâs running from.
Configurator is added to the side panel using an iframe that has been configured in homeassistant/packages/freenas_plugin.yaml
-Just edit this file, changing the ip-address to match your new jail. ( and restart HA to take effect )
Speaking about the host itself, from FreeNAS to TrueNAS, I donât know if Iâve seen a guide.
In my case, I just switched to the TrueNAS-12.0-STABLE train, then upgraded as normal. - After upgrading the host to TrueNAS, any plugin can be upgraded from the TrueNAS console using
iocage upgrade $_JAIL_NAME
For the Home Assistant plugin, I have started a wiki page to help
Plugin Upgrade from FreeNAS to TrueNAS Core
I installed the plugin on TrueNAS, and everything worked perfectly
I was also able to add HACS easily
So first let me start by thanking you for the terrific plugin
I understand that supervised and hass.io menus are not available with this jail/iocage setup
What are the implications regarding the home assistant functionality?
Most tutorials / posts start by directing to the addons store which is not available in my setup
as a concrete example how would I add the visual code addon?
Technically, not many but you picked a great example with VS-Code.
An add-on is a Docker container with tweaks to allow it to be configured in the Supervisor UI.
However, not having this convenience, can make things more complicated. Since there are no Addons, we must install extra software ourselves and configure it to work with Home Assistant. For an easy example, lets use Mosquitto (MQTT broker). Since there is no addons, you could instead install the TrueNAS plugin for Mosquitto. Or you could manually create your own jail and install Mosquitto. You could also setup a raspberry pi with docker, and run mosquitto from there or a âbare metal installâ. Basically, no addons means we are responsible for installing any additional software on are own, however we see fit.
This one however is not possible, at least not yet.
There is an open issue requesting remote editing support on FreeBSD.
Now thatâs not to say you can not use VS-Code, it just means that you can not include it to the side panel of Home Assistant. In other words, youâll need to run VS-Code on your laptop or desktop computer. To remotely access your HA configuration for editing, there are at least two options
- Share the HA configuration directory using samba, then edit files using network share.
- Enable ssh inside the HA jail, then connect with VS-Code using the
SSH FS
extension.
In both cases, In the first case, you can still use the Home Assistant Config Helper in VS-Code.
Either method is fairly easy to setup. Iâve not used the ssh access for long, but I think it might be easier to setup. ( EDIT: I just realized the Home Assistant Config Helper does not seem to work over this ssh connection ) I did create a new user for ssh but I did not need to mess with file permissions. I will try to help you with either setup you choose.
ugh I was wrong. the Home Assistant Config Helper in VS-Code only works (for me) when accessing the configuration over the samba share
thanks for your prompt reply
please provide more detailed instructions on sharing the required directories using samba so that I can use vs code (when I finally get all my devices integrated and start writing automations)
additionally, I installed the mosquitto plugin. how do I integrate it with home assistant
Iâd appreciate links to examples of adding âstore/addonsâ and âhacs/integrationsâ using the home assistant core plugin, as well as some recommended addons to get me started
finally, are there guides to discover a protocol of an iot device (e.g. a curtain switch or thermostat) which is not currently recognized by home assistant and develop an the missing interface. moreover, these devices usually connect directly to an app (and who knows to what other cloud provider), is there a way to block these communication (other than the suggestions of replacing my whole network to ubiquiti unifi with separate vlans)
Most of your questions can be answered by reading Troyâs excellent github page.
I am assuming you are referring to: https://github.com/tprelog/iocage-homeassistant
I did not find answers to any of my questions there
Thank you @Tromperie . Although I think @hanan is correct.
Admittedly, I have dropped the ball with regard to having good (and complete) documentation. I mean, all these questions do have documented answers, but finding them at this point, is like a scavenger hunt. Things like creating a samba share are more of a general TrueNAS topic but it has been my intention for some time, to put together some simple examples that directly relate to this plugin.
Standby⌠Iâm gonna work on updating some basic setup instructions. I started to link some existing steps in this reply, but I have removed them because they needed to much additional information to provide the desired end result with the recent plugin on TrueNAS.
Generally speaking, forget this is a âpluginâ. On TrueNAS, the term âpluginâ means you can press a button in the UI to install Home Assistant Core. After the installation completes, consider yourself to be running Home Assistant Core, using a Python Virtualenv.
Again, we do not have addons with this installation method. I donât mean to be rude or picky here, but using the correct terms is important. HACS is a custom integration. The HACS documentation covers configuration and usage much better then I could do
Iâm not the best person to give ideas on what you can do. However, this forum is already filled with many great ideas. I consider my own setup to be very practical, which makes it extremely boring compared to what most people accomplish.
The Mosquitto plugin, as mentioned before, is just a separate jail with the MQTT broker installed. By default, there is no username or password needed to connect. The Mosquitto MQTT Broker itself, can be configure according the itâs documentation. See this post for some links.
In Home Assistant, you just need to add the MQTT integration.
The preferred way to setup MQTT for your installation is via Configuration >> Integrations in the UI, click the button with
+
sign and from the list of integrations select MQTT
Personally, I use Mosquito with the default settings. I simply installed the plugin, then added the integration to Home Assistant.
Iâm not a developer, so I can not answer with any certainty. The jails on TrueNAS use FreeBSD, which is not officially supported by the Home Assistant developers. Iâm sure you could manage some basic ground work using this plugin, but for serious development of a new integration, I might suggest starting with the official developer docs - Honestly, Iâm not sure if this plugin (or otherwise running in a jail on TrueNAS) is a good option for HA development.
I think it just depends on the particular router that you currently have. Itâs been several years since I have used something like a Net-Gear or Asus router. If capable, some suggestions would be block the devices ip address from accessing the internet or create a firewall rule that blocks the traffic. I think vlans make it easier to manage, but lots of home routers still allow some basic firewall functionality that can be used to block unwanted traffic. The downside here, is that you might have to configure a firewall rule for each device individually. If you can create multiple WiFi networks, maybe you can block a particular SSID from the internet and connect all these devices to that.
Many thanks Troy - all back âon the roadâ again
Sorry I have removed this post
If you did not get this setup yet, updated instructions that will be based on moving the configuration to an external dataset, are coming soon!
Hi @jermstheitguy - Sorry for the trouble.
Did you get it figured?
Are you accessing the jails shell through using the TrueNAS UI?
Sometimes I run TrueNAS in a VM if I need to work on my plugins. I mention this because I have had the same issue that you mention. Personally, I only encounter this when TrueNAS is running in a VM but in this case it has become almost impossible to install appdaemon. Until just now, I thought this was caused by using the VM.
I was going to say, if I connect to the TrueNAS VM using ssh, then access the jails console I am able to install appdaemon without issue.
I am using the TrueNAS UI. I donât know how but Right after I posted, I tried it again and successfully installed.
I have a really odd problem. Decided to do a fresh install of HA after upgrading to TrueNAS. However my server was accidentally reset during the initial install. So I deleted the HA jail dataset and jail from the UI. But every time I try to reinstall I get the following error:
Error: Jail: homeassistant has a missing configuration, please check that the dataset is mounted.
Itâs as if thereâs something left over from the failed install but I canât find anything.
Grateful if anyone knows whatâs going on here.