Smart Lights program takes 4 seconds to turn on module

Thought I would put this question out there before I dig in too deep. I love the Smart Lights program someone wrote - wish they put their name in code as comment so I could thank them!

Anyway, it takes 4-5 seconds consistently for an X10 module to turn ON via the motion sensor selected in the smart lights settings page. I do not see any code reason in the program for this delay.

Anyone seen this before or have an idea why the delay?

The original smart lights (SL) code was written by Gene and released with HG a few versions in. I updated the code to include some features I wanted and released it as Advanced Smart Lights (ASL). At some point, there was another update from the original SL code by Gene iirc that added a few new things but didn’t do some of what I wanted so I can’t speak on it’s new features. I don’t know which version of the SL code you are referring to, but I’ll guess it’s one of Gene’s codes.

In any case, all 3 function in a similar way when it comes to X10. And, as you should know, X10 isn’t particularly fast anyway. I did some testing that was documented on the old HG forum where I found that in some configurations it could take over 2 seconds to operate a module. It’s possible that it could take longer if you are using X10 motion sensors. You’d have to be more specific on your configuration, but 2-3 seconds seems within reason.

“In some configurations” is likely the key. I first wondered if the Pi was going to sleep and had to wake up to respond; I can test 30 seconds apart and it still takes 4 seconds, so I doubt that is it.

Before turning on smart lights, I simply had a motion sensor on same code as the light switch, and turn on time was about 1/2 second at these locations. Now with smart lights it is 4 seconds. I suspect I am not getting the light switch PLC signal until after the PI HG programming processes it, passes it to the cm15, which passes to my XTBR which retransmits it high power now, thus causing the delay. I have 2 specific locations that take 4 seconds that used to just take 1/2 sec.

The only addition to the motion sensor to light switch path is the Pi&HG…

As @bkenobi mentioned you’ll find most of what you are looking for investigation wise on the old forum. You can try searching via google by prefacing your search with old homegenie club or going through the pages manually looking for X10 related posts. Here’s one google search that threw up something relevant using the former method