zone/simulate returns 500
Hi all – using the local or remote API, running the zone/simulate route:
curl -X "POST" "https://192.168.1.117:8080/api/4/zone/simulate?access_token=ACCESS_TOKEN" \
-H "Cookie: access_token=ACCESS_TOKEN"
...returns a 500:
HTTP/1.1 500 Internal Server Error
Content-type: text/html
Content-Length: 62
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: *
Connection: close
Date: Thu, 29 Jun 2017 03:10:44 GMT
Server: lighttpd/1.4.32
{ "statusCode": 1, "message": "Exception occurred !" }
The docs seem to mention that there should be some sort of body, but I have no clue what it should be:
"Returns the suggested watering duration in seconds and field capacity size in mm from the zone properties sent in the request body."
Any thoughts?
-
Hi,
Thank you for the wonderful Python API.
I updated the docs with the proper body. What you need to send it's the zone properties (that you get from GET /zone/properties):
{
"ETcoef": 1,
"type": 2,
"internet": true,
"savings": 50,
"slope": 1,
"sun": 1,
"soil": 1,
"group_id": 1,
"history": true,
"waterSense": {
"fieldCapacity": 0.0,
"rootDepth": 0,
"appEfficiency": 0.0,
"isTallPlant": 0,
"permWilting": 0.0,
"maxAllowedDepletion": 0.0,
"precipitationRate": 0.0,
"allowedSurfaceAcc": 0.0,
"referenceTime": 661,
"detailedMonthsKc": [
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0
],
"soilIntakeRate": 0.0
}
}
Please sign in to leave a comment.
Comments
2 comments