Creating a Startup Script
In many situations, you want your Virtual Wiring System to power up with a particular configuration. Dedicated systems are a good example of this. If you create a system whose job is to make sure your home temperature is OK, check for water in the basement, and look for intruders, you don't want it to forget its job every time there's a power glitch. Sometimes you want your system to start performing a particular task every time it powers up.
Find or Create a Script to Run on Startup
In the Console Script Building section, we describe how to save a configuration into a Script. Clicking on the "Run" Action for that Script on the Scripts page recreates the system you saved. Now, we need a way to run that Script on power up.
In the "user" section of the Scripts, there is a Script called "startup.script". Whatever one puts into that Script will be run when the system starts up.
Add the Startup Script to the Startup File
Your system should restart and restore the configuration you just specified in the startup file.
Note: when Scripts are created or edited using the Scripts page, the Script cache for the system is automatically updated. There is no need to restart the system for it to see your changes.
You can add as many Script commands as you wish to the startup Script. As long as there are no errors, every line in the startup Script gets executed.