PINE64

Full Version: Domoticz + PINE64 Z-Wave Module + Open Z-Wave
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Domoticz is a very light weight home automation system that lets you monitor and configure miscellaneous devices, including lights, switches, various sensors/meters like temperature, rainfall, wind, ultraviolet (UV) radiation, electricity usage/production, gas consumption, water consumption and many more. Notifications/alerts can be sent to any mobile device.

Tested with PINE64 2GB(1GB and 512MB shall work well, anyone with this please help to test out), Debian Base

Remark:
If you flash new debian/ubuntu build, ensure your kernel/u-boot is up to date and also resize your root partition to max available space your SD card can provide
/usr/local/sbin/pine64_update_uboot.sh
/usr/local/sbin/pine64_update_kernel.sh
/usr/local/sbin/resize_rootfs.sh


1) First update your system:
sudo apt-get update
sudo apt-get upgrade


2) Install the development tools and libraries needed for compiling Domoticz: 
sudo apt-get install build-essential nano cmake git libboost-dev libboost-thread-dev libboost-system-dev libsqlite3-dev curl libcurl4-openssl-dev libssl-dev libusb-dev zlib1g-dev


3) Build & Install Boost Libraries
a) If this is a clean system, continue at Now build and install the Boost library.
Its recommended that you use the latest Boost libraries - as of 8th August 2016 that is version 1.61.0.
For this we need to compile/install them by issuing the following commands:
These instructions can also be used on a Linux system.

[This first step is necessary because you will get linking errors if you don't remove the old Boost library]
Instructions here are for removing boost 1.55, on your system this might be another version, so adopt these commands to your need. It could also be you never installed boost on your system, do not worry, just execute the commands

sudo apt-get remove libboost-dev libboost-thread-dev libboost-system-dev libboost-atomic-dev libboost-regex-dev
sudo apt-get remove libboost-date-time1.55-dev libboost-date-time1.55.0 libboost-atomic1.55.0 libboost-regex1.55.0 libboost-iostreams1.55.1
sudo apt-get remove libboost-iostreams1.55.0 libboost-iostreams1.55.0 libboost-iostreams1.55.0
sudo apt-get remove libboost-serialization1.55-dev libboost-serialization1.55.0 libboost-system1.55-dev
sudo apt-get remove libboost-system1.55.0 libboost-thread1.55-dev libboost-thread1.55.0 libboost1.55-dev
sudo apt-get autoremove

b) build and install the Boost library.
mkdir boost

cd boost
wget http://sourceforge.net/projects/boost/fi...z/download
tar xvfz download
rm download
cd boost_1_61_0/
./bootstrap.sh
./b2 stage threading=multi link=static --with-thread --with-date_time --with-system --with-atomic --with-regex
sudo ./b2 install threading=multi link=static --with-thread --with-date_time --with-system --with-atomic --with-regex
cd ../../
rm -Rf boost/

4) Build Support for OpenZWave

sudo apt-get install libudev-dev
git clone https://github.com/OpenZWave/open-zwave open-zwave-read-only

cd open-zwave-read-only
git pull
make -j 3

5) Compiling/building the Domoticz binaries

cd ~
git clone https://github.com/domoticz/domoticz.git domoticz
cd domoticz
cmake -DCMAKE_BUILD_TYPE=Release .
make

6) Starting Domoticz automatically when the system boots
a) Copy startup script into /etc/init.d

cd domoticz
sudo cp domoticz.sh /etc/init.d
sudo chmod +x /etc/init.d/domoticz.sh
sudo update-rc.d domoticz.sh defaults

b) Edit Startup Script
sudo nano /etc/init.d/domoticz.sh

The lines you usually need to change are USERNAME, DAEMON and DAEMON_ARGS
Code:
USERNAME=debian
DAEMON=/root/domoticz/$NAME
DAEMON_ARGS="-daemon -www 8080"
Domoticz will now start automatically when you reboot your machine.

c) Manually controlling the Domoticz service
sudo /etc/init.d/domoticz.sh start
sudo /etc/init.d/domoticz.sh stop
sudo /etc/init.d/domoticz.sh restart
sudo /etc/init.d/domoticz.sh status

7) Create symbolic link for PINE64 Z-Wave Module ( Domoticz default checking Z-Wave module which connected to ttyACM0,Thank bonterra and marcosti pointing it out ~ Link)

sudo nano /etc/udev/rules.d/10-tty.rules
Code:
KERNEL=="ttyS2", SYMLINK+="ttyACM0"

Some screenshot:

[attachment=607]
[attachment=608]
[attachment=609]

Enjoy guy.
@jspaulsen weren't we looking for these?



Sent from my PINE A64 using Tapatalk
@klliew,

I am a newbie and have a rock64 can I do the same to get Domoticz working on my rock64
(03-27-2018, 11:27 AM)jansat Wrote: [ -> ]@klliew,

I am a newbie and have a rock64 can I do the same to get Domoticz working on my rock64

@jansat,

It should work with rock64, as long as you using supported OS such as ubuntu, debian etc which listed in their supported site. 

BR,
klliew
I just started working with domotics, the first launch