An adventure towards building an intelligent home thermostat with a Raspberry Pi