dkilgore90 / google-sdm-api

Apache License 2.0
70 stars 22 forks source link

Internal error setting Nest E thermostat fan mode #80

Closed cb4 closed 2 years ago

cb4 commented 2 years ago

This error is not impacting behavior. It occurs on all three of my Nest E thermostats every time the rule runs. If I'm reading the log right, an invalid fan mode is being sent -- either in addition to or instead of the fan mode my rule sends. An example of the error:

app:74 2022-03-28 01:35:58.020 pm debug { "eventId": "91a69b70-a79c-497d-9709-7e216f17c195", "timestamp": "2022-03-28T18:35:55.729906Z", "resourceUpdate": { "name": "enterprises/9eded18e-cb87-47f4-8dfc-ac82195b04ac/devices/AVPHwEuMdIH5b7bDtgulsnMwDW0-eVmcOHa8mzLSC5ZKDOfYuaXQp-Kkg2o-xmGynKhDwu6I7pc25eHk-dgJsvtMo5YhMg", "traits": { "sdm.devices.traits.Fan": { "timerMode": "OFF" } } }, "userId": "AVPHwEv0wgfaKUEPQ1h1JbnY8-S266PR0ImLc4EL7AT8", "resourceGroup": ["enterprises/9eded18e-cb87-47f4-8dfc-ac82195b04ac/devices/AVPHwEuMdIH5b7bDtgulsnMwDW0-eVmcOHa8mzLSC5ZKDOfYuaXQp-Kkg2o-xmGynKhDwu6I7pc25eHk-dgJsvtMo5YhMg"]}
app:74 2022-03-28 01:35:58.013 pm debug Event received from Google pub/sub
app:74 2022-03-28 01:35:57.094 pm debug { "eventId": "1e85cf39-dc7e-4322-8a1d-d8015754dad2", "timestamp": "2022-03-28T18:35:55.712291Z", "resourceUpdate": { "name": "enterprises/9eded18e-cb87-47f4-8dfc-ac82195b04ac/devices/AVPHwEuMdIH5b7bDtgulsnMwDW0-eVmcOHa8mzLSC5ZKDOfYuaXQp-Kkg2o-xmGynKhDwu6I7pc25eHk-dgJsvtMo5YhMg", "traits": { "sdm.devices.traits.ThermostatMode": { "mode": "HEAT", "availableModes": ["HEAT", "COOL", "HEATCOOL", "OFF"] }, "sdm.devices.traits.ThermostatEco": { "availableModes": ["OFF", "MANUAL_ECO"], "mode": "OFF", "heatCelsius": 17.5, "coolCelsius": 24.5 }, "sdm.devices.traits.ThermostatTemperatureSetpoint": { "heatCelsius": 22.777779 } } }, "userId": "AVPHwEv0wgfaKUEPQ1h1JbnY8-S266PR0ImLc4EL7AT8", "resourceGroup": ["enterprises/9eded18e-cb87-47f4-8dfc-ac82195b04ac/devices/AVPHwEuMdIH5b7bDtgulsnMwDW0-eVmcOHa8mzLSC5ZKDOfYuaXQp-Kkg2o-xmGynKhDwu6I7pc25eHk-dgJsvtMo5YhMg"]}
app:74 2022-03-28 01:35:57.086 pm debug Event received from Google pub/sub
app:74 2022-03-28 01:35:56.444 pm error executeCommand sdm.devices.commands.ThermostatMode.SetMode response code: 500, body: { "error": { "code": 500, "message": "Internal error encountered.", "status": "INTERNAL" }}
app:74 2022-03-28 01:35:55.812 pm info Sending sdm.devices.commands.Fan.SetTimer to nest den with params: [timerMode:OFF]
app:74 2022-03-28 01:35:55.795 pm info Sending sdm.devices.commands.ThermostatTemperatureSetpoint.SetHeat to nest den with params: [heatCelsius:22.7777777778]
app:74 2022-03-28 01:35:55.776 pm info Sending sdm.devices.commands.ThermostatMode.SetMode to nest den with params: [mode:HEAT]

Commands are sent to the Nest E via this Hubitat RM rule: image

dkilgore90 commented 2 years ago

Discussed in Hubitat forum: race condition on Google's side when changing mode and setpoint in close succession -- solution was to inject a delay between commands.

https://community.hubitat.com/t/release-google-sdm-api-nest-integration/52226/830?u=dkilgore90