Matt, one suggestion that may resolve the need for QueuedCommand visibility... What I would like is to simply be notified when my battery powered Z-Wave devices are awake (primarily to my locks) so that my plugIn can send a command when the device is receptive for a command. I notice that sending a z wave command to a lock while it is sleeping stalls Z Wave communication for several seconds (for all devices it appears)... this causes me to miss (or delay) commands from motion sensors. I would be happy to queue my commands up myself and send them when I'm notified that the device is awake, or, if you could give us a method to send a z wave command to a device only when it is awake, you can queue them yourself - though I think the former is more flexible.
Option 1
Currently you detect wake condition when you have a device parameter update command waiting (I see this frequently on the motion sensors)... When you know the device has transitioned to wake, send an event to subscribed listeners to indicate the device being awake. We can have a deviceUpdated event that indicates the device is now awake (and also when it is asleep I suppose). This is my favorite option because I feel it is probably less impact on your side, and gives me greater control.
Option 2
Similarly, if you want to do the command queuing yourself, you can expose a flag as follows...
resultCode = indigo.insteon.sendRawExtended(self.theIndigoDevice.address, theCommand, waitUntilAck=atWake) # atWake flag as opposed to ackWait (or similar mechanism)
resultCode = indigo.insteon.sendRaw(self.theIndigoDevice.address, theCommand, waitUntilAck=atWake) # atWake flag as opposed to ackWait (or similar mechanism)
This is my less favored approach because it will cause us plug in developers to ask you to support queue control including dequeuing, ordering etc... the former way puts the burden on us, the plug in developers with probably less change on your end.
I can prototype this in an ugly way by requesting a meaningless parameter change request, then watch the log for its effect, then send my actual desired command at that time (assuming the device is awake for a few seconds), but I don't know how your code is structures and how much burden this would add to the system (so I won't). Currently, Im just living with the 30 second timeout (where motion sensors are delayed, or abandoned) while a command is trying to be delivered to a lock (that it will never receive).
I think this would be a great feature that resolves a number of battery powered device issues...
Unless, of course the very likely case that I am missing something obvious.