FreeBSD

From Domoticz
Jump to navigation Jump to search

Introduction

In this guide we're going to install Domoticz using FreeBSD port (and/or unofficial ports).

Official Domoticz port doesn't have yet OpenZWave because mostly the OpenZWave port is not yet commited.

Official port

Use :

pkg install domoticz

Domoticz will be installed into /usr/local/domoticz.

To start it on boot use the following into /etc/rc.conf :

domoticz_enable="YES"

Domoticz use domoticz uid/gid per default. We recommand to start it with root:wheel rights, so add this into /etc/rc.conf :

domoticz_user="root" domoticz_group="wheel"

To start domoticz :

/usr/local/etc/rc.d/domoticz start

You can find in the /usr/local/etc/rc.d/domoticz file some more informations on how to customize the domoticz installation.

Unofficial ports

This unofficial port is waiting for some commits from FreeBSD port team. It will allow OpenZWave and use the development version.

To use it you need to have git :

pkg install git

Then clone the git repo :

cd /root && git clone https://github.com/xbeaudouin/freebsd-ports.git cd /usr/ports/comms && ln -s /root/freebsd-ports/comm/openzwave-devel cd /usr/ports/www && ln -s /root/freebsd-ports/www/domoticz-devel

To accelerate the installation add the following ports :

pkg add curl expat2 telldus-core jsoncpp cmake iconv pkgconfig execinfo ssl boost-libs boost-python-libs lua mqtt sqlite

Then compile and install the port :

cd /usr/ports/www/domoticz-devel && make install clean

Startup and configuration is the same as the official domoticz ports !

Devd files

To help Domoticz to get the USB key with same /dev/ devices, here is some /etc/devd/ files I currently use :

EnOcean

 attach 10 {
    device-name "uftdi[0-9]+";
    match "vendor"            "0x0403";
    match "product"        "0x6001";
    match "sernum" "A504NTOJ";
    action "logger ENOCEAN device attached on $cdev/$device-name/$sernum/cua$ttyname, creating symlink and setting owner.;  /bin/ln -fs /dev/cua$ttyname /dev/cuaUenocean; chown root /dev/cuaUenocean";
 };


RFPlayer

 attach 10 {
    device-name "uftdi[0-9]+";
    match "vendor"            "0x0403";
    match "product"        "0x6001";
    match "sernum" "A125CV8Y";
    action "logger RFPLAYER device attached on $cdev/$device-name/$sernum/cua$ttyname, creating symlink and setting owner.;  /bin/ln -fs /dev/cua$ttyname /dev/cuaUrfplayer; chown root /dev/cuaUrfplayer";
 };

RFX

 attach 10 {
    device-name "uftdi[0-9]+";
    match "vendor"            "0x0403";
    match "product"        "0x6001";
    match "sernum" "05VMGB3J";
    action "logger RFX device attached on $cdev/$device-name/$sernum/tty$ttyname, creating symlink and setting owner.;  /bin/ln -fs /dev/tty$ttyname /dev/ttyUrfx; chown root /dev/ttyUrfx";
 };

Zwave Key (Aeon Labs)

 attach 10 {
    device-name "uslcom[0-9]+";
    match "vendor"            "0x10c4";
    match "product"        "0xea60";
    match "sernum" "0001";
    action "logger ZWave device attached on $cdev/$device-name/$sernum/cua$ttyname, creating symlink and setting owner.;  /bin/ln -fs /dev/cua$ttyname /dev/cuaUzwave; chown root /dev/cuaUzwave";
 };