A controller for connecting to and controlling active units of smart devices according to a spreadsheet received from a programming device and stored in the controller's memory and current states received from other smart devices. The controller may operate to provide to programming devices the spreadsheet stored in the memory for restoring a cluster of smart devices. The controller may include a real-time clock and interpret spreadsheet formulas that include time parameters.