I am trying to get historical data from my Arduino IoT Cloud device for several parameters, but I am not getting any time series data.
api2 = iot.DevicesV2Api(client)
DEVICE_ID = '7bb6a71e-8995-46cf-9ebc-b424a52e207d'
prop_id = '5fc50011-5844-4d8a-aba2-1de79b19238e'
date="2023-07-07T10:00:00Z"
try:
resp=api2.devices_v2_timeseries(DEVICE_ID, prop_id,limit=2,start=date)
print('resp ', resp)
except ApiException as e:
print("Got an exception: {}".format(e))
I get this response:
resp {'id': '7bb6a71e-8995-46cf-9ebc-b424a52e207d',
'last_evaluated_key': None,
'name': '5fc50011-5844-4d8a-aba2-1de79b19238e',
'values': []}
But I know that there is data as I get the latest value with a request using the properties_V2_list:
api = iot.PropertiesV2Api(client)
resp = api.properties_v2_list(thing_id)
print('thing_id resp ',resp)
Response is:
'href': '/iot/v1/things/f31dbcb6-1ca2-4008-8683-a472157798d3/properties/5fc50011-5844-4d8a-aba2-1de79b19238e',
'id': '5fc50011-5844-4d8a-aba2-1de79b19238e',
'last_value': 25.489999771118164,
'max_value': None,
'min_value': None,
'name': 'Node1_Temperature',
'permission': 'READ_ONLY',
'persist': True,
'sync_id': None,
'tag': 6.0,
'thing_id': 'f31dbcb6-1ca2-4008-8683-a472157798d3',
'thing_name': '... monitor',
'type': 'FLOAT',
'update_parameter': 100.0,
'update_strategy': 'TIMED',
'updated_at': datetime.datetime(2023, 5, 4, 0, 56, 11, 451640, tzinfo=tzutc()),
'value_updated_at': datetime.datetime(2023, 8, 2, 22, 53, 42, 45000, tzinfo=tzutc()),
'variable_name': 'node1_Temperature'}, {'created_at': datetime.datetime(2023, 5, 4, 0, 53, 58, 225674, tzinfo=tzutc()),
'deleted_at': None,
Why is it that I am not getting the historical values using the devices_v2_timeseries()?