A system, method and apparatus for remote control of a thermostat by a network-based server, when the thermostat is not connected to a local or wide-area network. A network-based server calculates a modified temperature profile for a thermostat based on a utility's time-of-use pricing and/or weather forecasts. After the server has calculated the modified temperature profile, it is provided to a mobile device via a wide-area network, and the mobile device provides the modified temperature profile directly to the thermostat when the mobile device is within range of the thermostat.