BuildingRules: A Trigger-Action--Based System to Manage Complex Commercial Buildings