genielabs / zwave-lib-dotnet

Z-Wave Home Automation library for .NET / Mono
Apache License 2.0
63 stars 37 forks source link

Queued Messages (for battery operated devices) #42

Closed marcus-j-davies closed 3 years ago

marcus-j-davies commented 4 years ago

Hello,

I begin with a huge thanks for this zwave lib project. I have successfully integrated this into a .net executable, which is actually the bases of a Node-Red node. allowing zwave functionality in Node-Red - it works really really well. you are of course credited.

I do however have a question: For battery operated devices - I seem to not be able to get messages out to such device. looking through the source code, it seems to reference queuing the message, if its not awake.

Later, when such devices wake up - my message does not seem to get sent, so I resort in sending messages, upon receiving the Wake Interval event, as a-posed to the lib queuing a message.

Am I missing something here, or does the lib not actually queue anything?

Many Thanks

marcus-j-davies commented 4 years ago

it's awfully quiet here!?

Bounz commented 4 years ago

Hi, Marcus!

Hmm, actually it should work as stated here https://github.com/genielabs/zwave-lib-dotnet/blob/master/ZWaveLib/ZWaveController.cs#L788 and in https://github.com/genielabs/zwave-lib-dotnet/blob/master/ZWaveLib/CommandClasses/WakeUp.cs, but I has lack of time to debug it locally on my dev machine. You can add additional logging or debug it (or I'll try to do it in a couple of days).

marcus-j-davies commented 4 years ago

Hi Bounz,

I don't call Discovery could that be a reason for the lib not knowing it can queue the message? I don't call Discovery as the lib functions normally without doing so.

Bounz commented 4 years ago

Yes, it could be the reason because the lib should know command classes supported by the node (specifically WakeUp Command Class) to schedule messages to send later.

marcus-j-davies commented 4 years ago

I will try this evening.

Thank you