Author Topic: ZWave API  (Read 53184 times)

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2421
    • View Profile
    • ago control
Re: ZWave API
« Reply #15 on: February 13, 2008, 10:42:09 pm »
Aaron thats the ZCU201
aaron refers to the us version. It's the ZCU101.

best regards,
Hari
rock your home - http://www.agocontrol.com home automation

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2421
    • View Profile
    • ago control
Re: ZWave API
« Reply #16 on: February 13, 2008, 10:43:56 pm »
We have already committed to providing Hari with a ZCU201 if this helps.
yes that would help as I don't have access to the device atm.

best regards,
Hari
rock your home - http://www.agocontrol.com home automation

totallymaxed

  • LinuxMCE God
  • ****
  • Posts: 4426
  • Smart Home Consulting
    • View Profile
    • Dianemo - at home with technology
Re: ZWave API
« Reply #17 on: February 13, 2008, 10:53:27 pm »
Andy Herron,
Convergent Home Technologies Ltd
United Kingdom

Read My Blog; http://ellipticalcurve.com

Contact me for Smart Home consulting advice here;
@herron on Twitter, totallymaxed+consulting@gmail.com via email or PM me here.

Get a Dianemo S License: http://forum.linuxmce.org/index.php?topic=8880.0
iOS Orbiter: http://wiki.linuxmce.org/index.php/Dianemo_iOS_Orbiter
Follow us on Facebook: https://www.facebook.com/pages/Dianemo-Home-Automation/226019387454465

Sales & Info:
http://www.dianemo.co.uk

caiman

  • Veteran
  • ***
  • Posts: 119
    • View Profile
Re: ZWave API
« Reply #18 on: April 02, 2008, 06:13:51 pm »
I've read in some thread that Seluxit was thinking of building a wrapper around the zensys code in order to expose a clear and open API. Do you guys know more about the status ?

It would be really nice to use this to query some infos from the modules, like routing table and signal strength, and build a tool like Z-Seer, which unfortunately only works with their controller -> US only.
http://store.homeseer.com/store/Z-Seer-Diagnostics-Software-for-Z-Wave-P235C68.aspx

Sam

nite_man

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1019
  • Want to work with LinuxMCE
    • View Profile
    • Smart Home Blog
Re: ZWave API
« Reply #19 on: April 02, 2008, 08:22:39 pm »
It'd be great! But think ZigBee is better. It uses open protocol.
Michael Stepanov,
My setup: http://wiki.linuxmce.org/index.php/User:Nite_man#New_setup
Russian LinuxMCE community: http://linuxmce.ru

totallymaxed

  • LinuxMCE God
  • ****
  • Posts: 4426
  • Smart Home Consulting
    • View Profile
    • Dianemo - at home with technology
Re: ZWave API
« Reply #20 on: April 02, 2008, 08:55:44 pm »
It'd be great! But think ZigBee is better. It uses open protocol.

We have a discussion going on about this with Zensys... no promises at all but this whole area is under discussion.

Andrew
Andy Herron,
Convergent Home Technologies Ltd
United Kingdom

Read My Blog; http://ellipticalcurve.com

Contact me for Smart Home consulting advice here;
@herron on Twitter, totallymaxed+consulting@gmail.com via email or PM me here.

Get a Dianemo S License: http://forum.linuxmce.org/index.php?topic=8880.0
iOS Orbiter: http://wiki.linuxmce.org/index.php/Dianemo_iOS_Orbiter
Follow us on Facebook: https://www.facebook.com/pages/Dianemo-Home-Automation/226019387454465

Sales & Info:
http://www.dianemo.co.uk

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2421
    • View Profile
    • ago control
Re: ZWave API
« Reply #21 on: April 02, 2008, 09:21:19 pm »
It'd be great! But think ZigBee is better. It uses open protocol.
the open protocol is a very important factor. But the lower frequency of Z-Wave is better for building penetration and you can buy many products now. I'm still waiting to see ZigBee HA-Devices.

I'm awaiting more devices at the moment (thanks to the support from Seluxit, Danfoss and Pluto) and try to use the available Z-Wave information with the existing code to get an overview of the protocol. There are many documents that leak information about class names/numbers and such. The article "riding on the Zwave" even shows frame specifications. If that information and a bit of probing is not sufficient we could usb snoop the homeseer stuff. But i wonder if it uses some modified firmware or monitor mode. Time will tell..

best regards,
Hari
rock your home - http://www.agocontrol.com home automation

1audio

  • Addicted
  • *
  • Posts: 552
    • View Profile
Re: ZWave API
« Reply #22 on: April 03, 2008, 07:38:45 am »
ZigBee is an open standard thats not very standard. Control4 uses it. So does Crestron. And their products do not interoperate. And neither have the in depth background or experience in lighting that Leviton, Cooper and even Intermatic have. Outside of the US the story will be different but ZigBee is still a ways off for product we can use.

There is a lot of leaked info on ZWave. Also all BUT the Leviton serial module will talk the same codes from my experience testing on Windows. There are some proprietary codes but most are common to all devices in a device class. Unfortunately some of the device classes have been majorly revised in the last two years, and the newest stuff runs much faster over the network.

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2421
    • View Profile
    • ago control
Re: ZWave API
« Reply #23 on: April 03, 2008, 08:23:31 am »
ZigBee is an open standard thats not very standard. Control4 uses it. So does Crestron. And their products do not interoperate. And neither have the in depth background or experience in lighting that Leviton, Cooper and even Intermatic have. Outside of the US the story will be different but ZigBee is still a ways off for product we can use.
i totally agree. ZigBee misses some class/command definitions for HA like ZWave..

Quote
There is a lot of leaked info on ZWave. Also all BUT the Leviton serial module will talk the same codes from my experience testing on Windows. There are some proprietary codes but most are common to all devices in a device class. Unfortunately some of the device classes have been majorly revised in the last two years, and the newest stuff runs much faster over the network.
I'm really happy with the speed of the 40kbit ZWave.

best regards,
Hari
rock your home - http://www.agocontrol.com home automation

caiman

  • Veteran
  • ***
  • Posts: 119
    • View Profile
Re: ZWave API
« Reply #24 on: April 06, 2008, 11:47:53 am »
OMG...

When receiving network info at initialization time, the pluto driver inspects a bitmap of 4 bytes -> 32 possible possible devices. But Zwave should support up to 232 nodes. Maybe I am misreading something ?

And it could indeed be that my problems http://mantis.linuxmce.org/view.php?id=3614 of zwave devices being dropped started when I reached node ID 33 in my network.

Code: [Select]
                        for(int i = 5; i < 9; i++)        // that's only 4 bytes !
                        {
                                for(int j = 0; j < 8; j++)
                                {
                                        node_index++;

                                        if( (1 << j) & buffer[i])
                                        {
                                                handler()->insertNode(new ZWaveNode(handler()->homeID(), node_index));
                                        }
                                }
                        }

Another interesting thing I have noticed by decoding the received buffer is that some nodes are reported that do not exist physically.

Code: [Select]
35      04/06/08 11:01:00.510           ZWJobGetNodeProtocolInfo len = 8 buf = 0x01 0x41 0xc9 0x0c 0x00 0x04 0x10 0x00  <0xb6993b90> 04/06/08 11:01:00.510           Node[5] : BType = 0x02 GType = 0x02 SType = 0x00 Level = -1 <0xb6993b90>
36      04/06/08 11:01:00.510           Node[7] : BType = 0x02 GType = 0x02 SType = 0x00 Level = -1 <0xb6993b90>
36      04/06/08 11:01:00.510           Node[9] : BType = 0x03 GType = 0x11 SType = 0x00 Level = -1 <0xb6993b90>
36      04/06/08 11:01:00.510           Node[10] : BType = 0x03 GType = 0x10 SType = 0x00 Level = -1 <0xb6993b90>
36      04/06/08 11:01:00.510           Node[11] : BType = 0x03 GType = 0x10 SType = 0x00 Level = -1 <0xb6993b90>
36      04/06/08 11:01:00.510           Node[12] : BType = 0x03 GType = 0x10 SType = 0x00 Level = -1 <0xb6993b90>
36      04/06/08 11:01:00.510           Node[13] : BType = 0x02 GType = 0x02 SType = 0x00 Level = -1 <0xb6993b90>
36      04/06/08 11:01:00.510           Node[15] : BType = 0x02 GType = 0x02 SType = 0x00 Level = -1 <0xb6993b90>
36      04/06/08 11:01:00.510           Node[16] : BType = 0x03 GType = 0x11 SType = 0x00 Level = -1 <0xb6993b90>
36      04/06/08 11:01:00.510           Node[17] : BType = 0x02 GType = 0x02 SType = 0x00 Level = -1 <0xb6993b90>
36      04/06/08 11:01:00.510           Node[19] : BType = 0x02 GType = 0x02 SType = 0x00 Level = -1 <0xb6993b90>
36      04/06/08 11:01:00.510           Node[20] : BType = 0x02 GType = 0x02 SType = 0x00 Level = -1 <0xb6993b90>
36      04/06/08 11:01:00.510           Node[21] : BType = 0x02 GType = 0x02 SType = 0x00 Level = -1 <0xb6993b90>
36      04/06/08 11:01:00.510           Node[22] : BType = 0x04 GType = 0x10 SType = 0x00 Level = -1 <0xb6993b90>
36      04/06/08 11:01:00.510           Node[23] : BType = 0x04 GType = 0x12 SType = 0x00 Level = -1 <0xb6993b90>
36      04/06/08 11:01:00.510           Node[24] : BType = 0x02 GType = 0x02 SType = 0x00 Level = -1 <0xb6993b90>
36      04/06/08 11:01:00.511           Node[25] : BType = 0x04 GType = 0x11 SType = 0x00 Level = -1 <0xb6993b90>
36      04/06/08 11:01:00.511           Node[26] : BType = 0x04 GType = 0x10 SType = 0x00 Level = -1 <0xb6993b90>
36      04/06/08 11:01:00.511           Node[27] : BType = 0x02 GType = 0x02 SType = 0x00 Level = -1 <0xb6993b90>
36      04/06/08 11:01:00.511           Node[28] : BType = 0x02 GType = 0x02 SType = 0x00 Level = -1 <0xb6993b90>
36      04/06/08 11:01:00.511           Node[29] : BType = 0x04 GType = 0x11 SType = 0x00 Level = -1 <0xb6993b90>
36      04/06/08 11:01:00.511           Node[30] : BType = 0x04 GType = 0x10 SType = 0x00 Level = -1 <0xb6993b90>
36      04/06/08 11:01:00.511           Node[31] : BType = 0x04 GType = 0x20 SType = 0x00 Level = -1 <0xb6993b90>
36      04/06/08 11:01:00.511           Node[32] : BType = 0x00 GType = 0x00 SType = 0x00 Level = -1 <0xb6993b90>

but I only have physical nodes 9-12,16,22,25-26,29-33 on top of the remote controller and ZCU010.

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2421
    • View Profile
    • ago control
Re: ZWave API
« Reply #25 on: April 06, 2008, 03:42:24 pm »
can you send me the complete log with levels 36,40,41?

best regards,
Hari
rock your home - http://www.agocontrol.com home automation

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2421
    • View Profile
    • ago control
Re: ZWave API
« Reply #26 on: April 06, 2008, 04:07:52 pm »
at line 57 MAGIC_LEN is verified. Thats defined to 29. 29 * 8 = 232.

from http://www.z-wave.com/modules/xoopsfaq/index.php?cat_id=2#q26:
"A single Z-Wave network can include 232 nodes."

Coincidence? Maybe not.
please try to change "i < 9" to "i < 34".

best regards,
Hari

ps: I wish I had more Z-Wave devices for further tests. Anybody wants to buy some PLCBUS stuff?
rock your home - http://www.agocontrol.com home automation

caiman

  • Veteran
  • ***
  • Posts: 119
    • View Profile
Re: ZWave API
« Reply #27 on: April 06, 2008, 04:57:06 pm »
Hari: good catch. It gets better.

To my knowledge, the highest device ID on my network is 33 (A PIR sensor)

Without the modification (i<9) I get  http://www.k-net.eu.org/lmce/zwave-log-i9.txt.gz
The discovery stops at ID=32.
Still, it finds a lot of devices that don't exist.

Increasing to (i<34) I get http://www.k-net.eu.org/lmce/zwave-log-i34.txt.gz
It finds two new devices: the PIR with ID 33  :D but also a device 37  of type 38 (light switch dimmable). The fact that the type detected is a correct one makes me believe that it is correct, but I have no idea where that device is coming from. Hey that's maybe the way for you to get new devices at no cost :-)

Sam

1audio

  • Addicted
  • *
  • Posts: 552
    • View Profile
Re: ZWave API
« Reply #28 on: April 06, 2008, 05:12:38 pm »
Can you provide more details about your ZWave stuff? USB controller, primary controller and whose devices? If you get the ZTool software it will read back what your usb controller reports. I have only 17 lights but more than 28 slots taken. The ZWave protocol does not reuse device ID's (without some specific efforts) so when you delete a device the number is still taken. Also controllers don't show up on the LMCE side.

caiman

  • Veteran
  • ***
  • Posts: 119
    • View Profile
Re: ZWave API
« Reply #29 on: April 06, 2008, 06:06:50 pm »
Hi 1audio,

Code: [Select]
9                       38              Light_Switch_dimmable
10                      37              Light_Switch_onoff
11                      37              Light_Switch_onoff
12                      37              Light_Switch_onoff
16                      38              Light_Switch_dimmable
22                      37              Light_Switch_onoff
25                      38              Light_Switch_dimmable
26                      37              Light_Switch_onoff
29                      38              Light_Switch_dimmable
30                      37              Light_Switch_onoff
31                      1813            Generic_Sensor
32                      37              Light_Switch_onoff
33                      1813            Generic_Sensor
37                      38              Light_Switch_dimmable

the main controller is ZTH200 and usb device is ZCU010. Hari and I believe unit 37 is the ZCU010, when got a new ID after I have sent a "Reset" command to it.

With the modification above, I have reloaded router a couple of time and even rebooted the core, it seems devices are not disappearing any more. Time will tell, I'll report back later on.

Sam