matt (support) wrote:Hmm... there is no way to cancel sendRaw()
Bummer. Okay, I'll try working around the long delay another way maybe.
matt (support) wrote: but I'm surprised it is taking 8+ seconds to fail. You can pass waitUntilAck=False to sendRaw() -- then it will return immediately. You won't get any ack/failure information back, however.
Yea, I've started a number of threads in the forum before regarding long INSTEON timeouts. My workaround, which still works, is to insert a small (0.2 to 0.5 second) delay before sending wire commands that are triggered by other (esp. wireless) INSTEON commands. The consensus from those other threads is that the long delays are due to the moderately large number (54) of INSTEON devices on my setup and the PowerLinc's internal send timeout. Yea, I could set the waitUntilAck to False, but then I wouldn't be able to verify that the command was received by the device or not, potentially leaving the Indigo status out of sync with the actual state.
matt (support) wrote:Which PowerLinc are you using? Could the problem be that the plugin's action is trying to send multiple INSTEON messages to an unresponsive device and the issue is the cumulative failure time? If so, then you could detect the first error and bail out of the action at that point, which would speed it up.
It's the PowerLinc 2413U. No, I don't have any code to try to re-send failed messages. The sendRaw() method is only being called once per action call.
matt (support) wrote:You can use python threading and a queue so that your plugin's action methods return immediately. That is what the EasyDAQ plugin does, for example. It isn't terribly difficult, but somewhat of a pain if the only problem is the INSTEON failures taking a long time.
I might check out that code, though I'm not sure it'll be worth the time. We'll see. What about using the runConcurrentThread() method that's going to get called in a separate thread as a kind of queue manager? That way I wouldn't have to write my own threading code.
Thanks again for all the help guys!