Because I mentioned this in another thread was asked to post how we do our House to Sleep sequence. Here it is. There are many ways to do it, but here is how we do it.
For our "House to Sleep" sequence I use a lot of Events. It is initiated by a Virtual Device "House to Sleep Initiator". This device is controlled by a Central Scene from our Master Bedroom dimmer or any of three Remotec remote controls throughout the house.
The first Event is the Initiator, triggered by the Virtual device. It will trigger immediately and will be checked again after 1 minute and 2 minutes.

I will explain the additional triggers later. This Event first cancels a delayed event to reset the status LEDs on the bedroom dimmer, if one is queued, then sets the Master Bedroom dimmer status LEDs to all blue and not blinking. This shows me the sequence has started. It also runs an Event that runs a script checking all doors and windows, populating Virtual Devices with their status. After a wait of two seconds it calls the next 3 Events checking doors and windows if they are open.
If a door is open, the LEDs on the dimmer are set to all red and blinking, an announcement is made, house to sleep is cancelled and a delayed event is launched to clear the status LEDs after 5 minutes. I will need to get up and close a door.

If the doors are closed, but a window is open, an announcement is made and the bottom LED is set to red and blinking. The Sequence will continue on to check the door locks. We also have a window check bypass device if we want to sleep with windows open. If window bypass is on the sequence continues.

The announcement Event cannot run more than once per sequence.

If doors and windows are closed, or if window check is bypassed, it proceeds to check the locks

If the doors are locked the lock check Events will not run. If either door is unlocked, it will set one of the LEDs on the bedroom dimmer to red and blinking. The second LED is the main door and the third one is the workshop door. It also announces if either door is unlocked. The announcement is in "David's" voice at an increased level "<voice required="name = Microsoft David Desktop"> Front Door Unlocked <silence msec='250'/> please wait while I attempt to lock it". Our normal announcement is at a lower level and uses the default (Zira) voice.

Each Event runs another that attempts to lock the doors. The lock check Events will only run if the respective door is closed.

If the lock checking events are successful, it will trigger Event 03c), making an announcement that the doors have been locked, using Zira's voice.

If the doors are locked it goes to the finisher event which will only run if the windows are all closed. If a window remains open it will not run, unless window bypass is enabled or if the initiator device has been on for 3 minutes.

There is another Event that will run if the initiator device has been on for 3 minutes. If all of the doors are closed and locked, but windows remain open, it will go on to the finisher Event, which has a condition that the virtual device has been on for at least 3 minutes.

The finisher event will turn all of the dimmer LEDs green, to show the process will continue to finish. After 15 seconds, either event will turn the status mode LEDs off.

Hopefully this all makes sense. I also have some timing in the lighting to sleep Event that first dims the bedroom lights, then turns them off after 3 minutes. This is another queue that the house is going to sleep.
For our "House to Sleep" sequence I use a lot of Events. It is initiated by a Virtual Device "House to Sleep Initiator". This device is controlled by a Central Scene from our Master Bedroom dimmer or any of three Remotec remote controls throughout the house.
The first Event is the Initiator, triggered by the Virtual device. It will trigger immediately and will be checked again after 1 minute and 2 minutes.
I will explain the additional triggers later. This Event first cancels a delayed event to reset the status LEDs on the bedroom dimmer, if one is queued, then sets the Master Bedroom dimmer status LEDs to all blue and not blinking. This shows me the sequence has started. It also runs an Event that runs a script checking all doors and windows, populating Virtual Devices with their status. After a wait of two seconds it calls the next 3 Events checking doors and windows if they are open.
If a door is open, the LEDs on the dimmer are set to all red and blinking, an announcement is made, house to sleep is cancelled and a delayed event is launched to clear the status LEDs after 5 minutes. I will need to get up and close a door.
If the doors are closed, but a window is open, an announcement is made and the bottom LED is set to red and blinking. The Sequence will continue on to check the door locks. We also have a window check bypass device if we want to sleep with windows open. If window bypass is on the sequence continues.
The announcement Event cannot run more than once per sequence.
If doors and windows are closed, or if window check is bypassed, it proceeds to check the locks
If the doors are locked the lock check Events will not run. If either door is unlocked, it will set one of the LEDs on the bedroom dimmer to red and blinking. The second LED is the main door and the third one is the workshop door. It also announces if either door is unlocked. The announcement is in "David's" voice at an increased level "<voice required="name = Microsoft David Desktop"> Front Door Unlocked <silence msec='250'/> please wait while I attempt to lock it". Our normal announcement is at a lower level and uses the default (Zira) voice.
Each Event runs another that attempts to lock the doors. The lock check Events will only run if the respective door is closed.
If the lock checking events are successful, it will trigger Event 03c), making an announcement that the doors have been locked, using Zira's voice.
If the doors are locked it goes to the finisher event which will only run if the windows are all closed. If a window remains open it will not run, unless window bypass is enabled or if the initiator device has been on for 3 minutes.
There is another Event that will run if the initiator device has been on for 3 minutes. If all of the doors are closed and locked, but windows remain open, it will go on to the finisher Event, which has a condition that the virtual device has been on for at least 3 minutes.
The finisher event will turn all of the dimmer LEDs green, to show the process will continue to finish. After 15 seconds, either event will turn the status mode LEDs off.
Hopefully this all makes sense. I also have some timing in the lighting to sleep Event that first dims the bedroom lights, then turns them off after 3 minutes. This is another queue that the house is going to sleep.
Comment