jambtc / thingsboard-php-sdk
SDK PHP per ThingsBoard
Installs: 285
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
pkg:composer/jambtc/thingsboard-php-sdk
Requires
- php: >=8.0
- guzzlehttp/guzzle: ^7.4.5
- guzzlehttp/psr7: ^2.7
Requires (Dev)
- phpunit/phpunit: ^11.3
This package is auto-updated.
Last update: 2025-09-29 03:14:39 UTC
README
PHP SDK for communicating with the ThingsBoard REST API
How to use
/// Inizializza AuthService con il base URL $authService = new AuthService('https://thingsboard.example.com'); // Autenticazione $authService->authenticate('username', 'password'); // Inizializza il controller dei dispositivi $deviceController = new DeviceController($authService); // Ottieni un dispositivo $device = $deviceController->getDevice('deviceId'); // Ottieni la Lista dei Dispositivi; $devices = $deviceController->getAllDevices(); // crea un tenant $tenantController = new TenantController($authService); $tenantData = [ "title" => "title", "name" => "description", "region" => "default", "tenantProfileId" => [ "id" => "tenant_profile_uuid", "entityType" => "TENANT_PROFILE" ], ]; $tenant = $tenantController->createTenant($tenantData); // crea un utente $userController = new UserController($authService); $userData = [ "tenantId" => [ "id" => "tenant_uuid", "entityType" => "TENANT" ], "email" => "example@mail.com", "name" => "example@mail.com", "authority" => "TENANT_ADMIN", "firstName" => "first Name", "lastName" => "last Name", ]; $user = $userController->createTenant($userData);