Utility POST Issue Demand Response errors for larger Hierarchy groups

I'm submitting POST API calls to change thermostat settings for groups. If the group is small, let's say under 10 thermostats, it works fine. If the group is larger, like 30 thermostats, then I get a 'Expectation Failed' error. Here is the JSON request:

{
"selection":
{
"selectionType":"managementSet",
"selectionMatch":"/Group A"
},
"operation":"create",
"demandResponse":
{
"name":"081617-1316",
"message":"Thanks for participating in the smart thermostat program and helping your xxxxx reduce energy use during peak times. Your participation can lower the cost of power for all xxxx. We will adjust your thermostat up to three degrees between 2-6 p.m. today. Please do not adjust your thermostat during this time.",
"showIdt":true,
"sendEmail":true,
"event":
{
"name":"081617-1316",
"type":"demandResponse",
"startDate":"2017-08-16",
"startTime":"14:00:00",
"endDate":"2017-08-16",
"endTime":"14:59:00",
"heatRelativeTemp":-20,
"coolRelativeTemp":-20,
"isTemperatureRelative":true

}
}
}

Here is the PHP code to setup the CURL:

$url = "https://api.ecobee.com/1/demandRespon...";
$ch = curl_init();
if ($ch == false) echo " init failed";
if (curl_setopt($ch, CURLOPT_URL,$url)==false) echo " CURLOPT_URL";
if (curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST")==false) echo " CURLOPT_CUSTOMREQUEST";
if (curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1)==false) echo " CURLOPT_RETURNTRANSFER";
if (curl_setopt($ch, CURLOPT_POSTFIELDS, $postreq)==false) echo " CURLOPT_POSTFIELDS";
if (curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1)==false) echo " CURLOPT_FOLLOWLOCATION";

$header=array('Content-Type: application/json;charset=UTF-8','Authorization: Bearer '.$token,
'Content-Length: ' . strlen($postreq));
if (curl_setopt($ch, CURLOPT_HTTPHEADER, $header)==false) echo " CURLOPT_HTTPHEADER";
if (curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false)==false) echo " CURLOPT_SSL_VERIFYPEER";

$json=curl_exec($ch);

This is the error I get:

Expectation Failed

The expectation given in the Expect request-header
field could not be met by this server.
The client sent
Expect: 100-continue

Only the 100-continue expectation is supported.

----------------
What weird is that same code, same call, same everything for a test group of 8 thermostats work well. A test group containing one thermostat works well. Submit the call for a group that has 30 thermostats and I get the error.

Any suggestions would be very helpful!
1 person has
this problem
+1
Reply