Are there any ports available to support the remote zstick? Can that be run on the same host and networked via the loop back?
I’ve seen a lot of file locking code over the years. Why are they rolling their own? There are standard plock/flock semantics available on most posix operating systems.
That is an interesting idea. I suspect all you need to do is install ser2net (from pkg/ports), add a line in its config pointing to the USB stick and expose on a port of your choice. Then connect to it using rfc2217://localhost:port as the ZWave port specifier. I suppose you could run it in the same or a different jail.
I don’t know if I should answer this question on account of my future chances of getting any support from others on this forum. HA=Home Assistant, the frenemy of OpenHAB. In my (very limited) experience of it, it has a lot of stuff that works that does not work on OpenHAB, esp. under FreeBSD. Unfortunately, there is also a lot that does not work in HA (in general and also specifically under FreeBSD) that works awfully well in OpenHAB. I wish those two could get a room together.
Hello freebsd users,
Anybody knows where the configuration files are safed in freebsd?
I had configured some things under openhabian. There I found the configs under:
/etc/openhab2 (probably same in freebsd installation)
/var/lib/openhab2
Hello @sawirth. As long as you have a “standard” install (eg. using pkg/ports) you will find all the standard configs (items, rules etc) in /usr/local/etc/openhab2. There is more in /var/db/openhab2/userdata and the add-ons go into /usr/local/libexec/openhab2. Enjoy!
I try to get openHAB running on TrueNas too, but I’m struggling with the user rights or IDs … because I’m a newbe too. What I have discovered ist that the user- and group-ids inside of the jail are differend from the IDs of the NAS. So the NAS-IDs starts with 1000 and the openhab IDs in the jail are 235. So I tried to change them to become equal … well … but … I didn’t managed it.
In your post you said that this is a “tricky thing” … could you please explain, what I have to to, so solve this problem? If possible in a way that could be understand by a 6 years old child …
Hi Stef. This is a classic question for FreeNAS jails.
There is no need to invent the wheel for me to explain.
This is the BEST post expaining in detail this procedure.
This post is mandatory reading for future readers having similar issues and need to understand what needs to be done and WHY we need to do it.
In our case the easiest step is this
**SOLUTION 1 - USER WRITEABLE**
* Add a user in the FreeNAS WebUI with a matching UID as the plugin's default user.
* Change ownership of the data dataset/folders to the newly added user.
Since your jail user is openhab:openhab 235:235 you just need to create the same username and SET 235 manually on user and group creation pages on FreeNAS. First create the group and then the user.
Don’t leave the deafault 1000 user ID that FreeNAS suggests. You can change it right there! And you must.
So, delete your current TrueNAS openhab user (not the jail user!!!) and the TrueNAS openhab group.
Then you can create the TrueNAS openhab 235 group.
Then create the TrueNAS 235 openhab user.
And make the next steps. I will also edit my post above to be more informative.
Hello Nick, thanks for help. I first tried to change the openhab uid and group with the pw groupmod and usermod commandsbut with less success. So after reading your hint, I just deleted the openhab user and group within TrueNas an recreate them an the problems with the permissions disapear …
Now I copied my configuration (openhab_conf) from the PI to the TrueNas directories. Something happens … but not all. It seams the my hue-devices are connected, but my LCN-Devices are not available.
Is the the world not as easy as copiing the configuration-data to migrate from the Raspberry PI to TrueNas?
If someone has an idear, what I have to do to keep the LCN running gain?
I checked the permissions and ownership an everythink looks fine.
I have tried a second way, by making a backup of the PI-configuration with
> sudo openhab-cli backup
after that I copied the backup-file to the jail /var/db/openhab2/backup and changed the ownership top openhab:openhab. Than I start the jail. Finaly I tried to restore the backup with > openhab-cli restore /var/db/openhab2/backup/<backup-file>.zip
but I got an error-message that told me that the command
openhab-cli
is unknown. Are there so many differences between openhabian and openhab for FreeBSD?
Another behavier I regconized is that the openHAB 2 Log Viewer will not be accessible. The workaround for this is to open the correspondig log-file from the shared directories. There I couldn’t see any message that shows that the LCN service will start.
I had an openhabian installation on a Pi so i did the migration as you. And my steps are these on my post #17.
There are many differences if you compare the openhabian and FreeBSD installation, mainly the directories used by the application.
That’s why i posted them.
I just copied the configuration folder to the new installation and installed all necessary bindings etc from scratch.
The log viewer is frontail. Yes this is not ‘supported’. We do it as a workaround manually but even i have to start it … manually
I don’t know the LCN binding to help you for that. I hope your jail is ok with networking.
the sysrc-line you posted is the same as I have inside my /etc/rc.conf-file.
It seems that I have the lcn-stuff runing, but it won’t run aout of the box by copying the lcn.cfg file. I had manualy initialize the binding by adding it as thing. After that I could the that openhab connects to the interface an the state changed to online …
Now I start thinking about the performance of the jails and the NAS-Hardware. Why? Well the messages in log appears much slower than on the rasperbery PI (3B). So my current NAS-hardware is an old AMD E350 processor (with 16GByte) witch should deliver more power than the PI … should. I think about upgrading the system, but I’m not shure whoe “huge” a TrueNAS-Hardware/processor should be, when the main functions of the NAS are only file-server and openHAB? Has anyone expirences in this direction? An other point is that the NAS should consume as little power as possible. Are there any idears?
I tested a 12.1 iocage jail for manual OH3 installation.
I installed OpenJDK11
# pkg install openjdk11
I unzipped the OH3.1-snapshot to a newly created directory (ie. /usr/local/libexec/openhab3)
# chmod -R 755 /usr/local/libexec/openhab3
# cd /usr/local/libexec/openhab3
# ./start.sh
And that’s all, i can see it running.
What needs to be done is either a proper port or maybe a TrueNAS plugin scripted installation for user creation and service script.