A method and system of controlling devices with digitally stored content. Devices such as home electronic appliances, lighting systems, heating, ventilating and air conditioning (HVAC) equipment, home security systems and home entertainment systems are controlled from a single, centralized device. A set top box (STB) stores scripts that include program content for controlling the operation of a plurality of these devices from the STB. A user of the STB selects the desired scripts, and the STB accesses the selected scripts from storage based on a triggering mechanism such as time, content, event, etc. The STB selectively controls operation of certain devices designated in the script. The method provides ease of control over multiple and diverse devices, applications and media within a user's own home environment, with more functionality and flexibility than currently available.