Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Support exporting of telemetry data using python PE rest client #78

Open
gaurav36 opened this issue Aug 18, 2022 · 3 comments

Comments

@gaurav36
Copy link

Description:
Currently we are missing support for some important feature in the python tb rest client version 1.4 , for eg: getting telemetry data

As i can see in github source code, we are not loading this telemetry module
[1] https://github.com/thingsboard/thingsboard-python-rest-client/blob/master/tb_rest_client/rest_client_pe.py#L1567&#L1608

Expected behavior:
User should be able to get telemetry data using python rest client.

Additional Information:
python rest client version: 1.4

@samson0v
Copy link
Contributor

Hi @gaurav36, rest client support getting telemetry:
зображення

зображення

For example:
rest_client.get_latest_timeseries(EntityId('d1cfaff0-a390-11ec-8112-ad8278896f52', 'DEVICE'))
зображення

@gaurav36
Copy link
Author

@samson0v Thanks for this update. Do you have any documentation of this API ?

your screenshot is not complete
image

@gaurav36
Copy link
Author

gaurav36 commented Aug 23, 2022

@samson0v
In the python rest client https://paste.ubuntu.com/p/psFJq4pwfB/ I am using the PEca client and in the error logs its using api_ce https://paste.ubuntu.com/p/gY4K3zyBPC/

here I am passing arg1: file_name_to_save_timeseries_data, arg2: tenant_id, arg3: keys, arg4: start_time, arg5: endtime

I even tried, but its giving empty results (res={})
res = rest_client.get_timeseries(EntityId('my_tenant_id', 'TENANT'), keys="epc,locationId", start_ts="1660037511000", end_ts="1661247111000")
print("latest timeseries from tenant is: {}".format(res))

May be you can write here full api call for getting timeseries data from particular tenant.
for eg: rest_client.get_timeseries(entity_id=entityId, keys=keys, start_ts=startTs, end_ts=endTs)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants