openHAB is a software for integrating different home automation systems and
technologies into one single solution that allows over-arching automation
rules and that offers uniform user interfaces.
Install
Binary package:
pkg install openhab2
From DPorts:
cd /usr/dports/misc/openhab2 && make install clean
The openHAB2 user interface "Paper UI" writes to /var/db/openhab2
(config) and to /usr/local/etc/openhab2 (when installing add-onds).
The config in /usr/local/etc/openhab2 is evaluated additionally to
/var/db/openhab2.
See /usr/local/etc/rc.d/openhab2 for environment variables you need
to set by hand (all "export"-ones) if you want to execute some of
the openHAB2 commands from the shell directly.
When the openHAB2 docs talk about "userdata", look into /var/db/openhab2.
Serial ports do not work with FreeBSD, see:
https://github.com/openhab/openhab1-addons/wiki/FreeBSD
By default openHAB2 tries to use IPv6. As FreeBSD does not support
mapping IPV4 multicast addresses inside IPv6 addresses you will get
the following error message:
[ERROR] [org.jupnp.transport.Router] - Unable to initialize network router: org.jupnp.transport.spi.InitializationException: Could not initialize MulticastReceiverImpl: java.net.SocketException: Invalid argument
A workaround is to use the following rc.conf setting which will
prefer IPv4 over IPv6:
openhab2_java_opts="-Djava.net.preferIPv4Stack=true"
If you upgrade from a pevious version, make a backup of
/var/db/openhab2
read about the breaking changes in the release notes at
https://github.com/openhab/openhab-distro/releases/tag/2.5.0
and run
/usr/local/libexec/openhab2/runtime/bin/update.freebsd
which takes care about changes for:
- Textual Configuration
- Next Generation Rule Engine