When connecting to the Nest thermostat using home automation devices, you may need to supply the Nest thermostats serial number (SN). If you think you have everything setup properly but you are not able to communicate with the Nest, it may be that the serial number you are using is the Base SN and not the Display SN.
On the Nest thermostat itself you can find the Display serial number under Settings > Technical Info. From the web interface at https://home.nest.com, login > select the thermostat you want to control > Thermostat Settings > Technical Info. The serial number shown here is the Display serial number you’re looking for.