LinuxMCE Forums

General => Developers => Topic started by: kinman on December 21, 2007, 06:18:08 am

Title: Questions on ZWave source code
Post by: kinman on December 21, 2007, 06:18:08 am
Dear all, I have looked at the ZWave source code (LinuxMCE-1.1-SRC/src/ZWave) and I have some questions:
- Is there any document such as command reference or programming guide for the ZWave computer interface?
- What is the difference between asynchronize and synchronize mode?
- In my understanding, the ZWave computer interface seems to be a passive device, the software send a command to and then wait for response from it. How the software receive PIR events/triggers from the computer interface?

cheers /kin
Title: Re: Questions on ZWave source code
Post by: PeteK on December 21, 2007, 06:40:27 am
The design for the Z-wave code has an interface that communicates with the DCE router (Zwave.cpp), and inserts Zwave jobs into a queue.  This queue is read by the low-level Z-wave interface PlutoZWSerialApi(.h,.cpp), which handles the low-level communication with the Zwave transciever.

Asynchronous mode creates threads that run this process asynchronously, with the DCE interface adding jobs to the queue and the Z-wave interface removing them as quickly as it can.  The threads are synchronized via mutexs in order to keep things in line.
Synchronous mode has the DCE interface send commands directly to the Z-wave interface.

SerialConnection.* is a layer over the serial communication which takes care about the general protocol specification like communication parameters, the start of every message, the checksum algorithm etc.

The Zwave computer interface is a bi-directional serial device, so when it receives notifications from other devices, it can pass them on to the PC.
Title: Re: Questions on ZWave source code
Post by: ddamron on December 21, 2007, 08:01:36 am
Is the ZWave driver bidirectional?  I was under the impression it wasn't..

If so, HOW do they set the device state?!?!?!?!? (I can only find events ON/OFF to fire )
:)
Title: Re: Questions on ZWave source code
Post by: PeteK on December 21, 2007, 08:48:45 am
Currently, it only fires PIR sensor commands.  It doesn't feed back light states, though a lot of the polling code is in there.  I'll poke back around in it this weekend and see if there are any more clues in there.
Title: Re: Questions on ZWave source code
Post by: ddamron on December 21, 2007, 09:03:25 am
Thanks Pete, I started another thread where I found where the state is saved in the database...
but I really don't want to modify the database if I don't have to..
Title: Re: Questions on ZWave source code
Post by: kinman on December 21, 2007, 10:09:43 am
Thank you Pete. It seems the programming document for ZWave interface is only for hardware and software vendors internal use. Otherwise I have to reverse engineering the LinuxMCE-1.1-SRC/src/ZWave.

Can I say that asynchronous mode is multi-thread? synchronous mode is single-thread and the commands/responses are sent/received sequencially?

Can I treat the ZWave computer interface as a Hayes modem? Send "AT" command and wait for "OK". Except that PIR events will be received without sending command.
Title: Re: Questions on ZWave source code
Post by: PeteK on December 21, 2007, 05:23:54 pm
You are exactly correct in that the asynchronous mode is multi-threaded.  The synchronous mode is single-threaded.  As for treating the interface as a modem, I'm not exactly sure what you mean.  When you send an ON/OFF command, it sends that command to the transciever, then waits for a reply or a timeout, and passes that information back.

Unfortunately, Zensys charges a lot for the dev. kit and access to the protocol documentation.  The Pluto guys may have the latest versions, and depending on the licensing, may be able to release them.
Title: Re: Questions on ZWave source code
Post by: kinman on December 21, 2007, 06:55:33 pm
I got it Pete! I find those commercial software for ZWave are lack of flexibility. MrHouse has limited support for ZWave. It seems the ultimate solution is Pluto/LinuxMCE. Instead of looking for document and source code, I better learn how to program on the DCE platform.
Title: Re: Questions on ZWave source code
Post by: PeteK on December 21, 2007, 07:12:41 pm
Sounds good.  Let me know how I can help.  The more automation options the better.  There's been rumor of updated Zwave support in this new release, but I haven't heard anything for sure.  The current Zwave implementation only supports a few, out of production adapters, so there is a strong need to update it to support modern adapters with the current Zwave protocol.
Title: Re: Questions on ZWave source code
Post by: totallymaxed on December 21, 2007, 09:39:00 pm
Sounds good.  Let me know how I can help.  The more automation options the better.  There's been rumor of updated Zwave support in this new release, but I haven't heard anything for sure.  The current Zwave implementation only supports a few, out of production adapters, so there is a strong need to update it to support modern adapters with the current Zwave protocol.

Hmmm... well I may have been the source for that little rumour. Unfortunately the main Z-wave engineer at Pluto has recently moved on to another company so this has not happened!

Please send me a private message as I might be able to help you on the tech documentation etc etc.

Merry Christmas

Andrew
Title: Re: Questions on ZWave source code
Post by: PeteK on December 21, 2007, 09:44:19 pm
Not Eugen?
Title: Re: Questions on ZWave source code
Post by: totallymaxed on December 21, 2007, 09:56:46 pm
Not Eugen?

Yep... afraid so :-(
Title: Re: Questions on ZWave source code
Post by: kinman on December 22, 2007, 10:38:23 am
I find Pete is the new author :D

// Author: PeteK <pete.k@plutohome.com>, (C) 2007
Title: Re: Questions on ZWave source code
Post by: ddamron on December 22, 2007, 10:51:27 am
Kinman,

I'm integrating the Insteon PLM using GSD/Ruby.. and I'm almost done.
I've learned quite a bit of 'tricks'...
if your serious about zwave integration via gsd, keep in touch with Pete and myself...
I wonder if the pluto team would 'lend' the devkit out...
ahh well, lemme finish the Insteon, then worry about the zwave...

Regards,
Dan
Title: Re: Questions on ZWave source code
Post by: kinman on December 24, 2007, 04:14:38 am
Hi Dan/Pete, I am interesting in ZWave using GSD: LinuxMCE-1.1-SRC/src/Generic_Serial_Device/Embedded Devices/*/Ruby/ do you mean we can just work on *.rb no need *.cpp/*.h? Because I am familiar on Perl and afraid of thousand lines of C codes.

cheers/kin

Title: Re: Questions on ZWave source code
Post by: kinman on December 24, 2007, 04:42:55 am
ZWave computer interface fires only PIR sensor commands.
Computer <--- Interface <--- PIR

The light states can be polled passively.
Computer ---> Interface ---> Switch/Dimmer (ZRW/ZDW)

Transmitter controls other devices, so the computer interface should be able to receive those signals.
Transmitter (ZTW) ---> Plug-in module (ZRP)

Do you think it is a computer interface firmware issue it cannot fires transmitter or remote control commands? or it is a design issue?
Title: Re: Questions on ZWave source code
Post by: PeteK on December 24, 2007, 06:28:26 am
The Zwave interface device should be able to receive commands from other transmitters.  All it should take is some coding to process the commands.  Does this answer your question?
Title: Re: Questions on ZWave source code
Post by: ddamron on December 24, 2007, 08:07:03 am
Hi Dan/Pete, I am interesting in ZWave using GSD: LinuxMCE-1.1-SRC/src/Generic_Serial_Device/Embedded Devices/*/Ruby/ do you mean we can just work on *.rb no need *.cpp/*.h? Because I am familiar on Perl and afraid of thousand lines of C codes.

cheers/kin



I'm just putting the finishing touches on my Insteon PLM interface, completely done in GSD/Ruby.

Ruby has it's limitations, as I found out, but a good programmer will find a way around them..

I'd have to say, the most limiting factor of Ruby is it's single thread..  That's a pain... but still workable..

This is my first experience in Ruby... so it's been a long haul, trying to learn the syntax, command structure, etc..

I must say, now that I know more about it, I'll be using it more often...  It's got HUGE potential..

I would say it is possible to implement ZWave in Ruby... heck, I did Insteon!

That said, I guess I should look into exactly what's required.. to tell you the truth, I haven't looked at ZWave's command structure very much..

I'm assuming it's probably similar to Insteon..

Good Luck, and Have Fun!

Dan
Title: Re: Questions on ZWave source code
Post by: kinman on December 24, 2007, 08:33:55 am
The Zwave interface device should be able to receive commands from other transmitters.  All it should take is some coding to process the commands.  Does this answer your question?
Oh I see. All are about coding.
Because I find it contradictory. There are polling codes to get states from switch. But the switch itself send commands to the computer interface actively. It sounds different software implementation.
Title: Re: Questions on ZWave source code
Post by: kinman on December 24, 2007, 08:50:11 am
Hi Dan/Pete, I am interesting in ZWave using GSD: LinuxMCE-1.1-SRC/src/Generic_Serial_Device/Embedded Devices/*/Ruby/ do you mean we can just work on *.rb no need *.cpp/*.h? Because I am familiar on Perl and afraid of thousand lines of C codes.

cheers/kin



I'm just putting the finishing touches on my Insteon PLM interface, completely done in GSD/Ruby.

Ruby has it's limitations, as I found out, but a good programmer will find a way around them..

I'd have to say, the most limiting factor of Ruby is it's single thread..  That's a pain... but still workable..

This is my first experience in Ruby... so it's been a long haul, trying to learn the syntax, command structure, etc..

I must say, now that I know more about it, I'll be using it more often...  It's got HUGE potential..

I would say it is possible to implement ZWave in Ruby... heck, I did Insteon!

That said, I guess I should look into exactly what's required.. to tell you the truth, I haven't looked at ZWave's command structure very much..

I'm assuming it's probably similar to Insteon..

Good Luck, and Have Fun!

Dan


Do you think the GSD can be implemented in Perl? Both are Gem  :D
If I try to implement the ZWave using GSD, do I need the devkit document? Is there any other way to learn the interface commands?
Can I take a look on your Insteon PLM interface? I can find three devices under LinuxMCE-1.1-SRC: 1767 DSC Power5020 Serial, 1781 Apex Destiny 6100, Denon-AVCA1SRA.
Title: Re: Questions on ZWave source code
Post by: ddamron on December 24, 2007, 08:57:22 am
Kinman,

Look at other threads in the developers' section, you'll find older versions of my code all over...

I think someone is working on implementing Perl as an alternative GSD language.  check other threads again...

You will MOST DEFINATELY NEED the ZWave devkit.  No Question.  If you don't have it, don't try.  :o

Happy Coding!

Dan


Title: Re: Questions on ZWave source code
Post by: ddamron on December 24, 2007, 11:24:16 am
Please don't take that last comment the wrong way..
I don't like flamers, and I will NOT flame here.

you really really will need the devkit :)

Dan
Title: Re: Questions on ZWave source code
Post by: 1audio on December 24, 2007, 07:59:01 pm
The ZWave lights reporting back to the controller isn't a technology issue. Its a patent mess. Lutron has a patent on a light switch reporting via radio when its switched. Within days of Leviton shipping their first switch with their implementation of the feedback they got sued. These are both $B+ companies with big legal resources.

The ZWave interface code is all propriatary and only available under NDA. (Why, I don't know, since it only works with chips they sell). Pluto has a license and may be able to share it with developers who sign an agreement under the license. Not very open source but probably the only way. ZWave is on its third generation chips and the stuff works pretty well. The Pluto ZWave code has some bugs and needs some enhancements. And the USB interfaces on the market all are a problem under Linux. The Leviton interface is serial so it should be easy to integrate, however not yet. It may be possible to implement the Leviton feedback feature as well, but only as protected code.

Why ZWave, with the Insteon stuff almost done? There is a battle for what the industry sees as a big opportunity. Some private solutions like Lutron are doing very well. Zen-sys and Insteon are trying to get in as are UPB, Echelon and possibly others. Insteon has a broad product offering due to the parent company's business of selling home automation stuff to geeks. Zen-sys went after big players and landed some major customers- Cooper, Leviton and Intermatic. This leaves only smaller players for the other technologies. And over the next few years we will probably see a lot of ZWave lighting stuff at retail. The Intermatic stuff is in Home Depots and Lowes around the US already. Unfortunately except for lighting there isn't much other ZWave stuff of interest yet. A few thermotats, some PIR's and not much else yet.
Title: Re: Questions on ZWave source code
Post by: PeteK on December 24, 2007, 08:06:15 pm
The issue with Insteon is that it's a 120V/60Hz solution currently.  Technical work-arounds of the Zwave patent have occured such that I believe more 2-way devices are availalbe.  In the absence of that, polling can accomplish light state maintainence as well.
Title: Re: Questions on ZWave source code
Post by: kinman on December 25, 2007, 05:03:58 am
Please don't take that last comment the wrong way..
I don't like flamers, and I will NOT flame here.

you really really will need the devkit :)

Dan

Never mind! I wonder if Pluto will lend this document:
Zensys, INS10247, Instruction, Z-Wave™ ZW0102/ZW0201 Appl. Prg. Guide
The relation between Pluto and Linuxmce sounds like Redhat and Linux. They are willing to release their C source code. I think we can try to contact Pluto something like "any programmer freelance available ???".
Title: Re: Questions on ZWave source code
Post by: kinman on December 25, 2007, 05:21:33 am
The issue with Insteon is that it's a 120V/60Hz solution currently.  Technical work-arounds of the Zwave patent have occured such that I believe more 2-way devices are availalbe.  In the absence of that, polling can accomplish light state maintainence as well.
Yes! Insteon is the best, but 120V and no european square electrical box  >:( Insteon just says no plan for 240V (also patent issue? ) It should be an easy job by changing the resistor capacitor value. Do you know which brand is trying to bypass the patent? I find the polling method has some limitations for example, someone press the light switch, states report back to controller and the computer decides to turn on the light.
Title: Re: Questions on ZWave source code
Post by: kinman on December 25, 2007, 05:26:49 am
The ZWave lights reporting back to the controller isn't a technology issue. Its a patent mess. Lutron has a patent on a light switch reporting via radio when its switched. Within days of Leviton shipping their first switch with their implementation of the feedback they got sued. These are both $B+ companies with big legal resources.
Lutron does not produce 240V switch. My area is 240V and I discover a new patent: A 240V light switch reporting via radio when its switched.  :D
Title: Re: Questions on ZWave source code
Post by: kinman on December 25, 2007, 05:34:38 am
The ZWave lights reporting back to the controller isn't a technology issue. Its a patent mess. Lutron has a patent on a light switch reporting via radio when its switched. Within days of Leviton shipping their first switch with their implementation of the feedback they got sued. These are both $B+ companies with big legal resources.
Zen-sys and Lutron sounds like netscape invent the browser, M$ft get the patent.
Title: Re: Questions on ZWave source code
Post by: kinman on December 25, 2007, 05:43:33 am
The ZWave interface code is all propriatary and only available under NDA. (Why, I don't know, since it only works with chips they sell). Pluto has a license and may be able to share it with developers who sign an agreement under the license. Not very open source but probably the only way. ZWave is on its third generation chips and the stuff works pretty well. The Pluto ZWave code has some bugs and needs some enhancements. And the USB interfaces on the market all are a problem under Linux. The Leviton interface is serial so it should be easy to integrate, however not yet. It may be possible to implement the Leviton feedback feature as well, but only as protected code.
Woo you are an insider... Do you have contact person of Pluto? We don't need the whole devkit but just one or two pdf. Do you know why Pluto works on ZWave cpp and not go for GSD/Ruby? Yes USB a problem under Linux. Also the reliability of serial is better than USB.
Title: Re: Questions on ZWave source code
Post by: ddamron on December 25, 2007, 05:51:50 am
Kinman,
Are you for real?!?
There's lots of documentation out there..
There ARE reasons to program in C++ vs Ruby
If I know C++, I would have programmed in that instead.
The only reasons I did it in Ruby were:
1.  It was available
2.  Less of a learning curve..
3.  It's INTERPRETED.. meaning I could test my code instantly to make sure it worked.

I would suggest you start READING some wiki's on THIS site.

Nobody spoon fed me with code, I had to dig, lots of trial and error...

I coughed up the $$ for Insteon Devkit, even though Pluto has one too..

Search the wiki for GSD RUBY... that should give you a start..

Regards,

Dan
Title: Re: Questions on ZWave source code
Post by: kinman on December 25, 2007, 06:00:08 am
Why ZWave, with the Insteon stuff almost done? There is a battle for what the industry sees as a big opportunity. Some private solutions like Lutron are doing very well. Zen-sys and Insteon are trying to get in as are UPB, Echelon and possibly others. Insteon has a broad product offering due to the parent company's business of selling home automation stuff to geeks. Zen-sys went after big players and landed some major customers- Cooper, Leviton and Intermatic. This leaves only smaller players for the other technologies. And over the next few years we will probably see a lot of ZWave lighting stuff at retail. The Intermatic stuff is in Home Depots and Lowes around the US already. Unfortunately except for lighting there isn't much other ZWave stuff of interest yet. A few thermotats, some PIR's and not much else yet.
I am forced to choose ZWave. Insteon do not product 240V. And those powerline signals will interfere my audio amp. It needs a lot of filters, transformer to reduce it. Clipsal use CAT5 but need to re-wire everything. Its expensive and not open source.
Title: Re: Questions on ZWave source code
Post by: kinman on December 25, 2007, 06:05:44 am
Kinman,
Are you for real?!?
There's lots of documentation out there..
There ARE reasons to program in C++ vs Ruby
If I know C++, I would have programmed in that instead.
The only reasons I did it in Ruby were:
1.  It was available
2.  Less of a learning curve..
3.  It's INTERPRETED.. meaning I could test my code instantly to make sure it worked.

I would suggest you start READING some wiki's on THIS site.

Nobody spoon fed me with code, I had to dig, lots of trial and error...

I coughed up the $$ for Insteon Devkit, even though Pluto has one too..

Search the wiki for GSD RUBY... that should give you a start..
Thanks Dan. Let me scan through the wiki 1st.
Title: Re: Questions on ZWave source code
Post by: 1audio on December 25, 2007, 07:26:12 am
The Insteon dev kit is not cheap but the Zen-sys one is expensive at over $5K last I looked. I can contact my sources about making the details available under NDA. Once you sign the agreement with Zen-sys there are no other options unless Zen-sys changes the rules. ZWave is difficult to write for. Its got a lot of low level stuff to deal with, a consequence of making the chips as small and cheap as possible. The code in some of the commercial switches took six months to get right and the better handheld remotes were a year project to get working.
The best case would be to get a few volunteers to sign an NDA and work with the existing code. I can make some of the tools available and samples devices once there is a commitment in place and Pluto agrees. Unfortunately since its commercial it can't be published as source code under any of the open licenses.
Title: Re: Questions on ZWave source code
Post by: ddamron on December 25, 2007, 07:35:51 am
Wouldn't that be a show stopper for developing it in Ruby?
Title: Re: Questions on ZWave source code
Post by: 1audio on December 25, 2007, 07:46:12 am
A really crack programmer can overcome any hurdle (just add a link to the machine code somewhere..and hand tune it). Actually I don't know. However for something like the ZWave system an interpreted language may add a lot of overhead, Not important until the system is at its limits playing an H.264 HD file at 50 MBps. And the low level stuff and code examples from Zen-sys are all in C I think.
Title: Re: Questions on ZWave source code
Post by: ddamron on December 25, 2007, 10:04:33 am
hmm... Timing might prove tough...
I'm surprised they don't handle all that in their chips...  There are certain timing considerations for Insteon too, but the PLM pretty much insulates the programmer from them...  The new versions of the PLM can communicate full bore..  while the older versions required you to wait until it echoed your character back before you send another one..

Ahh well, I guess I'll have to knuckle down and learn C++..

All in good time..

Dan
Title: Re: Questions on ZWave source code
Post by: totallymaxed on December 25, 2007, 11:49:17 am
The Insteon dev kit is not cheap but the Zen-sys one is expensive at over $5K last I looked. I can contact my sources about making the details available under NDA. Once you sign the agreement with Zen-sys there are no other options unless Zen-sys changes the rules. ZWave is difficult to write for. Its got a lot of low level stuff to deal with, a consequence of making the chips as small and cheap as possible. The code in some of the commercial switches took six months to get right and the better handheld remotes were a year project to get working.
The best case would be to get a few volunteers to sign an NDA and work with the existing code. I can make some of the tools available and samples devices once there is a commitment in place and Pluto agrees. Unfortunately since its commercial it can't be published as source code under any of the open licenses.

I don't know about the Insteon dev kit but the Zensys Dev Kit is primarily aimed at companies for sure but also at companies that are looking at intergrating Z-wave into a hardware product of some description. What we need inside lmce is good control/setup od commercially available Z-wave devices. We can do that, as we do now with the current z-wave binaries, using usb/serial interfaces. The key here is to understand the protocols and requirements for maintaining 2-way comms with the z-wave devices on the z-wave network. No Zensys source code is needed to do that. However the Zensys Dev Kit has good docs and example code to help educate yourself on how this is done.
Title: Re: Questions on ZWave source code
Post by: ddamron on December 25, 2007, 12:12:44 pm
Umm... yeah..  The Insteon devkit is same.. very technical, which is nice...

Lemme finish with the Insteon, I had a meltdown today :(..
I broke my install, trying to get my MD going, I MUST have deleted my DCERouter..
Anywho, I've got it reinstalled, and have a complete backup of my code.. phew!

So, all development I wanted to get done, didn't.

I'd like to have it all completed before 2008..

so now, I'm rebuilding everything, I have a backup from the old system, I just don't want to install it, it MAY remove this DCE..
so, I'm adding devices, etc..

I think I needed to reinstall anyway, I think my old system was getting warped from all the tests I've been doing..
suttle tweaks that don't quite work... hehe

After my insteon, I'll take a closer look into the zwave..  I might be able to use the same 'framework'... who knows..

Oh yeah, Merry christmas!

Dan
Title: Re: Questions on ZWave source code
Post by: kinman on December 28, 2007, 02:39:06 am
A ZWave packet sniffer captures the activities from wall switch. If LinuxMCE supports this device and receives the light states like PIR does, will Lutron sue LinuxMCE as a software solution?
Title: Re: Questions on ZWave source code
Post by: ddamron on December 28, 2007, 02:51:35 am
Did Lutron make the packet sniffer???
Title: Re: Questions on ZWave source code
Post by: kinman on December 28, 2007, 03:30:32 am
I don't think so I can only see all are end user products.
Title: Re: Questions on ZWave source code
Post by: ddamron on December 28, 2007, 04:14:41 am
Can you rephrase that, I read your reply 3 times, and still can't understand it...
Title: Re: Questions on ZWave source code
Post by: 1audio on December 28, 2007, 04:19:40 am
In ZWave there is a signal that comes from the switch when you press it but its low level and meant to only reach a controller within 3 feet. Its not sent around the network. In the Leviton version of the system they program their switches to send a signal to the controller over the network.

The Zniffer is not a product. Its only a developer tool to look at signals. Leviton and Lutron announced a settlement this month. No details however.
       
The ZWave stack in LMCE needs some work and it may be possible to license the Leviton technology as long as it supports the Leviton switches only to add to it. Any volunteers to work on it? It may require NDA's etc to be able to work on it.
Title: Re: Questions on ZWave source code
Post by: kinman on December 28, 2007, 04:27:57 am
Can you rephrase that, I read your reply 3 times, and still can't understand it...

Ooops sorry. I can only find the consumer products from Lutron. They don't sell RF sniffer.
Title: Re: Questions on ZWave source code
Post by: kinman on December 28, 2007, 04:36:40 am
In ZWave there is a signal that comes from the switch when you press it but its low level and meant to only reach a controller within 3 feet. Its not sent around the network. In the Leviton version of the system they program their switches to send a signal to the controller over the network.
Hi 1audio, if the signal from the switch is not sent over the network, how can be a plugin module associated with the transmitter/switch?
Title: Re: Questions on ZWave source code
Post by: kinman on December 28, 2007, 04:44:57 am
The Zniffer is not a product. Its only a developer tool to look at signals. Leviton and Lutron announced a settlement this month. No details however.
If the suit is settle and Leviton keeps this "technology", its good for LinuxMCE to support Leviton.
Title: Re: Questions on ZWave source code
Post by: kinman on December 28, 2007, 04:50:33 am
The ZWave stack in LMCE needs some work and it may be possible to license the Leviton technology as long as it supports the Leviton switches only to add to it. Any volunteers to work on it? It may require NDA's etc to be able to work on it.
Is Leviton computer interface compatible with ACT ZCS/ZCU? It seems the Zen-sys document just mention ZCS/ZCU.
Title: Re: Questions on ZWave source code
Post by: kinman on December 28, 2007, 05:08:01 am
Leviton to Pay Lutron in Settlement
http://resmagonline.com/articles/publish/article_2186.shtml
Title: Re: Questions on ZWave source code
Post by: kinman on December 28, 2007, 05:36:33 am
Hi all, I go through the ZWave stack. The structure is not complex as i was though:

Main process
├ZWJobAssignReturnRoute
├ZWJobAssociationSet
├ZWJobConfig
├ZWJobDeleteRoute
├ZWJobInitialize
|├ZWJobGetID
|├ZWJobGetInitData
|├ZWJobGetNodeProtocolInfo
|├ZWJobGetSUC
|└ZWJobGetVersion
├ZWJobPool
|└ZWJobSwitchBinaryGet
├ZWJobReceive
├ZWJobReset
├ZWJobSetLearnMode
├ZWJobSwitchChangeLevel
└ZWJobWakeUp

Some basic objects:
-SerialConnection
-PlutoZWSerialAPI
-ZWaveJob
-ZWaveNode
-ZWJobSendData

The PIR method is complex its two way status feedback:
-wakeupPIRHandler
-alarmPIRHandler
Title: Re: Questions on ZWave source code
Post by: 1audio on December 28, 2007, 06:03:35 am
The Leviton module has a serial interface and should look like the generic ZWave device except for some additional special classes that are supported. LMCE doesn't know how to talk to a serial ZWave interface yet. (Hint)

The Pluto ZWave implementation has one serious bug in it- if there is a gap in the node sequence it periodically looses the nodes after the gap and reinstalls them as new nodes. They then need to be reassigned, etc. I have tried to work with Pluto on this with no success. Its not easy to troubleshoot.

ZWave has a lot of additional features that can be supported, including a special command to switch a group of lights in one command as well as support for a lot of stuff that hasn't been made yet.
Title: Re: Questions on ZWave source code
Post by: ddamron on December 28, 2007, 06:13:21 am
Insteon has support for that as well, but here's the catch:

LMCE does NOT have support for that...  Sure, you have groups, and scenarios...
but the DCERouter handles ALL the scenario commands, and preprocesses them into standard commands to each device.

Also, I have yet to find a method to READ scenario information.

Regards,

Dan
Title: Re: Questions on ZWave source code
Post by: totallymaxed on December 28, 2007, 01:36:30 pm
Insteon has support for that as well, but here's the catch:

LMCE does NOT have support for that...  Sure, you have groups, and scenarios...
but the DCERouter handles ALL the scenario commands, and preprocesses them into standard commands to each device.

Also, I have yet to find a method to READ scenario information.

Regards,

Dan


Yes... thats a good point. In many situations the DCErouter will preprocess a command to a group of devices eg 6 lights which means that 6 discrete 'on' commands are sent and you see a slight out of phase affect where the lights actually do not go to their 'on' state synchronously. It would be better to exploit the native z-wave/insteon ability to manage groups of devices and send a single 'on' command to the z-wave/insteon group and then let the z-wave/insteon firmware handle the synchronous 'on' command. This better exploits the unique capabilities of the respective z-wave/insteon system and also means that if you use a 'physical' switch or non lmce remote to turn on/off devices or want to still have control of your lighting and other devices without always having to use lmce to send commands to control them then you can. At present if I manually change the state of a z-wave device... lmce knows nothing about it (no state information is handled by lmce currently) and if i use z-wave's group feature also lmce is oblivious to it.

The current Z-wave binary is a very basic driver... we need a more elegant implementation that fully exploits each systems (ie z-wave, insteon... etc etc) feature set in my opinion.
Title: Re: Questions on ZWave source code
Post by: ddamron on December 28, 2007, 01:43:02 pm
My Insteon Driver does report state information, but I can only report ON/OFF...
I cannot report a 50% level...
so, if it's on at all, I report ON.

My 2way insteon driver works quite well, given the limitations I'm working with...

Ahh well, room for future expansion... Once LMCE is able to accept STATE information (or we can find a work around)

The Scenario situation, IMHO, is also just as important..  There SHOULD be an option somewhere to 'Preprocess this scenario' YES/NO
if it's NO, the scenario reports a 'special scenario' command to the DCERouter, which then forwards it, without preprocessing it, to the device (or devices) responsible (ie, parent devices, MD's etc)

Regards,

Dan