ZWave

From LinuxMCE
Revision as of 14:08, 9 January 2007 by Wikiadmin (Talk | contribs)

Jump to: navigation, search
This page was written by Pluto and imported with their permission when LinuxMCE branched off in February, 2007. In general any information should apply to LinuxMCE. However, this page should be edited to reflect changes to LinuxMCE and remove old references to Pluto.
These instructions are for HomePro ZWave USB interface (ZCU000/ZCU010). The same method might work for other (future?) supported ZWave controllers.

These instructions have been tested working under VMWare 1.0.1-29996 using FC4 (2.6.16.18) as host operating system.

Howto install and use ZWave

Let's assume that you have pluto installed with IP: 10.0.2.128 (these instructions are also done by assuming that you have "hybrid" pluto installation).

Once you have succesfully installed the ZWave USB controller and it is seen on Pluto (media:zwave_homepro_interface.png), you can proceed by populating the ZWave network information to Pluto.

  1. Add your ZWave devices to your master ZWave master remote controller (like ZTH200)
    • Once the devices are added to remote and verified they are working (you can control them with your remote controller), you need to copy the ZWave network information to Pluto.
  2. Go to pluto admin page ("http://10.0.2.128/pluto-admin/"), then choose "Wizard -> Devices -> Interfaces -> [your ZWave controller] -> Advanced".
    1. On the device page select "Send command to device".
    2. Select command "Download Configuration" and choose "Send Message".
      • Leave the data and file fields as blank
  3. Now the pluto is waiting for the ZWave information and you should send a copy of the ZWave network with your master remote controller to pluto.
    • If you are using HomePro remote controller this is done by selecting: "Setup -> Copy Remote Ctrl. -> Send Information -> Identical Copy". Once you have done that, the remote will show "Sending information..." and after succesfull sending it will return to clock screen (this shouldn't take more than couple of minutes).
    • You can monitor the process by watching the Zwave log file on pluto (usually "/var/log/pluto/*ZWave.log"). Unfortunately the admin page doesn't give much information of what is being done and is everything going smoothly. If the process is successfull, you should see the pluto communicating with the USB controller
    • Make sure the sending remote controller is near enough the USB receiver, othervise nothing will happen.
  4. Go to device tree (Show devices tree) and you should see (Media:zwave_devices_tree.png) the newly added ZWave modules/devices on the tree under "CORE -> ZWave".

You should do quick reload (Wizard -> Restart -> Quick Reload Router) in order to use the newly added devices with pluto. Once you have done that you should be able to control (like switching on/off) the devices under the Light (Media:zwave_lights.png).


Troubleshooting

HomePro USB ZWave controller

If the ZWave controller is not seen (or it's not working) by pluto, check that linux sees the USB device. The HomePro USB receiver uses USB serial device converter (it's not really a "true" USB device).

Once you plug in the device you should see the following kernel messages ("dmesg") when the correct modules are loaded:

usbcore: registered new driver usbserial
drivers/usb/serial/usb-serial.c: USB Serial support registered for generic
usbcore: registered new driver usbserial_generic
drivers/usb/serial/usb-serial.c: USB Serial Driver core
drivers/usb/serial/usb-serial.c: USB Serial support registered for FTDI USB Serial Device
ftdi_sio 1-1:1.0: FTDI USB Serial Device converter detected
drivers/usb/serial/ftdi_sio.c: Detected FT232BM
usb 1-1: FTDI USB Serial Device converter now attached to ttyUSB0
usbcore: registered new driver ftdi_sio
drivers/usb/serial/ftdi_sio.c: v1.4.3:USB FTDI Serial Converters Driver

Then you should have the following kernel modules loaded:

dcerouter_6722:/var/log/pluto# lsmod
Module                  Size  Used by
ftdi_sio               32584  1
usbserial              32488  3 ftdi_sio

On the admin page (Interfaces -> Advanced) the ZWave interface COM port should point to USB device:

Device data:
COM Port on PC      pci0000:00/0000:00:07.2+1
dcerouter_6722:/var/log/pluto# lspci |grep USB
0000:00:07.2 USB Controller: Intel Corp. 82371AB/EB/MB PIIX4 USB


ZWave communication

If the controller is seen by pluto, try sending some commands ("Wizard -> Devices -> Interfaces -> [your ZWave controller] -> Advanced") and watching the log files ("tail -f /var/log/pluto/*ZWave.log") at the same time.

You can try command like "Report Child Devices" which in my case (since I have 5 ZWave appliances supported by pluto) gives the following results:

36      11/05/06 10:45:51.358           ZWave::ReportChildDevices got:
36      11/05/06 10:45:51.358           
1                       37
4                       37
5                       37
6                       37
7                       37

In order to get these results you should already have downloaded the ZWave network configuration to pluto from master (remote) controller.


PIR (Binary Sensor) support

PIR (Passive Infra Red) sensor, a type of motion detector which uses invisible infra red light to detect movement in a room. PIR is sending "Sensor Tripped" events, so that you can use it in security scenarious.

All the tests were made using HomePro ZIR000 (RF Transmitter PIR) model.

HowTo install PIR

 1) Open the PIR box so that you have access to Z-Wave button, it is used to remove/add (reset) the PIR from/to Z-Wave network
 2) Use your Z-Wave Master Controller to add PIR
 3) Copy the new Z-Wave network configuration to your Z-Wave USB device (see command "Download Configuration")
 4) Reload Router
 5) You should see the PIR device available as a child device of ZWave (see Pluto admin web pages), but the setup isn't ready yet.
 6) Power off PIR, then power on again (remove a batery for few seconds). Close the PIR box.
 This step is important because PIR is in awake state only for 10 min after it's powered up.
 7) After 2-3 min from step 6, PIR will send the wake up notification and PIR will be able to set its configuration.
 8) You should receive the events from PIR

Notes

 1) PIR needs 2 min of 'silence' to get to Trigger Off
 2) Z-Wave has some new commands to support PIR :
   - Assign Return Route
   - Set Association
   - Set Configuration Parameter
   - Set Wake Up
 The configuration commands are sent automaticaly by Pluto's ZWave device.
 But if you are using a different PIR device and you need another setup parameters, you can use the new commands.
 3) The PIR wake up notification is important, no commands are sent to PIR if the notification wasn't received.
 We must be sure that PIR is able to communicate with Z-Wave network.