Building a web interface that is connected to a smart thermostat using Javascript