Thanks, Darrell.
With your suggestions it seems to be working much better. I can still get it out of sync if I press the KPL button on and off too quickly, but I am not sure how solve that problem yet.
I changed the button to a responder, and that helped a lot. I notice, however, that the programs are not triggered if I click on the On or Off buttons in the scene. The KPL button LED changes, but the programs are not run. Clicking a Scene command must not be literally the same as pressing the KPL button.
The second two programs do not seem to be triggered on the "outgoing" X10 commands, only the incoming commands.
Adding the delay helped tremendously. I have discovered (the hard way) that some X10 devices respond to a status with e.g. A3/Off (11) and some respond with e.g. A3/Status = off (2) depending on the brand. I want the KPL LED to accurately reflect the X10 status, so I am loathe to add the KPL button to the "If".
I tried toggle mode, but ended up with non-toggle because I wanted the KPL LED to only change if it received an X10 status. I think I need to try this a few more times, though, because when I was changing this parameter I was also having troubles with the delay lengths.
So, finally this is the current set of programs. The KPL button is the only element in a scene, it is set as a responder and as toggle-ON
If
Control 'KPL2 - Drvway Floods' is switched Off
Then
Send X10 'A6/Off (11)'
Wait 5 seconds
Send X10 'A6/Status Request (10)'
Else
- No Actions - (To add one, press 'Action')
If
Control 'KPL2 - Drvway Floods' is switched On
Then
Send X10 'A6/On (3)'
Wait 5 seconds
Send X10 'A6/Status Request (10)'
Else
- No Actions - (To add one, press 'Action')
If
X10 'A6/Off (11)' is Received
or X10 'A6/Status = off (2)' is Received
Then
Set Scene 'Driveway Floods' Off
Else
- No Actions - (To add one, press 'Action')
If
X10 'A6/On (3)' is Received
or X10 'A6/Status = On (8)' is Received
Then
Set Scene 'Driveway Floods' On
Else
- No Actions - (To add one, press 'Action')