Hi all,
I’m very new to OpenHab and as a first project I wanted to get it working with my Nest thermostat - I have an interesting problem that seems similar but not the same as others on this forum.
I’ve set up three items related to my Nest:
String home_away "Home/Away [%s]" <present> { nest="=[structures(Home).away]" }
Number downstairs_temp "Downstairs Temp [%.1f °C]" <temperature> { nest="=[thermostats(Living Room).ambient_temperature_c]" }
Number living_room_target_temperature_c "Target Temperature [%.1f]" { nest="=[thermostats(Living Room).target_temperature_c]" }
All of these items correctly update, showing these respectively:
Away Status
Current Temperature
Target Temp
Also, I’ve set the sitemap to display these, and allow me to amend Target Temp:
Frame label="home"{
Switch item=home_away mappings=[home="Home",away="Away"]
Text item=downstairs_temp
Setpoint item=living_room_target_temperature_c label="Target Temperature [%.1f °C]" minValue=0 maxValue=40 step=1
}
These all display the value fine (e.g. it hooked up to the Nest API and is reading back)- but I cannot get it to change the temperature or away status. Having enabled TRACE level logging I get these lines when trying to set the temp (I’ve partially blocked out my keys:
2016-05-20 14:53:57.075 [DEBUG] [.o.b.nest.internal.NestBinding] - About to set property 'thermostats(Living Room).target_temperature_c' to '10.0'
2016-05-20 14:53:57.078 [TRACE] [.o.b.nest.internal.NestBinding] - Data model for update: DataModel[devices=DataModel.Devices[thermostats={Q1DhGrdlGQOvhOJeTEA7DeW9-XXXXXX=Thermostat[device_id=<null>,name=<null>,locale=<null>,software_version=<null>,structure_id=<null>,name=<null>,name_long=<null>,last_connection=<null>,is_online=<null>,can_cool=<null>,can_heat=<null>,is_using_emergency_heat=<null>,has_fan=<null>,fan_timer_active=<null>,fan_timer_timeout=<null>,has_leaf=<null>,temperature_scale=<null>,target_temperature_f=<null>,target_temperature_c=10.0,target_temperature_high_f=<null>,target_temperature_high_c=<null>,target_temperature_low_f=<null>,target_temperature_low_c=<null>,away_temperature_high_f=<null>,away_temperature_high_c=<null>,away_temperature_low_f=<null>,away_temperature_low_c=<null>,hvac_mode=<null>,ambient_temperature_f=<null>,ambient_temperature_c=<null>,humidity=<null>,hvac_state=<null>]},smoke_co_alarms=<null>,cameras=<null>],structures=<null>]
2016-05-20 14:53:57.086 [TRACE] [b.n.i.messages.AbstractRequest] - About to execute 'https://developer-api.nest.com/?auth=c.WbIXXXXXXt8aByBNU9k22baLQdbLNiNXCroS0TJeNp6HwnbOQrmNbHu4l2M4KtnIrjxRa4sP3pljdKviX3XUo53VMwHv19XXXXXmMikQGBe2IhXulkDHwLPHfIletVCPhZsQldwQjGCXXXX'
2016-05-20 14:53:57.665 [WARN ] [b.n.i.messages.AbstractRequest] - Method failed: HTTP/1.1 400 Bad Request
2016-05-20 14:53:57.668 [TRACE] [b.n.i.messages.AbstractRequest] - {"error":"Write Error","type":"https://developer.nest.com/documentation/cloud/error-messages#write-error","message":"Write Error","instance":"xxxxxxxx-005c-472b-xxxx-e63603f45ad2"}
2016-05-20 14:53:57.671 [ERROR] [.o.b.nest.internal.NestBinding] - Error updating data model: DataModelResponse[devices=<null>,structures=<null>]
I assume it’s because the Device_ID and/or Name being sent to the Nest API is NULL, but I can’t see why this is happening?
What have I missed?