You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need the on/off times for a specific device to compare runtime from now to a year ago. Getting the runtimes now is easy with get_all_usage_data() which returns DeviceOn and DeviceOff events.
Are there any options to get the on/off times for a device from a year ago?
The get_all_usage_data method passes a payload to the api. Currently the payload is hardcoded as: payload = {'n_items': 30}
Is there a parameter that can be passed to the api to get usage data as of a time? I tried modifying the payload to: payload = {'n_items': 20, 'start': '2020-10-30T16:24:35.314Z'} with no luck.
It's worth noting that the n_items parameter doesn't do anything. When modified to 20 or 1000 the api still returns 30 results.
Any ideas on how to get historical on/off data by device would be appreciated.
The text was updated successfully, but these errors were encountered:
Now you can pass in prior_to_item with a date to paginate the results. Unfortunately for my use case, it looks like they only make the last 30 worth of on/off data available.
I need the on/off times for a specific device to compare runtime from now to a year ago. Getting the runtimes now is easy with get_all_usage_data() which returns DeviceOn and DeviceOff events.
Are there any options to get the on/off times for a device from a year ago?
The get_all_usage_data method passes a payload to the api. Currently the payload is hardcoded as:
payload = {'n_items': 30}
Is there a parameter that can be passed to the api to get usage data as of a time? I tried modifying the payload to:
payload = {'n_items': 20, 'start': '2020-10-30T16:24:35.314Z'}
with no luck.It's worth noting that the n_items parameter doesn't do anything. When modified to 20 or 1000 the api still returns 30 results.
Any ideas on how to get historical on/off data by device would be appreciated.
The text was updated successfully, but these errors were encountered: