{"id":13834437,"url":"https://github.com/jalallinux/laravel-thingsboard","last_synced_at":"2025-06-15T17:01:23.278Z","repository":{"id":167523839,"uuid":"643139792","full_name":"jalallinux/laravel-thingsboard","owner":"jalallinux","description":"ThingsBoard laravel client","archived":false,"fork":false,"pushed_at":"2025-02-03T16:29:16.000Z","size":978,"stargazers_count":31,"open_issues_count":20,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-22T21:16:11.552Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jalallinux.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null},"funding":null},"created_at":"2023-05-20T08:12:31.000Z","updated_at":"2025-02-03T16:29:13.000Z","dependencies_parsed_at":"2023-10-29T09:24:10.577Z","dependency_job_id":"132f5940-25f2-4d96-8e36-dcf25f3fcdb1","html_url":"https://github.com/jalallinux/laravel-thingsboard","commit_stats":null,"previous_names":["jalallinux/laravel-thingsboard"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jalallinux%2Flaravel-thingsboard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jalallinux%2Flaravel-thingsboard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jalallinux%2Flaravel-thingsboard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jalallinux%2Flaravel-thingsboard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jalallinux","download_url":"https://codeload.github.com/jalallinux/laravel-thingsboard/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250324706,"owners_count":21411946,"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.542Z","updated_at":"2025-04-22T21:16:24.826Z","avatar_url":"https://github.com/jalallinux.png","language":"PHP","funding_links":[],"categories":["SDKs and REST clients"],"sub_categories":[],"readme":"# Laravel [ThingsBoard.io](https://thingsboard.io/) Client\n\n\u003ca href=\"https://github.com/jalallinux/laravel-thingsboard\"\u003e  \n    \u003cp align=\"center\"\u003e\u003cimg src=\"cover.png\" width=\"100%\"\u003e\u003c/p\u003e    \n\u003c/a\u003e\n\n\n\n[![Latest Stable Version](https://poser.pugx.org/jalallinux/laravel-thingsboard/v)](https://packagist.org/packages/jalallinux/laravel-thingsboard)\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/jalallinux/laravel-thingsboard.svg?style=flat-square)](https://packagist.org/packages/jalallinux/laravel-thingsboard)\n[![Tests](https://github.com/jalallinux/laravel-thingsboard/actions/workflows/run-tests.yml/badge.svg?branch=main)](https://github.com/jalallinux/laravel-thingsboard/actions/workflows/run-tests.yml)\n[![Total Downloads](https://img.shields.io/packagist/dt/jalallinux/laravel-thingsboard.svg?style=flat-square)](https://packagist.org/packages/jalallinux/laravel-thingsboard)\n\u003c!--delete--\u003e\n---\nThingsBoard is an open-source IoT platform for data collection, processing, visualization, and device management. This project is a Laravel Package that provides convenient client SDK for Integrate with Thingsboard APIs.\n\n\n\n\n## Installation\n\nYou can install the package via composer\n\n```bash\ncomposer require jalallinux/laravel-thingsboard\n```\n\n\n\n\n## Publish config file\n\nYou can publish config file to change default configs\n\n```bash\n php artisan vendor:publish --provider JalalLinuX\\\\Thingsboard\\\\LaravelThingsboardServiceProvider --tag config\n```\n\n\n\n\n## Publish language file\n\nYou can publish config file to change default languages\n\n```bash\n php artisan vendor:publish --provider JalalLinuX\\\\Thingsboard\\\\LaravelThingsboardServiceProvider --tag lang\n```\n\n\n\n\n## Preparing for usage\n`User` class must implement `JalalLinuX\\Thingsboard\\Interfaces\\ThingsboardUser` like this:\n```php\nclass User extends Authenticatable implements JalalLinuX\\Thingsboard\\Interfaces\\ThingsboardUser\n{\n    public function getThingsboardEmailAttribute(): string\n    {\n        return $this-\u003eattributes['thingsboard_email'];\n    }\n\n    public function getThingsboardPasswordAttribute(): string\n    {\n        return $this-\u003eattributes['thingsboard_password'];\n    }\n\n    public function getThingsboardAuthorityAttribute(): EnumAuthority\n    {\n        return EnumAuthority::from($this-\u003eattributes['thingsboard_authority']);\n    }\n    \n    ...\n```\n\nThen can use trait `JalalLinuX\\Thingsboard\\Traits\\ThingsboardUser` like this:\n```php\nclass User extends Authenticatable implements JalalLinuX\\Thingsboard\\Interfaces\\ThingsboardUser\n{\n    use \\JalalLinuX\\Thingsboard\\Traits\\ThingsboardUser\n    \n    ...\n}\n```\n\n\n\n## Usage with Tntity classes\n\n```php\nuse JalalLinuX\\Thingsboard\\Entities\\DeviceApi;\n\n/** Without Authentication */\nDeviceApi::instance()-\u003esetAttribute('deviceToken', 'A1_TEST_TOKEN')-\u003epostTelemetry([...])\n\n/** With Authentication */\nDevice::instance()-\u003ewithUser($tenantUser)-\u003egetDeviceById('ca3b8fc0-dcf6-11ed-a299-0f591673a2d6')\nDevice::instance()-\u003ewithUser($tenantUser)-\u003esetAttribute('id', 'ca3b8fc0-dcf6-11ed-a299-0f591673a2d6')-\u003egetDeviceById()\nDevice::instance(['id' =\u003e 'ca3b8fc0-dcf6-11ed-a299-0f591673a2d6'])-\u003ewithUser($tenantUser)-\u003egetDeviceById()\n```\n\n\n\n\n## Usage with Helper function\n\n```php\n/** Without Authentication */\nthingsboard()-\u003edeviceApi()-\u003esetAttribute('deviceToken', 'A1_TEST_TOKEN')-\u003epostDeviceAttributes([...])\n\n/** With Authentication */\nthingsboard()-\u003edevice()-\u003ewithUser($tenantUser)-\u003egetDeviceById('ca3b8fc0-dcf6-11ed-a299-0f591673a2d6')\nthingsboard($tenantUser)-\u003edevice()-\u003esetAttribute('id', 'ca3b8fc0-dcf6-11ed-a299-0f591673a2d6')-\u003egetDeviceById()\nthingsboard()-\u003edevice(['id' =\u003e 'ca3b8fc0-dcf6-11ed-a299-0f591673a2d6'])-\u003ewithUser($tenantUser)-\u003egetDeviceById()\n```\n\n\n\n\n## Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.\n\n\n\n\n## Credits\n\n- [JalalLinuX](https://github.com/jalallinux)\n- [All Contributors](../../contributors)\n\n\n\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjalallinux%2Flaravel-thingsboard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjalallinux%2Flaravel-thingsboard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjalallinux%2Flaravel-thingsboard/lists"}