HowTo build and connect Z-Connector on Rasberry

Discussions about RaZberry - Z-Wave board for Raspberry computer
Post Reply
Interpunktor
Posts: 3
Joined: 09 Apr 2013 22:30

HowTo build and connect Z-Connector on Rasberry

Post by Interpunktor »

  Hi Folks,i think this might be helpful....Installing the Z-Connector on my Rasberry forced me to take a small pain-relief-pill (the blue one) so i think there might be some people who would appreciate this post.Perhabs i forgot some little things,so please don't hesiatate to correct the following.I suppose you have an up an running rasberry with a actual version of wheezy and a RaZberry-Card plugged on it.At first we will update the repository an download the missing development-libraries to compile the connector without errors. pi@raspberrypi ~ $ sudo apt-get updatepi@raspberrypi ~ $ sudo apt-get install libargtable2-devpi@raspberrypi ~ $ sudo apt-get install libssl-dev Download the Z-Connector Package from your z-cloud page.Copy Files in your Home-Directory using sftp or scp or anything you like Extract the archive: pi@raspberrypi ~ $ unzip Z-Connector.zipYour Homedir should look kind a like that: pi@raspberrypi ~ $ lltotal 2.5Mdrwxr-xr-x 5 pi   pi   4.0K Apr 12 14:10 .drwxr-xr-x 3 root root 4.0K Feb  9 02:24 ..-rw------- 1 pi   pi   2.4K Apr 12 15:08 .bash_history-rw-r--r-- 1 pi   pi    220 Feb  9 02:24 .bash_logout-rw-r--r-- 1 pi   pi   3.2K Apr  7 11:05 .bashrcdrwxr-xr-x 2 pi   pi   4.0K Feb  9 03:17 Desktop-rw-r--r-- 1 pi   pi   5.7K Feb  3 06:07 ocr_pi.png-rw-r--r-- 1 pi   pi    675 Feb  9 02:24 .profiledrwxrwxr-x 2 pi   pi   4.0K Jul 20  2012 python_gamesdrwxr-xr-x 7 pi   pi   4.0K Apr 12 14:50 Z-Connector-rw-r--r-- 1 pi   pi   2.4M Apr 12 14:09 Z-Connector.zip Now to "some little Bugfixing" regarding the compiler-script The compile-script copies the final binary to a not existing location (folder) so the System creates a binary witch is named as the target-folder (urgs!).To prevent this just create a folder witch the correct name so the compiling-process can drop the binary correctly. Change into the Z-Connector-Directory and create the forgotten folder. pi@raspberrypi ~ $ cd Z-Connectorpi@raspberrypi ~/Z-Connector $ mkdir Release Now walk to the Unix-directory and start the compiling-process pi@raspberrypi ~/Z-Connector $ cd Unix/pi@raspberrypi ~/Z-Connector/Unix $ make all clean Copy the new born z-agent to your current location (don't forget the trailing dot) pi@raspberrypi ~/Z-Connector/Unix $ cp ../Release/z-agent .Now it is time to change the device in the start-script (probably you like to do that with nano) and change it to ttyAMA0 (the last character is a -zero-) pi@raspberrypi ~/Z-Connector/Unix $ nano Run_Z-Agent.sh  #!/bin/bashcd ${0%/*}if [ "`uname`" == "Darwin" ]then export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:.fiwhile [ 1 ]do ./z-agent -s z-cloud.z-wave.me --cacert ../Certificates/cacert.pem --cert ../Certificates/cert.pem --key ../Certificates/cert.key -d /dev/ttyAMA0 "${@}" # substitute /dev/ttyUSB0 by /dev/ttyACM0 or another device depending on the hardware you have # on Mac OS X use /dev/cu.usbserial or another cu.* device sleep 1 # spare the CPU done Now stop your (probably) local running z-way-server with pi@raspberrypi ~ $ sudo /etc/init.d/Z-Way stopand start your connector with pi@raspberrypi ~ $ ~/Z-Connector/Unix/Run_Z-Agent.sh Everything should be fine now and you z-cloud page should propagate "Your are connected to Z-Cloud" Nevertheless it is also essential that your local network connects correctly to the internet...... but this is another topic. CheersKlaus   
Post Reply