Hi Friends,
I’m currently using OpenHAB 4.0.4 on Unraid using a docker install.
After updating to 4.0.4 two of my rules stopped working. They did work before and other rules appear to be working properly.
One rule is a Good Morning rule, that automates opening all my house’s windows blinds when I press a wall switch to ON state.
The other rule is for Good Night, which turns OFF all the lights and closes all window blinds when I turn the same wall switch to OFF state.
Can some please go over my rules and tell me if they have issues that causes them not to work?
Good Morning rule:
configuration: {}
triggers:
- id: "1"
configuration:
itemName: Bedroom_Switch3
state: ON
previousState: OFF
type: core.ItemStateChangeTrigger
conditions: []
actions:
- inputs: {}
id: "2"
configuration:
type: application/vnd.openhab.dsl.rule
script: |
sendCommand(BedRight_Dimmer3, 72)
Thread::sleep(300)
sendCommand(SalonWindow_Dimmer3, 72)
Thread::sleep(300)
sendCommand(SalonDesk_Dimmer3, 69)
Thread::sleep(300)
sendCommand(Kitchen_Dimmer3, 67)
Thread::sleep(300)
sendCommand(Balcony_Dimmer3, 100)
Thread::sleep(300)
if(SalonBalcony_Dimmer2.state > 72) {
SalonBalcony_Dimmer2.sendCommand(71)
}
//else do nothing
Thread::sleep(3000)
//if(SalonTV_Switch1.state == OFF) {
//SalonTV_Switch1.sendCommand(ON)
}
// else do nothing
type: script.ScriptAction
Good Night rule:
configuration: {}
triggers:
- id: "1"
configuration:
itemName: Bedroom_Switch3
state: OFF
previousState: ON
type: core.ItemStateChangeTrigger
conditions: []
actions:
- inputs: {}
id: "2"
configuration:
type: application/vnd.openhab.dsl.rule
script: |
sendCommand(Entrance_Switch2, OFF)
Thread::sleep(300)
sendCommand(Bedroom_Switch4, OFF)
Thread::sleep(300)
sendCommand(SalonTV_Switch1, OFF)
Thread::sleep(300)
sendCommand(SalonTV_Switch2, OFF)
Thread::sleep(300)
sendCommand(SalonTV_Switch4, OFF)
Thread::sleep(300)
sendCommand(SalonDesk_Switch2, OFF)
Thread::sleep(300)
sendCommand(Kitchen_Switch1, OFF)
Thread::sleep(300)
sendCommand(Kitchen_Switch2, OFF)
Thread::sleep(300)
sendCommand(Bathroom_Switch2, OFF)
Thread::sleep(300)
sendCommand(Bathroom_Switch4, OFF)
Thread::sleep(300)
sendCommand(Balcony_Switch1, OFF)
Thread::sleep(300)
sendCommand(Balcony_Switch2, OFF)
Thread::sleep(300)
sendCommand(Bedroom_Switch2, OFF)
Thread::sleep(300)
sendCommand(Bedroom_Switch4, OFF)
Thread::sleep(300)
sendCommand(BedRight_Dimmer3, 0)
Thread::sleep(300)
sendCommand(SalonWindow_Dimmer3, 0)
Thread::sleep(300)
sendCommand(SalonDesk_Dimmer3, 0)
Thread::sleep(300)
sendCommand(Kitchen_Dimmer3, 0)
Thread::sleep(300)
sendCommand(Balcony_Dimmer3, 0)
Thread::sleep(300)
sendCommand(SalonBalcony_Dimmer2, 0)
Thread::sleep(300)
sendCommand(SalonBalcony_Dimmer1, 0)
Thread::sleep(300)
sendCommand(Kitchen_Dimmer3, 0)
Thread::sleep(3000)
sendCommand(Kitchen_Dimmer3, 91)
type: script.ScriptAction