Create Climate has a return status of 7 (with a weird message)

Hello,

Please remove the previous thread ("What's wrong with my Post Update Thermostats for updating 'Bedtime' climate") as there are security concerns and I have solved my update/delete Climate issues.

Now, I'm trying to do a 'create Climate' operation with the folllowing json. You'll find also the curl output with the status code 7 and its validation error message.

What's strange is that I'm using the same codebase as delete/update operations so there should not be any problems related to my code.

{"selection":{"selectionType":"thermostats","selectionMatch":"X"},"thermostat":{"program":{"schedule":[["sleep","sleep","sleep","sleep","sleep","sleep","sleep","sleep","sleep","sleep","sleep","sleep","sleep","sleep","wakeup","wakeup","away","away","away","away","away","away","away","away","away","away","away","away","away","away","smart1","home","home","home","home","home","home","home","home","home","smart2","smart2","smart2","home","sleep","sleep","sleep","sleep"],["sleep","sleep","sleep","sleep","sleep","sleep","sleep","sleep","sleep","sleep","sleep","sleep","sleep","sleep","wakeup","wakeup","away","away","away","away","away","away","away","away","away","away","away","away","away","away","smart1","home","home","home","home","home","home","home","home","home","smart2","smart2","smart2","home","sleep","sleep","sleep","sleep"],["sleep","sleep","sleep","sleep","sleep","sleep","sleep","sleep","sleep","sleep","sleep","sleep","sleep","sleep","wakeup","wakeup","away","away","away","away","away","away","away","away","away","away","away","away","away","away","smart1","home","home","home","home","home","home","home","home","home","smart2","smart2","smart2","home","sleep","sleep","sleep","sleep"],["sleep","sleep","sleep","sleep","sleep","sleep","sleep","sleep","sleep","sleep","sleep","sleep","sleep","sleep","wakeup","wakeup","away","away","away","away","away","away","away","away","away","away","away","away","away","away","smart1","home","home","home","home","home","home","home","home","home","smart2","smart2","smart2","home","sleep","sleep","sleep","sleep"],["sleep","sleep","sleep","sleep","sleep","sleep","sleep","sleep","sleep","sleep","sleep","sleep","sleep","sleep","wakeup","wakeup","away","away","away","away","away","away","away","away","away","away","away","away","away","away","smart1","home","home","home","home","home","home","home","home","home","smart2","smart2","smart2","home","home","sleep","sleep","sleep"],["sleep","sleep","sleep","sleep","sleep","sleep","sleep","sleep","sleep","sleep","sleep","sleep","sleep","sleep","wakeup","wakeup","home","home","home","home","home","home","home","home","home","home","home","home","home","home","home","home","home","home","home","home","home","home","home","home","smart2","smart2","smart2","home","home","sleep","sleep","sleep"],["sleep","sleep","sleep","sleep","sleep","sleep","sleep","sleep","sleep","sleep","sleep","sleep","sleep","sleep","wakeup","wakeup","home","home","home","home","home","home","home","home","home","home","home","home","home","home","home","home","home","home","home","home","home","home","home","home","smart2","smart2","smart2","home","sleep","sleep","sleep","sleep"]],"climates":[{"name":"Sleep","climateRef":"sleep"},{"name":"Home","climateRef":"home"},{"name":"Awake","climateRef":"wakeup"},{"name":"Away","climateRef":"away"},{"name":"FanOn","climateRef":"smart1"},{"name":"Bedtime","climateRef":"smart2"},{"name":"toto","coolTemp":"806","heatTemp":"572","isOptimized":"false","coolFan":"auto","heatFan":"auto"}]}}}

Here is the curl trace for the request. The response's error code is strange (code=7)

Let me know what to do next.

Bye.

D:\>curl --http1.0 -o curl.txt -v -H "Authorization: Bearer XXX" -H "Content-Type: application/json, 'charset': UTF-8,Accept:applic
ation/json" POST https://api.ecobee.com/1/thermostat?f... --data @body.t
xt
* Rebuilt URL to: POST/
* Hostname was NOT found in DNS cache
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0*
Could not resolve host: POST
* Closing connection 0
curl: (6) Could not resolve host: POST
* Hostname was NOT found in DNS cache
* Trying 216.220.61.235...
* Connected to api.ecobee.com (216.220.61.235) port 443 (#1)
* successfully set certificate verify locations:
* CAfile: C:\Program Files\cURL\bin\curl-ca-bundle.crt
CApath: none
* SSLv3, TLS handshake, Client hello (1):
* SSLv3, TLS handshake, Server hello (2):
* SSLv3, TLS handshake, CERT (11):
* SSLv3, TLS handshake, Server key exchange (12):
* SSLv3, TLS handshake, Server finished (14):
* SSLv3, TLS handshake, Client key exchange (16):
* SSLv3, TLS change cipher, Client hello (1):
* SSLv3, TLS handshake, Finished (20):
* SSLv3, TLS change cipher, Client hello (1):
* SSLv3, TLS handshake, Finished (20):
* SSL connection using DHE-RSA-AES256-GCM-SHA384
* Server certificate:
* subject: serialNumber=YAVwpe/vRnIoW3VV3qj4TMElzHTq8qjJ; OU=GT94543573;
OU=See www.geotrust.com/resources/cps (c)13; OU=Domain Control Validated - Quick
SSL(R); CN=api.ecobee.com
* start date: 2014-04-08 00:41:48 GMT
* expire date: 2015-02-27 05:19:39 GMT
* subjectAltName: api.ecobee.com matched
* issuer: C=US; O=GeoTrust Inc.; OU=Domain Validated SSL; CN=GeoTrust DV
SSL CA
* SSL certificate verify ok.
> POST /1/thermostat?format=json HTTP/1.0
> User-Agent: curl/7.35.0
> Host: api.ecobee.com
> Accept: */*
> Authorization: Bearer XXXX
> Content-Type: application/json, 'charset': UTF-8,Accept:application/json
> Content-Length: 5417
>
* upload completely sent off: 5417 out of 5417 bytes
< HTTP/1.1 500 Internal Server Error
< Date: Sat, 21 Jun 2014 05:31:20 GMT
* Server Apache-Coyote/1.1 is not blacklisted
< Server: Apache-Coyote/1.1
< Cache-Control: no-cache
< Pragma: no-cache
< Content-Type: application/json;charset=UTF-8
< Via: 1.0 api.ecobee.com
< Vary: Accept-Encoding
< Connection: close
<
{
"status": {
"code": 7,
"message": "Validation error. [Rule int(5,60) failed on: 0 /thermostat/progr
am/climates/climate[7]/ventilatorMinOnTime]"
}
}* SSLv3, TLS alert, Client hello (1):
* Closing connection 1
* SSLv3, TLS alert, Client hello (1):
1 person has
this problem
+1
Reply