Add delay between device commands in Scene

I've implemented a driver that allows me to control X10 devices. It uses a raw socket interface.

It takes between one and two seconds after an X10 command is sent before another one can be sent. So, if I create a scene that includes these devices, I need delays between each on/off command.

I tried adding a sleep command in my driver in the on and off commands, but HE does not seem to allow sleeps in device driver code.

Does that mean I can't use scenes with them and should use Rules instead?

Just found pauseExecution---trying it out now.

Can you use the metering option in the setup of your scene? It was meant for spreading out Zigbee calls, might help if it can be used in your scene.

1 Like

pauseExecution in the driver solved my problem, but I'll check out metering.

Thanks!

1 Like

Metering looks perfect, except it has a max of 1000.

That seems a pretty arbitrary limit. Probably not many people doing X10. Power Line Carrier communication is S L O W.

Anyway, the pauseExecution worked for me.

1 Like

Yeah, I expect 1000 is probably plenty for Zigbee / Zwave comm's, not Lan.

Truly arbitrary. How much do you need?

From experimentation in my old code one second is 95% reliable for me, two seconds is solid. So, I've been using 2 seconds.

I wouldn't have thought that much is needed, but I haven't actually analyzed how long a message send takes over power line carrier. I think only one bit (not byte) per 60 hz cycle, so that's pretty slow. But seconds? I haven't done that math.

But, I'm not sure why you'd want a limit, other than protect the user from himself.

1 Like

Um, we've never seen a need for this -- NOT

2 Likes

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.