{"id":13834451,"url":"https://github.com/oats-center/tb-exporter","last_synced_at":"2025-07-10T04:32:02.926Z","repository":{"id":90629868,"uuid":"387582918","full_name":"oats-center/tb-exporter","owner":"oats-center","description":"Simple ThingsBoard data exporter","archived":false,"fork":false,"pushed_at":"2021-12-01T22:17:42.000Z","size":9,"stargazers_count":10,"open_issues_count":1,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-08-05T14:15:26.935Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oats-center.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2021-07-19T20:12:32.000Z","updated_at":"2024-06-08T03:43:21.000Z","dependencies_parsed_at":"2023-03-13T17:54:56.068Z","dependency_job_id":null,"html_url":"https://github.com/oats-center/tb-exporter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oats-center%2Ftb-exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oats-center%2Ftb-exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oats-center%2Ftb-exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oats-center%2Ftb-exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oats-center","download_url":"https://codeload.github.com/oats-center/tb-exporter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225618845,"owners_count":17497589,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-04T14:00:34.915Z","updated_at":"2024-11-20T19:31:59.582Z","avatar_url":"https://github.com/oats-center.png","language":"Shell","funding_links":[],"categories":["Tools"],"sub_categories":[],"readme":"# Fetch data from ThingsBoard\n\nThis is a simple script to fetch the data for a DEVICE from ThingsBoard and\nmerge all of the columns into one, easier to use CSV.\n\nThe code appears to work, but is a quick hack. PRs are very welcome.\n\nYou either need to install the dependencies using you system's package manager or,\nif you have `pipenv`, then run `pipenv install` first.\n\n## How to use\n\n```bash\npython3 fetch.py --help\n```\nNote: I test use `pipenv`, so I typically test with something like `pipenv run\nfetch ...` rather then `python3 fetch.py`. It should fine with plain python3 as\nlong as you have all the required packages installed.\n\n## Typical usage\n\n### Fetch everything for a device\n\n```bash\npython3 fetch.py http://\u003cyour-tb-host\u003e -u tenant@thingsboard.org -p admin -d 7ade2600-81a8-11eb-99a7-5d4c029b39e1\n```\n\nWhere `7ade2600-81a8-11eb-99a7-5d4c029b39e1` is the ThingsBoard device ID.\n\n### Fetch everything for multiple devices\n\n```bash\npython3 fetch.py http://\u003cyour-tb-host\u003e -u tenant@thingsboard.org -p admin -d 7ade2600-81a8-11eb-99a7-5d4c029b39e1 -d 2f93c420-81bc-11eb-bbac-ff6c20e0c920 -d 50739480-be5d-11eb-b635-0b6b16c15ea2\n```\n\nNote you can have many `-d`/`--device` flags.\n\n### Fetch only certain device keys (columns)\n\n```bash\npython3 fetch.py http://\u003cyour-tb-host\u003e -u tenant@thingsboard.org -p admin -d 7ade2600-81a8-11eb-99a7-5d4c029b39e1 -k lw_dr -k lw_rssi -k soil_moisture_gwc\n```\n\n### Fetch for a date range\n```bash\npython3 fetch.py http://\u003cyour-tb-host\u003e -u tenant@thingsboard.org -p admin -d 7ade2600-81a8-11eb-99a7-5d4c029b39e1 --start 1626721170000 --stop 1626723170000\n```\n\nNote `--start`/`--stop` are millisecond UNIX timestamps.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foats-center%2Ftb-exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foats-center%2Ftb-exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foats-center%2Ftb-exporter/lists"}