Rules problem syntax error?


#1

I have 7 items(blinds) I want to time in rules. For some reason, only the first item works. I’m stumped.

//Set Blinds to half At 7 am
rule “Blinds half”
when
Time cron “0 0 7 1/1 * ? *”
then
sendCommand(MKBlindsControl1, 40)
end

//Set Blinds to close At 6 pm
rule “Blinds close”
when
Time cron “0 0 18 1/1 * ? *”
then
sendCommand(MKBlindsControl1, 100)
end

//Set Blinds to half At 7 am
rule “Blinds half”
when
Time cron “0 0 7 1/1 * ? *”
then
sendCommand(MKBlindsControl2, 40)
end

//Set Blinds to close At 6 pm
rule “Blinds close”
when
Time cron “0 0 18 1/1 * ? *”
then
sendCommand(MKBlindsControl2, 100)
end

//Set Blinds to half At 7 am
rule “Blinds half”
when
Time cron “0 0 7 1/1 * ? *”
then
sendCommand(MKBlindsControl3, 40)
end

//Set Blinds to close At 6 pm
rule “Blinds close”
when
Time cron “0 0 18 1/1 * ? *”
then
sendCommand(MKBlindsControl3, 100)
end

//Set Blinds to half At 7 am
rule “Blinds half”
when
Time cron “0 0 7 1/1 * ? *”
then
sendCommand(MKBlindsControl4, 40)
end

//Set Blinds to close At 6 pm
rule “Blinds close”
when
Time cron “0 0 18 1/1 * ? *”
then
sendCommand(MKBlindsControl4, 100)
end

//Set Blinds to half At 7 am
rule “Blinds half”
when
Time cron “0 0 7 1/1 * ? *”
then
sendCommand(MKBlindsControl5, 40)
end

//Set Blinds to close At 6 pm
rule “Blinds close”
when
Time cron “0 0 18 1/1 * ? *”
then
sendCommand(MKBlindsControl5, 100)
end

//Set Blinds to half At 7 am
rule “Blinds half”
when
Time cron “0 0 7 1/1 * ? *”
then
sendCommand(MKBlindsControl6, 40)
end

//Set Blinds to close At 6 pm
rule “Blinds close”
when
Time cron “0 0 18 1/1 * ? *”
then
sendCommand(MKBlindsControl6, 100)
end

//Set Blinds to half At 7 am
rule “Blinds half”
when
Time cron “0 0 7 1/1 * ? *”
then
sendCommand(MKBlindsControl7, 40)
end

//Set Blinds to close At 6 pm
rule “Blinds close”
when
Time cron “0 0 18 1/1 * ? *”
then
sendCommand(MKBlindsControl7, 100)
end

or…

//Set Blinds to half At 7 am
rule “Blinds half”
when
Time cron “0 0 7 1/1 * ? *”
then
sendCommand(MKBlindsControl1, 40)
sendCommand(MKBlindsControl2, 40)
sendCommand(MKBlindsControl3, 40)
sendCommand(MKBlindsControl4, 40)
sendCommand(MKBlindsControl5, 40)
sendCommand(MKBlindsControl6, 40)
sendCommand(MKBlindsControl7, 40)
end

//Set Blinds to close At 6 pm
rule “Blinds close”
when
Time cron “0 0 18 1/1 * ? *”
then
sendCommand(MKBlindsControl1, 100)
sendCommand(MKBlindsControl2, 100)
sendCommand(MKBlindsControl3, 100)
sendCommand(MKBlindsControl4, 100)
sendCommand(MKBlindsControl5, 100)
sendCommand(MKBlindsControl6, 100)
sendCommand(MKBlindsControl7, 100)
end


#2

I am having the exact problem. blind1 opens in the AM but thats it, won’t close in the PM and no other blinds will follow the rule. I can close them with openhab and then the next morning, same thing, blind1 opens but thats it. stumped.


#3

Update. I started over and got 2 blinds to work this morning. Testing 3 next…

//Set Blinds to half At 7 am
rule “Blinds half”
when
Time cron “0 0 7 1/1 * ? *”
then
sendCommand(MKBlindsControl1, 40)
sendCommand(MKBlindsControl2, 40)
sendCommand(MKBlindsControl3, 40)
end

//Set Blinds to close At 6 pm
rule “Blinds close”
when
Time cron “0 0 18 1/1 * ? *”
then
sendCommand(MKBlindsControl1, 100)
sendCommand(MKBlindsControl2, 100)
sendCommand(MKBlindsControl3, 100)
end