• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1]
Author Topic: zwave for home automation using z-stick2 and Zwave appliance  (Read 7250 times)
boonpin
Newbie
*

Karma: 0
Posts: 1


View Profile
« on: March 17, 2010, 10:52:37 PM »


I have upgrade my kernel to 2.6.33.1 , the distribution still using ubuntu 9.0.4 , my ztick2 driver ( usb serial ) loaded successfully , I can control the appliance via this perl script  http://www.bigsister.ch/zwave/zwave_s .
you can purchase "vera" to control the zwave or using the sheeva plug , so far the perl script can use to control socket or dimmer , I have not yet try the door sensor yet .

Logged

peter a
Full Member
***

Karma: 0
Posts: 132


View Profile
« Reply #1 on: March 18, 2010, 05:36:47 AM »

So what have you got in zwave modules , and what do you think of them for home control ?
I was going to have a go with X10, but from what I can work out , they are not very reliable way of control and miss events.
Logged

snake
Newbie
*

Karma: 3
Posts: 37



View Profile
« Reply #2 on: April 06, 2010, 08:49:58 PM »


I can control the appliance via this perl script  http://www.bigsister.ch/zwave/zwave_s .


Hello boonpin,

I have a plugcomputer and a tricklestar usb dongle. I have tried running the script but it seems to be looking for a ".pm" file:

root@ubuntu:~# perl zwave.pl                                                   
Can't locate Device/SerialPort.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.0 /usr/local/share/perl/5.10.0 /usr/lib/perl5 /usr/share/perl5 /usr
/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at zwave.pl line27.                                                                           

BEGIN failed--compilation aborted at zwave.pl line 27.


Where can I get the extra files? Hope you could help this newbie.
Logged

peter a
Full Member
***

Karma: 0
Posts: 132


View Profile
« Reply #3 on: April 07, 2010, 02:33:03 AM »

It`s probably a CPAN module called Device::SerialPort;

But you should be able to work which module it is by your perl code.

Eg

Code:
# Sample Perl script to transmit number
# to Arduino then listen for the Arduino
# to echo it back

use Device::SerialPort;  ---------- BIG HINT --------

# Set up the serial port
# 19200, 81N on the USB ftdi driver
my $port = Device::SerialPort->new("/dev/ttyUSB0");
$port->databits(8);
$port->baudrate(19200);
$port->parity("none");
$port->stopbits(1);

my $count = 0;
while (1) {
    # Poll to see if any data is coming in
    my $char = $port->lookfor();

    # If we get data, then print it
    # Send a number to the arduino
    if ($char) {
        print "Recieved character: " . $char . " \n";
    } else {
        sleep(1);
        $count++;
        my $count_out = $port->write("$count\n");
        print "Sent     character: $count \n";
    }
}

Install webmin , which for a newbie, makes it easy to set up and install cpan modules.
Logged

snake
Newbie
*

Karma: 3
Posts: 37



View Profile
« Reply #4 on: April 07, 2010, 06:27:57 AM »

It`s probably a CPAN module called Device::SerialPort;

Hello peter a,

Thanks for the big hint... I appreciate that.. Wink

I quickly browsed the net for this and found http://www.cpan.org/.

But the problem with building the cpan modules from the tarball is that there are too many dependencies that is needed... luckily there is a faster way to install the cpan module Device::SerialPort into the plug.


I found this:

#apt-get update
#apt-get install libdevice-serialport-perl

Together with the following:
1. perl script from http://www.bigsister.ch/zwave/zwave_s
2. TrickleStar USB dongle
3. Leviton ZWave Light Dimmer
4. Light bulb

I was able to control a light bulb by issuing commands on the plug's console.
Yeah!... home automation is cool.





Also, thanks Tom Aeby! (the maker of the perl script)  Grin






Logged

peter a
Full Member
***

Karma: 0
Posts: 132


View Profile
« Reply #5 on: April 07, 2010, 09:59:02 AM »

Hi snake, I just use Webmin.
I just go to the perl module section and just type  ‘Device::SerialPort’ and check install form CPAN and it does it all for me.

So what do you think of zwave ?.
I will check out the parts you have used for your Home automation, I guess have a Sheevaplug will help to control the modules instead of using a pc.
Logged

snake
Newbie
*

Karma: 3
Posts: 37



View Profile
« Reply #6 on: April 07, 2010, 09:57:41 PM »

So what do you think of zwave ?.
I will check out the parts you have used for your Home automation, I guess have a Sheevaplug will help to control the modules instead of using a pc.

Hello peter a,

I do use a sheevaplug... or it's variant I guess. It's a little bit small so I could hide it away in a corner.  I'm planning to make a script to turn on/off a lighting or appliance at a specific time. Just experimenting.

Thanks, I will try webmin too.

Zwave is great I think, but I'm not technically aware of its full capabilities... have to browse the net more. I am also seeing references of Zigbee which I think offers a similar function.

Thanks, anyway. I'm attaching my set-up in case you would like to see.  Grin




* mySetup.JPG (394.34 KB, 1504x1000 - viewed 2904 times.)
Logged

Pages: [1]
Print
Jump to: