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:

"selectionMatch":"/Group A"
"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.",


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";


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