Rule doesn't execute all commands

Hello all,

I have a total of 6 roller shutters around the background of my house. I can control them separately…everything works fine at 100% of the times.

I can control all the roller shutters all at once used a separate switch which fires a Up-, Stop- or a Down-rule. This particular rules sends an Up-, Stop- or Down command to all 6 roller shutters at once… this is where it went wrong sometimes.
In approximately 25% of the cases not all roller shutters start moving, but one (and sometimes two) keeps standing still. The one(s) which is standing still seems to be total random.

Does anybody recognise this behaviour and is there a solution to solve it?

This is the rule I use:

rule "gGF_RS"
when
	Item gGF_RS received command
then 
	switch(receivedCommand.toString) {
		case "UP" : {
			sendCommand(RS_KTCHN_Slidedoor, UP)
			sendCommand(RS_KTCHN_Backdoor, UP)
			sendCommand(RS_KTCHN_Sidewindow, UP)
			sendCommand(RS_HLLWY_Frontdoor, UP)
			sendCommand(RS_LVNGRM_Sidewindow, UP)
			sendCommand(RS_LVNGRM_Frontwindow, UP)	
		}
		case "STOP" : {
			sendCommand(RS_KTCHN_Slidedoor, STOP)
			sendCommand(RS_KTCHN_Backdoor, STOP)
			sendCommand(RS_KTCHN_Sidewindow, STOP)
			sendCommand(RS_HLLWY_Frontdoor, STOP)
			sendCommand(RS_LVNGRM_Sidewindow, STOP)
			sendCommand(RS_LVNGRM_Frontwindow, STOP)
		}
		case "DOWN" : {
			sendCommand(RS_KTCHN_Slidedoor, DOWN)
			sendCommand(RS_KTCHN_Backdoor, DOWN)
			sendCommand(RS_KTCHN_Sidewindow, DOWN)
			sendCommand(RS_HLLWY_Frontdoor, DOWN)
			sendCommand(RS_LVNGRM_Sidewindow, DOWN)
			sendCommand(RS_LVNGRM_Frontwindow, DOWN)
		}
	}
end

Regards,

Jaco

does it help adding a sleep timer between the commands like :

case "UP" : {
			sendCommand(RS_KTCHN_Slidedoor, UP)
            Thread::sleep(250)
			sendCommand(RS_KTCHN_Backdoor, UP)
            Thread::sleep(250)
			sendCommand(RS_KTCHN_Sidewindow, UP)
            Thread::sleep(250)
			sendCommand(RS_HLLWY_Frontdoor, UP)
            Thread::sleep(250)
			sendCommand(RS_LVNGRM_Sidewindow, UP)
             Thread::sleep(250)
			sendCommand(RS_LVNGRM_Frontwindow, UP)	

		}

(Just for testing if it’s a communication problem where too many RF commands come at the same time)

You could try put them in a item group and send only one command to that group. The result is the same and the submitted amount of commands too. But I noticed, that this runs better with a group when having many commands.

I did have the roller shutters in a group, but using a group has exactly the same problem. I created the script as shown above to get more insight in the problem…

I tried the delay between executing the commands, and I didn’t see the ‘strange behaviour’ after that. I just changed the delay from 250- to 100ms to see ‘how low I can go’ before the problem occours again.

Thank you for the help so far… I’ll keep you informed.

Regards, Jaco

You should verify the problem and maybe tell this the binding creator. Because what you are doing should be handeled by the binding and not by yourself. Using sleep should never be required.