API for a DIY thermostat