Author Topic: Source-Code for Z-Wave implementation  (Read 8308 times)

thoweiss

  • Newbie
  • *
  • Posts: 5
    • View Profile
Source-Code for Z-Wave implementation
« on: July 07, 2008, 06:08:09 pm »
Hello everybody,

this is my first post in this forum  - i hope i'm on the right place.

I'm looking for the source code for the Z-Wave implementation because i would like to integrate Z-Wave into Misterhouse.

It's my favorite HomeAutomation software and i spend much time for programming Mh so i don't wont to change to LMCE (which is also a fantastic project!) Maybe i will change later...
I'm from germany and actually more and more Z-Wave Devices are available so i will replace my unreliable X-10 components.

So back to my Question:

Can somebody tell me how to find the sourcecode? I Can't find them on the SVN.

Regards,

Thorsten.


hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2428
    • View Profile
    • ago control
Re: Source-Code for Z-Wave implementation
« Reply #1 on: July 07, 2008, 06:17:22 pm »
maybe you want to come to the #linuxmce irc channel so we can discuss the topic..
best regards,
Hari
rock your home - http://www.agocontrol.com home automation

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2428
    • View Profile
    • ago control
Re: Source-Code for Z-Wave implementation
« Reply #2 on: July 07, 2008, 06:27:00 pm »
hey, you just came in and then disappeared again.. maybe you want to use a irc client and connect to the freenode network...
best regards,
Hari
rock your home - http://www.agocontrol.com home automation

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2428
    • View Profile
    • ago control
Re: Source-Code for Z-Wave implementation
« Reply #3 on: July 07, 2008, 07:15:56 pm »
ok, looks like you don't feel like doing a chat..

the ZWave driver source was removed by pluto as it has dependencies to some files without open license.
You may want to look at this thread: http://forum.linuxmce.org/index.php?topic=3987.0
The linked wiki page is an effort to collect all public available information about Z-Wave.

I started to write a new driver from scratch and now have a pretty good understanding of the protocol. Start with the article "Riding the Z-Wave" and look at the frame dumps/descriptions on the wiki page. If you already have replicated the network information to an USB Dongle, it should be pretty easy to send a basic set command to a device. If you have any questions, just post in the linked forum thread.

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

thoweiss

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: Source-Code for Z-Wave implementation
« Reply #4 on: July 08, 2008, 12:38:53 pm »
Thanks Hari for the informations...

(I'm only a short time on the chat because my Wife calls for dinner - she gets real angry if sche had to wait for me  ;D)

I think the best Way for me is to read and understand more about the zwave internals and then ask again.

I will buy some Z-wave Devices in the future and play around.

(maybe  i change my HomeAutomation to LMCE in the future)



Regards,

Thorsten.

dmurrle

  • Making baby steps
  • Posts: 3
    • View Profile
Re: Source-Code for Z-Wave implementation
« Reply #5 on: July 19, 2008, 06:55:59 pm »
Hi Hari,
I have a working home made software to controll some appliance with z-Wave, If you need I share all my sources (VB 2008 express).
I m trying to fill as much as I can on the http://wiki.linuxmce.org/index.php/ZWave_API#RZP15_Vizia_Leviton_Appliance_Module_switch but I ran into a problem with a HSM100 that is not always able to route trough the z-troller (it does works sometimes) So I was hoping maybe you could hand me some help with the routing part. I would like to be able to force the route to the z-troller with the path I choose since the auto routing  seems not very reliable with z-wave... I found in your code

#define TRANSMIT_OPTION_AUTO_ROUTE     0x04
#define TRANSMIT_OPTION_FORCE_ROUTE    0x08

So I suppose I ll have to send a command like that 01 0X 08 15 UU
but how should I define the route to the next unit who is unit 13 (vizia switch) and then the ztroller in that case? Do you have any ideas? Would you share some binary tought? :)


hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2428
    • View Profile
    • ago control
Re: Source-Code for Z-Wave implementation
« Reply #6 on: July 19, 2008, 08:05:34 pm »
Hi Hari,
I have a working home made software to controll some appliance with z-Wave, If you need I share all my sources (VB 2008 express).
I m trying to fill as much as I can on the http://wiki.linuxmce.org/index.php/ZWave_API#RZP15_Vizia_Leviton_Appliance_Module_switch but I ran into a problem with a HSM100 that is not always able to route trough the z-troller (it does works sometimes)
cool, thanks for the input. What is it assumed to route? I don't understand the exact problem.

Quote
So I was hoping maybe you could hand me some help with the routing part. I would like to be able to force the route to the z-troller with the path I choose since the auto routing  seems not very reliable with z-wave... I found in your code

#define TRANSMIT_OPTION_AUTO_ROUTE     0x04
#define TRANSMIT_OPTION_FORCE_ROUTE    0x08

So I suppose I ll have to send a command like that 01 0X 08 15 UU
but how should I define the route to the next unit who is unit 13 (vizia switch) and then the ztroller in that case? Do you have any ideas? Would you share some binary tought? :)

you usually or that values in the transmit option flag. Never played with the FORCE_ROUTE option. You may want to try to assign a return route.

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

dmurrle

  • Making baby steps
  • Posts: 3
    • View Profile
Re: Source-Code for Z-Wave implementation
« Reply #7 on: July 20, 2008, 03:29:31 pm »
I did put some code to explain. In that case, I have 2 devices
The motion detector 0D  and the switch for the light  0E
In that case the transaction worked but took 1 second until I got the light ON
I am not sure to understand why... I suppose that the device took another path to transmit the signal but why did the device sent 2 times that a motion was detected since closer devices from the Master only say it once. Did my answer to the motion detector to say that I received was not received? If the motion detector repeat the motion detection it probably believe that I did not received the message...
Some times It goes faster, some time I receive the motion detection 4 consecutives times...
I believe that the routing here is in cause So that's the reason I would like to be able to order my own routing. With your answer I am not able to understand what would be the command to ask for a specific return path? Do you have any samples that I could try?

Here I receive the motion notification
07-20-2008-08.16.12.988R<-- 01 09 00 04 00 0D 03 20 01 FF 22
I answer that I received
07-20-2008-08.16.12.988S-->06

Because of the motion I send the request to switch the light ON
07-20-2008-08.16.12.998S-->010A00130E032001FF050333
The device signal again that it detected a move
07-20-2008-08.16.13.028R<-- 01 09 00 04 00 0D 03 20 01 FF 22 06   01 04 01 13 01 E8   01 04 01 13 01 E8
I answer again that I received
07-20-2008-08.16.13.038S-->06


I Switch On again since I m not sure that he received my request the first time
07-20-2008-08.16.13.048S-->010A00130E032001FF050333
This time I receive a confirmation
07-20-2008-08.16.13.068R<-- 06 01 04 01 13 01 E8
I answer I received
07-20-2008-08.16.13.068S-->06


Since the motion detector is awake for about 2 seconds I request the % light in that room
07-20-2008-08.16.13.659S-->010C00130D0560060331040503BE
I receive the reception confirmation
07-20-2008-08.16.13.669R<-- 06 01 04 01 13 01 E8
I confirmer I received
07-20-2008-08.16.13.669S-->06
I do not know the meaning
07-20-2008-08.16.13.709R<-- 01 05 00 13 03 00 EA   01 05 00 13 03 00 EA
I confirm I received
07-20-2008-08.16.13.709S-->06
I do not know the meaning
07-20-2008-08.16.13.949R<-- 01 05 00 13 03 00 EA   01 05 00 13 03 00 EA
I confirm I received
07-20-2008-08.16.13.949S-->06
Since the motion detector is probably still awake I request the temperature light in that room
07-20-2008-08.16.14.160S-->010C00130D0560060231040503BF
confirmation he received
07-20-2008-08.16.14.190R<-- 06 01 04 01 13 01 E8
I confirm
07-20-2008-08.16.14.190S-->06
.
.
.
« Last Edit: July 20, 2008, 03:31:48 pm by dmurrle »

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2428
    • View Profile
    • ago control
Re: Source-Code for Z-Wave implementation
« Reply #8 on: August 13, 2008, 08:26:13 pm »

.
.
.

sorry, missed your post.. do you still have troubles with that?

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

dmurrle

  • Making baby steps
  • Posts: 3
    • View Profile
Re: Source-Code for Z-Wave implementation
« Reply #9 on: August 16, 2008, 11:53:22 pm »
Yes, I do. In the meantime I switched to control IR devices (AC, TV...) with the USB-IRT. I moved the z-troller master controller to another room to see if that would change something but the issue is random. I start to believe that the z-troller is guilty of not routing always properly the messages back. By adding devices and have the mesh network more dense I hope it will solve the issue...

hitechshiva

  • Guest
Re: Source-Code for Z-Wave implementation
« Reply #10 on: July 15, 2009, 01:24:25 pm »
Hi All,
I have doubt regarding the use of open source Zwave API being developed...
can we package the open z wave driver in any form of commercial products without worrying abt zensys driver.. i mean without buying their API license..

Just curious..

Shiva

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2428
    • View Profile
    • ago control
Re: Source-Code for Z-Wave implementation
« Reply #11 on: July 15, 2009, 03:10:30 pm »
our code does not include any header files from the zensys sdk. It is all GPL. So if you obey the GNU Public License, you should be safe (but I am not a lawyer, this is no legal advice).
br, hari
rock your home - http://www.agocontrol.com home automation