Domoticz + PINE64 Z-Wave Module + Open Z-Wave
#1
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:

   
   
   

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



Sent from my PINE A64 using Tapatalk
#3
@klliew,

I am a newbie and have a rock64 can I do the same to get Domoticz working on my rock64
#4
(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
#5
I just started working with domotics, the first launch


Possibly Related Threads…
Thread Author Replies Views Last Post
  Pine64 as squeezebox touch replacement Learnincurve 12 27,602 01-13-2021, 02:11 AM
Last Post: Learnincurve
  Pine64 E-ink screen - Android projectileobjects 4 9,449 12-03-2020, 03:03 PM
Last Post: Silk
  Pine64 based IP KVM tuaris 0 3,912 08-06-2020, 12:05 AM
Last Post: tuaris
Information Pine64 Head Unit Zoidiano0 100 139,649 11-19-2019, 04:35 AM
Last Post: rogatip79
  PINE64 to allow use of SATA disk on network/FTP mwelbourne 10 15,328 11-18-2019, 04:09 PM
Last Post: evilbunny
  How to setup VNC on your Pine64 (Debian, SSH, headless) pine64nutz 20 42,149 04-16-2019, 08:00 AM
Last Post: hg6806
  Setup Pine64+ with OP-TEE stdys 0 3,493 09-13-2018, 03:23 PM
Last Post: stdys
Information UEFI for Pine64 z4v4l 20 37,208 06-24-2018, 03:06 PM
Last Post: z4v4l
  Pine64 as Security Camera / Baby Monitor utdrmac 2 7,041 02-01-2018, 07:49 AM
Last Post: davidbrucs
Photo Nextcloud running on Pine64 gbjensen 1 5,975 01-18-2018, 05:51 AM
Last Post: Luke

Forum Jump:


Users browsing this thread: 1 Guest(s)