Empty samples from webservice

I have a program that is pulling my sensor data from the cloud and notice that the samples are coming back empty. Just to verify I used the Webservice.py in the flower power tools on github and the response is the same as what I was getting with my own code:
Server response: {u'errors': [], u'events': [], u'fertilizer': [{u'fertilizer_level': 3.51968259912413, u'id': 5051240, u'watering_cycle_end_date_time_utc': u'2015-10-12T23:39:00Z', u'watering_cycle_start_date_time_utc': u'2015-10-11T01:54:00Z'}, {u'fertilizer_level': 2.82006686627318, u'id': 5065610, u'watering_cycle_end_date_time_utc': u'2015-10-15T00:09:00Z', u'watering_cycle_start_date_time_utc': u'2015-10-12T23:54:00Z'}, {u'fertilizer_level': 2.5452672787164, u'id': 5077874, u'watering_cycle_end_date_time_utc': u'2015-10-16T13:39:00Z', u'watering_cycle_start_date_time_utc': u'2015-10-15T00:24:00Z'}, {u'fertilizer_level': 2.35231011133764, u'id': 5088859, u'watering_cycle_end_date_time_utc': u'2015-10-17T17:24:00Z', u'watering_cycle_start_date_time_utc': u'2015-10-16T13:54:00Z'}, {u'fertilizer_level': 2.04422061477926, u'id': 5095051, u'watering_cycle_end_date_time_utc': u'2015-10-19T01:54:00Z', u'watering_cycle_start_date_time_utc': u'2015-10-17T17:39:00Z'}, {u'fertilizer_level': 2.1569578005704, u'id': 5104836, u'watering_cycle_end_date_time_utc': u'2015-10-20T00:24:00Z', u'watering_cycle_start_date_time_utc': u'2015-10-19T02:09:00Z'}, {u'fertilizer_level': 1.95015290090401, u'id': 5112437, u'watering_cycle_end_date_time_utc': u'2015-10-22T00:24:00Z', u'watering_cycle_start_date_time_utc': u'2015-10-20T00:39:00Z'}, {u'fertilizer_level': 1.77569900512421, u'id': 5120475, u'watering_cycle_end_date_time_utc': u'2015-10-23T00:39:00Z', u'watering_cycle_start_date_time_utc': u'2015-10-22T00:39:00Z'}, {u'fertilizer_level': 1.72196662043873, u'id': 5126034, u'watering_cycle_end_date_time_utc': u'2015-10-23T21:54:00Z', u'watering_cycle_start_date_time_utc': u'2015-10-23T00:54:00Z'}, {u'fertilizer_level': 1.60651127689547, u'id': 5136416, u'watering_cycle_end_date_time_utc': u'2015-10-25T15:24:00Z', u'watering_cycle_start_date_time_utc': u'2015-10-23T22:09:00Z'}, {u'fertilizer_level': 1.60088661272085, u'id': 5143411, u'watering_cycle_end_date_time_utc': u'2015-10-27T01:39:00Z', u'watering_cycle_start_date_time_utc': u'2015-10-25T15:39:00Z'}, {u'fertilizer_level': 1.63798044352273, u'id': 5152686, u'watering_cycle_end_date_time_utc': u'2015-10-28T13:38:00Z', u'watering_cycle_start_date_time_utc': u'2015-10-27T01:54:00Z'}, {u'fertilizer_level': 1.60916818602284, u'id': 5162797, u'watering_cycle_end_date_time_utc': u'2015-10-30T23:08:00Z', u'watering_cycle_start_date_time_utc': u'2015-10-28T13:53:00Z'}, {u'fertilizer_level': 1.53364993169531, u'id': 5177884, u'watering_cycle_end_date_time_utc': u'2015-11-04T00:08:00Z', u'watering_cycle_start_date_time_utc': u'2015-10-30T23:23:00Z'}, {u'fertilizer_level': 1.45539495923379, u'id': 5268711, u'watering_cycle_end_date_time_utc': u'2015-11-05T05:53:00Z', u'watering_cycle_start_date_time_utc': u'2015-11-04T00:23:00Z'}, {u'fertilizer_level': 1.49528136522179, u'id': 5268712, u'watering_cycle_end_date_time_utc': u'2015-11-11T16:38:00Z', u'watering_cycle_start_date_time_utc': u'2015-11-05T06:08:00Z'}, {u'fertilizer_level': 1.37062802217112, u'id': 5268713, u'watering_cycle_end_date_time_utc': u'2015-11-13T00:23:00Z', u'watering_cycle_start_date_time_utc': u'2015-11-11T16:53:00Z'}, {u'fertilizer_level': 1.42142050573163, u'id': 5268714, u'watering_cycle_end_date_time_utc': u'2015-11-14T23:53:00Z', u'watering_cycle_start_date_time_utc': u'2015-11-13T00:38:00Z'}, {u'fertilizer_level': 1.52960320220624, u'id': 5268715, u'watering_cycle_end_date_time_utc': u'2015-11-16T05:23:00Z', u'watering_cycle_start_date_time_utc': u'2015-11-15T00:08:00Z'}, {u'fertilizer_level': 1.49039513489478, u'id': 5269437, u'watering_cycle_end_date_time_utc': u'2015-11-19T01:53:00Z', u'watering_cycle_start_date_time_utc': u'2015-11-16T05:38:00Z'}, {u'fertilizer_level': 1.46703341423493, u'id': 5293286, u'watering_cycle_end_date_time_utc': u'2015-11-20T15:53:00Z', u'watering_cycle_start_date_time_utc': u'2015-11-19T02:08:00Z'}, {u'fertilizer_level': 1.49673211854758, u'id': 5293287, u'watering_cycle_end_date_time_utc': u'2015-11-22T21:52:00Z', u'watering_cycle_start_date_time_utc': u'2015-11-20T16:08:00Z'}], u'samples': [], u'server_identifier': u'1.3.6 Oct 19th 2015', u'user_data_version': 732}

Am I doing something wrong? Or is the this a server side issue?

Hi @Korbin73,

This is the response of the Parrot cloud, if the information is wrong, is not your fault :slightly_smiling:

But… Where is wrong?

Bruno

The samples collection used to contain a list of the moisture reads from the device like this:

[%{"air_temperature_celsius" => 21.21654578176, "capture_ts" => "2015-11-22T23:52:00Z", "par_umole_m2s" => 2.11893393858001, "vwc_percent" => 25.8056954271245}, %{"air_temperature_celsius" => 20.06185024, "capture_ts" => "2015-11-23T00:07:00Z", "par_umole_m2s" => 1.24124152737502, "vwc_percent" => 25.8091497892871}, %{"air_temperature_celsius" => 19.47597326848, "capture_ts" => "2015-11-23T00:22:00Z", "par_umole_m2s" => 0.354636553471309, "vwc_percent" => 25.8056954271245}, %{"air_temperature_celsius" => 18.93356230532, "capture_ts" => "2015-11-23T00:37:00Z", "par_umole_m2s" => 0.1, "vwc_percent" => 25.684449411766}],

Right now it’s empty when I make the same requests to the cloud api.

Hi Korbin73,

I am having the exact same problem.
I query the URL-path /sensor_data/v3/sample/location/MY_LOCATION_IDENTIFIER?from_datetime_utc=2016-06-01T00:00:00Z&to_datetime_utc=2016-06-06T00:00:00Z

The HTTP response from the API only contains fertilizer levels. The samples-Array is empty.

{
“samples”: [],
“events”: [],
“fertilizer”: [
{
“fertilizer_level”: 3.20572948797528,
“id”: 6294068,
“watering_cycle_end_date_time_utc”: “2016-04-26T11:42:00Z”,
“watering_cycle_start_date_time_utc”: “2016-04-20T18:27:00Z”
}
]
}

Did you manage to solve your problem?

kind regards,

Egon

Nope. It only seems to work if you query for one day so I ended up writing a program that grabs the info day by day from my raspberry pi.