Home / domotica project

domotica project


Hardware

USB stick
Z-WaveMe (www.z-wave.me) ZME_UZB1 
Zwave plus compatible

Switch module
Philio Relay Insert 2 * 1.5 KW with Power Meter

Wall Plug
TKBHOME model TZ68G (Wenzhou)


USB Stick and Linux
After plugging in the device, the device shows as below with lsusb
Bus 002 Device 007: ID 0658:0200 Sigma Designs, Inc. 
A device is automatically create:
/dev/ttyACM0


Software: Domiticz

Website

Installation on ubuntu 14.04

install prerequisites
apt-get install subversion -y
apt-get install g++ -y
apt-get install cmake -y
apt-get install libsqlite3-dev -y
apt
-get install
zlib1g-dev -y
apt-get install curl libcurl4-openssl-dev -y
apt-get install libboost-all-dev -y

install OpenZwave

from installation instructions

apt-get install libudev-dev -y
svn co http://open-zwave.googlecode.com/svn/trunk/ open-zwave-read-only
cd open-zwave-read-only
make
 

Ubuntu

sudo apt-get install build-essential -y
sudo apt-get install cmake libboost-dev libboost-thread-dev libboost-system-dev libsqlite3-dev subversion curl libcurl4-openssl-dev libusb-dev zlib1g-dev -y


Getting the source code

svn checkout svn://svn.code.sf.net/p/domoticz/code/trunk/ domoticz
cd domoticz
cmake -DCMAKE_BUILD_TYPE=Release .
make

now you should have the binary application, you can start it with

./domoticz

Open the webinterface to get started:

http://localhost:8080/

For additional parameters type:

sudo ./domoticz -h

Note: Compiling on the Raspberry Pi will take about 45 minutes

To Update to a newer version

- stop the application (control-c), or stop the startup script (see below) with /etc/init.d/domoticz.sh stop

(from the domoticz folder)

svn update
make

Unix startup script

To start Domoticz automatically when the system starts perform the following steps:

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

Edit the startup script and point the DEAMON location to point to the installation folder:

sudo vi /etc/init.d/domoticz.sh
DAEMON=/home/pi/domoticz/domoticz

If you want to use another web interface port change:

OPTIONS="-www 8080"

You can now start domoticz with:

sudo /etc/init.d/domoticz.sh start


To stop:

sudo /etc/init.d/domoticz.sh stop


To check if domoticz is running:

sudo /etc/init.d/domoticz.sh status

If your system supports it you can also issue:


sudo service domoticz.sh start
sudo service domoticz.sh stop
sudo service domoticz.sh status




Configure Domoticz

Lets start by adding the Zwave.Me USB stick

Open a webbrowser at http://<you ip address here>:8080/

Goto Settigns (top right icon) and then hardware

Type in the name for you USB stick, for example: ZwavePlus USB stick

Type: OpenZWave USB

Data timeout: Disabled

Serial Port: /dev/ttyACM0

Hit the Add button


The device is now listed on the hardware page (together with the motherboard sensors wich are there by default)


Include devices

Include TKBHOME Zwave plug-in socket

To pair the domoticz with the TKBHOME plug-in you TKBHOME in a wall power socket

In Domoticz goto: 

settings->hardware

Click on "node management" -> "Include node"

Press the led of the TKBHOME (which is a little switch) 

Hit the "Refresh" button in Domoticz to see the device in the list

Select the row with the new device, change the name from "unknowd" to something useful and hit the "Update" button.


Now go to Settings->Devices

Click on the little green arrow to add your switch.

The device is now shown on the switches page (light bulb page)

Click on the lightbulp of your added device to see if it works.

You can make a favorite of your switch (by selecting the star) so it will show up on your dashboard.


Changing paramater values of you Z-wave device

Z-wave devices offer a number of paramaters (depending on the z-wave devise itself)

My Philio PAN04 for example can have three switch settings:

Edge 1

pulse 2

Edge Togel 3

To set it, in Domoticz go to "settings" -> "hardware"

Click "setup" in the USB controller line (blue button)

Select the Node with desciption PAN04

Below the options appear.

There are now three options: Current values, Configuration and Information. Select Configuration.

Select "Edge-Togle mode" by entering 3 as value and click submit.


Also check "enable polling"and hit update to use the power meters.


Adding parameters that are not visible in de webinterface

My TKBHOME TZ68G has the options of using the blue led as a on/off indicator, or as a night light.

Unfortanately this option is not shown on the "nodes" page.


I figured out how to add it.

First I removed the node from the configuration

Than I edited the file <domoticz home>/domoticz/Config/manufacturer_specific.xml

        <Manufacturer id="0118" name="Wenzhou TKB Control System">
                <Product type="0001" id="0001" name="TZ88 Smart Energy Plug-in Switch" config="wenzhou/tz88.xml"/>
                <Product type="0002" id="0002" name="TSP01 3 in 1 PIR Motion Sensor" config="wenzhou/tsp01.xml" />
                <Product type="0808" id="0808" name="TZ65D Dual Wall Dimmer" config="wenzhou/tz65d.xml"/>
                <Product type="0101" id="0103" name="TZ68 On/Off Switch Socket" config="wenzhou/tz68.xml"/>
                <Product type="0102" id="1020" name="TZ66D Dual Wall Switch" config="wenzhou/tz66d.xml"/>
                <Product type="0202" id="0611" name="TZ67 Wall Plug Dimmer" config="wenzhou/tz67.xml"/>
        </Manufacturer>

Then I added the file

<domoticz home>/domoticz/Config/wenzou/tz68.xml

<?xml version="1.0" encoding="utf-8"?>

<Product xmlns='http://code.google.com/p/open-zwave/'>

        <!-- Configuration -->
        <CommandClass id="112">
                <Value type="list" genre="config" instance="1" index="1" label="LED-Behaviour" value="0" size="1">
                        <Help>Defines the behavior of the blue LED. Default: 0</Help>
                        <Item label="Blue Indicator Off" value="0" />
                        <Item label="Blue Indicator On" value="1" />
                </Value>
        </CommandClass>
</Product>


After that I added the node again and now I have the option to set the function of the blue led




Apps

Dromotica






     RSS of this page