Problems with Battery Powered Devices

After taking a good look at the verbose Vera logs I have come to the conclusion that when you use luup.call_action it doesn’t necessarily immediately send a message to a device for you, instead it puts the action onto a queue behind other things that have already been requested.

This would be fine but if you have a device that is responding slowly and you are trying to communicate with a battery powered device that is about to go to sleep then you miss your communication window. Having done so that device then responds slowly blocking you from communicating and you miss the window for the next battery powered device, which in turn means you miss the window for the next device and so on. This is quite a significant problem for those of us who have a good number of battery powered devices that we need to send commands to (in my case 19).

Does anybody know how to get luup.call_action to push a job to the front of the queue and how to make a job expire if it isn’t executed within a second rather than lingering around when it will definitely fail before the device wakes up again in 15 minutes time?

Thanks in advance.