A system for allowing user devices to remotely control in-room devices of a hospitality establishment, the system comprising: a control server coupled to a computer network; a plurality of hubs coupled to the control server; and a plurality of controllable devices located among a plurality of guest rooms of the hospitality establishment, each of the controllable devices coupled to at least one of the hubs; wherein the control server receives a state change message from a user device via the computer network; the control server determines an associated room according to the state change message, the associated room being one of the guest rooms of the hospitality establishment with which the user device is associated; the control server looks up an automation script specified by the state change message, the automation script listing a plurality of actions to be performed in a predetermined sequence; the control server determines a plurality of target controllable devices according to the plurality of actions, the target controllable devices being located within the associated room; the control server determines a plurality of target hubs according to the target controllable devices, each particular target hub in the plurality of target hubs being coupled to at least one of the target controllable devices; the control server sends one or more top-level commands to each particular target hub, each top-level command corresponding to one of the actions and specifying a change of state of one of the target controllable devices coupled to the particular target hub; the target hubs send a plurality of follow-on commands to change states of the target controllable devices located within the associated room to thereby perform the actions in the predetermined sequence as listed in the automation script; the automation script specified by the state change message includes one or more sub-scripts for execution by respective ones of the target hubs; the top-level commands sent by the control server to each particular target hub trigger a sub-script for execution by the particular target hub; each particular target hub determines one or more target controllable devices corresponding to the actions specified by the sub-script triggered for execution according to the top-level commands received from the control server, and sends the follow-on commands to the one or more target controllable devices to perform the actions in the predetermined sequence; and a total number of the top-level commands sent by the control server to the target hubs is less than a total number of the actions to be performed. a control server coupled to a computer network; a plurality of hubs coupled to the control server; and a plurality of controllable devices located among a plurality of guest rooms of the hospitality establishment, each of the controllable devices coupled to at least one of the hubs; wherein the control server receives a state change message from a user device via the computer network; the control server determines an associated room according to the state change message, the associated room being one of the guest rooms of the hospitality establishment with which the user device is associated; the control server determines a plurality of target controllable devices according to the plurality of actions, the target controllable devices being located within the associated room; the control server determines a plurality of target hubs according to the target controllable devices, each particular target hub in the plurality of target hubs being coupled to at least one of the target controllable devices; the control server sends one or more top-level commands to each particular target hub, each top-level command corresponding to one of the actions and specifying a change of state of one of the target controllable devices coupled to the particular target hub; the target hubs send a plurality of follow-on commands to change states of the target controllable devices located within the associated room to thereby perform the actions in the predetermined sequence as listed in the automation script; the automation script specified by the state change message includes one or more sub-scripts for execution by respective ones of the target hubs; the top-level commands sent by the control server to each particular target hub trigger a sub-script for execution by the particular target hub; each particular target hub determines one or more target controllable devices corresponding to the actions specified by the sub-script triggered for execution according to the top-level commands received from the control server, and sends the follow-on commands to the one or more target controllable devices to perform the actions in the predetermined sequence; and a total number of the top-level commands sent by the control server to the target hubs is less than a total number of the actions to be performed.