A method for optimizing and controlling the energy consumption of a building, the method comprising the steps of: receiving, by a first computing device, one or more measurements from a plurality of sensors, at least some of which are located inside the building, wherein the measurements include temperature readings and comfort characteristics; generating, by the first computing device, a set of thermal response coefficients for the building based on energy characteristics of the building, the measurements from the sensors and weather data associated with the location of the building; predicting, by the first computing device, an energy response of the building based on the set of thermal response coefficients and forecasted weather associated with the location of the building; selecting, by the first computing device, minimal energy requirements of the building based on an energy consumption cost associated with the building; determining, by the first computing device, one or more energy control points for the building based on the energy response and the minimal energy requirements; and transmitting, by the first computing device, the energy control points to one or more comfort devices in the building; detecting, by the first computing device, temperature readings from one or more sensors each inside different rooms of the building and temperature readings provided by a thermostat inside the building; determining, by the first computing device, whether the temperature readings from any of the one or more sensors inside different rooms of the building diverge over time from the temperature readings from the thermostat; and if at least one of the one or more sensors inside different rooms of the building diverge over time from the temperature readings from the temperature readings from the thermostat: adjusting, by the first computing device, the energy control points for one or more comfort devices associated with the room of the diverging sensor to account for the divergence in temperature. receiving, by a first computing device, one or more measurements from a plurality of sensors, at least some of which are located inside the building, wherein the measurements include temperature readings and comfort characteristics; generating, by the first computing device, a set of thermal response coefficients for the building based on energy characteristics of the building, the measurements from the sensors and weather data associated with the location of the building; predicting, by the first computing device, an energy response of the building based on the set of thermal response coefficients and forecasted weather associated with the location of the building; selecting, by the first computing device, minimal energy requirements of the building based on an energy consumption cost associated with the building; determining, by the first computing device, one or more energy control points for the building based on the energy response and the minimal energy requirements; and transmitting, by the first computing device, the energy control points to one or more comfort devices in the building; detecting, by the first computing device, temperature readings from one or more sensors each inside different rooms of the building and temperature readings provided by a thermostat inside the building; determining, by the first computing device, whether the temperature readings from any of the one or more sensors inside different rooms of the building diverge over time from the temperature readings from the thermostat; and if at least one of the one or more sensors inside different rooms of the building diverge over time from the temperature readings from the temperature readings from the thermostat: adjusting, by the first computing device, the energy control points for one or more comfort devices associated with the room of the diverging sensor to account for the divergence in temperature.