Hey Jan,

Nice to see you back :)

 
I'll take a look at this tonight - I simply moved the original piece of code from the WAKEUP notification to a separate function so that it can be called with the application notification is also received (which is what OZW does).

 
I found that my keyfob doesn't (by default) send the wakeup notification - it sends the application notification and if you also want wakeup, it needs to be enabled (which is impossible without this modification - or using something else like OZW).

 
Anyway, I'll take another look at this tonight to make sure that I haven't missed something.

 
Cheers

Chris
 
-----Original message-----
From:Jan-Willem Spuij <notifications@github.com>
Sent:Thu 09-01-2014 07:35
Subject:Re: [openhab] Zwave wakeup (#718)
To:openhab/openhab <openhab@noreply.github.com>; 
CC:Chris Jackson <chris@cd-jackson.com>; 
 

In bundles/binding/org.openhab.binding.zwave/src/main/java/org/openhab/binding/zwave/internal/protocol/commandclass/ZWaveWakeUpCommandClass.java:

 


> @@ -180,17 +180,8 @@ public void handleApplicationCommandRequest(SerialMessage serialMessage, >  					return; >  				} >   > -				logger.debug("Sending {} messages from the wake-up queue of node {}", this.wakeUpQueue.size(), this.getNode().getNodeId()); > - > -				// handle all messages in the wake-up queue for this node. > -				while (!this.wakeUpQueue.isEmpty()) { > -					serialMessage = this.wakeUpQueue.poll(); > -					this.getController().sendData(serialMessage); > -				} > -				 > -				// no more information. Go back to sleep. > -				logger.trace("No more messages, go back to sleep node {}", this.getNode().getNodeId()); > -				this.getController().sendData(this.getNoMoreInformationMessage()); > +				// Empty the pending queue > +				sendPending(); 

 

I'm pretty sure this merge is incorrect. Because a few lines down the wake-up queue is checked for emptyness and now it's always emtpy.

 

—
Reply to this email directly or view it on GitHub.