@@ -377,7 +377,7 @@ def main():
377377
378378 # Creating an Asset
379379 default_asset_profile_id = rest_client.get_default_asset_profile_info().id
380- asset = Asset(name = " Building 1 " ,
380+ asset = Asset(name = " Building 12 " ,
381381 asset_profile_id = default_asset_profile_id)
382382 asset = rest_client.save_asset(asset)
383383
@@ -387,6 +387,8 @@ def main():
387387 # Also, you can use default Device Profile:
388388 # default_device_profile_id = rest_client.get_default_device_profile_info().id
389389 device_profile = DeviceProfile(name = " Thermometer" ,
390+ type = " DEFAULT" ,
391+ transport_type = " DEFAULT" ,
390392 profile_data = DeviceProfileData(configuration = {" type" : " DEFAULT" },
391393 transport_configuration = {" type" : " DEFAULT" }))
392394 device_profile = rest_client.save_device_profile(device_profile)
@@ -426,16 +428,17 @@ There are 2 possible ways to configure version control system (VCS):
426428
427429To configure this feature we will need the command line arguments and data:
428430
429- | Command line argument | Description |
430- | -| -|
431- | -H | ** ThingsBoard host (Default: localhost)** |
432- | -p | ** ThingsBoard port (Default: 80)** |
433- | -U | ** ThingsBoard user (email for login)** |
434- | -P | ** ThingsBoard user password** |
435- | -r | ** Repository uri, link to your repository** |
436- | -b | ** Default branch (Default: main)** |
437- | -gu | ** VCS username** (This parameter named GITHUB_USERNAME, but it can work with any VCS) |
438- | -gp | ** VCS access token / password** (This parameter named GITHUB_PASSWORD, but it can work with any VCS)|
431+ | Command line argument | Description |
432+ | -----------------------| ------------------------------------------------------------------------------------------------------|
433+ | -H | ** ThingsBoard host (Default: localhost)** |
434+ | -p | ** ThingsBoard port (Default: 80)** |
435+ | -U | ** ThingsBoard user (email for login)** |
436+ | -P | ** ThingsBoard user password** |
437+ | -r | ** Repository uri, link to your repository** |
438+ | -b | ** Default branch (Default: main)** |
439+ | -gu | ** VCS username** (This parameter named GITHUB_USERNAME, but it can work with any VCS) |
440+ | -gp | ** VCS access token / password** (This parameter named GITHUB_PASSWORD, but it can work with any VCS) |
441+ | --------------------- | ----------------------------------------------------------------------------------------- |
439442
440443* You always can get the full list of arguments by calling script with* ** -h** * argument.*
441444
@@ -457,17 +460,18 @@ python3 configure_vcs_access.py -H YOUR_THINGSBOARD_HOST -p YOUR_THINGSBOARD_POR
457460
458461To configure this feature we will need next command line arguments and data:
459462
460- | Command line argument | Description |
461- | -| -|
462- | -H | ** ThingsBoard host (Default: localhost)** |
463- | -p | ** ThingsBoard port (Default: 80)** |
464- | -U | ** ThingsBoard user (email for login)** |
465- | -P | ** ThingsBoard user password** |
466- | -r | ** Repository uri, link to your repository** |
467- | -b | ** Default branch (Default: main)** |
468- | -gu | ** VCS username** (This parameter named GITHUB_USERNAME, but it can work with any VCS) |
469- | -pk | ** Path to private key** |
470- | -pkp | ** Password for private key (If it was set)** |
463+ | Command line argument | Description |
464+ | -------------------------| -----------------------------------------------------------------------------------------|
465+ | -H | ** ThingsBoard host (Default: localhost)** |
466+ | -p | ** ThingsBoard port (Default: 80)** |
467+ | -U | ** ThingsBoard user (email for login)** |
468+ | -P | ** ThingsBoard user password** |
469+ | -r | ** Repository uri, link to your repository** |
470+ | -b | ** Default branch (Default: main)** |
471+ | -gu | ** VCS username** (This parameter named GITHUB_USERNAME, but it can work with any VCS) |
472+ | -pk | ** Path to private key** |
473+ | -pkp | ** Password for private key (If it was set)** |
474+ | ----------------------- | --------------------------------------------------------------------------------------- |
471475
472476* You always can get the full list of arguments by calling script with* ** -h** * argument.*
473477
@@ -494,20 +498,21 @@ The latest source code you can find [here](https://github.com/thingsboard/things
494498
495499To save entities from command line we will use the following arguments and data:
496500
497- | Command line argument | Description |
498- | -| -|
499- | -H | ** ThingsBoard host (Default: localhost)** |
500- | -p | ** ThingsBoard port (Default: 80)** |
501- | -U | ** ThingsBoard user (email for login)** |
502- | -P | ** ThingsBoard user password** |
503- | -b | ** Default branch (Default: main)** |
504- | -N | ** Version name (If not provided will be generated 5 random letters and numbers and used as a name)** |
505- | --save_attributes | ** Optional, do we need to save attributes for target entities (Default: True)** |
506- | --save_credentials | ** Optional, do we need to save credentials for target entities (Default: True)** |
507- | --save_relations | ** Optional, do we need to save relations for target entities (Default: True)** |
508- | --save_group_entities | ** Optional, do we need to save entities group for target entities (Default: True)** |
509- | --save_permissions | ** Optional, do we need to save permissions for target entities (Default: True)** |
510- | --sync_strategy | ** Optional, Sync strategy for saving entities can be OVERWRITE and MERGE (Default: MERGE)** |
501+ | Command line argument | Description |
502+ | -------------------------| ------------------------------------------------------------------------------------------------------|
503+ | -H | ** ThingsBoard host (Default: localhost)** |
504+ | -p | ** ThingsBoard port (Default: 80)** |
505+ | -U | ** ThingsBoard user (email for login)** |
506+ | -P | ** ThingsBoard user password** |
507+ | -b | ** Default branch (Default: main)** |
508+ | -N | ** Version name (If not provided will be generated 5 random letters and numbers and used as a name)** |
509+ | --save_attributes | ** Optional, do we need to save attributes for target entities (Default: True)** |
510+ | --save_credentials | ** Optional, do we need to save credentials for target entities (Default: True)** |
511+ | --save_relations | ** Optional, do we need to save relations for target entities (Default: True)** |
512+ | --save_group_entities | ** Optional, do we need to save entities group for target entities (Default: True)** |
513+ | --save_permissions | ** Optional, do we need to save permissions for target entities (Default: True)** |
514+ | --sync_strategy | ** Optional, Sync strategy for saving entities can be OVERWRITE and MERGE (Default: MERGE)** |
515+ | ----------------------- | ----------------------------------------------------------------------------------------- |
511516
512517* You always can get the full list of arguments by calling script with* ** -h** * argument.*
513518
@@ -533,21 +538,22 @@ The latest source code you can find [here](https://github.com/thingsboard/things
533538
534539To load entities from command line we will use the following arguments and data:
535540
536- | Command line argument | Description |
537- | -| -|
538- | -H | ** ThingsBoard host (Default: localhost)** |
539- | -p | ** ThingsBoard port (Default: 80)** |
540- | -U | ** ThingsBoard user (email for login)** |
541- | -P | ** ThingsBoard user password** |
542- | -b | ** Default branch (Default: main)** |
543- | -N | ** Version name (You can provide a part of the version name and script will propose you all find versions that include provided name)** |
544- | --find_existing_entity_by_name | ** Optional, do we need to looking for existing entities by their names instead of using ids(Default: True)** |
545- | --load_attributes | ** Optional, do we need to load attributes for target entities (Default: True)** |
546- | --load_credentials | ** Optional, do we need to load credentials for target entities (Default: True)** |
547- | --load_relations | ** Optional, do we need to load relations for target entities (Default: True)** |
548- | --load_group_entities | ** Optional, do we need to load entities group for target entities (Default: True)** |
549- | --load_permissions | ** Optional, do we need to load permissions for target entities (Default: True)** |
550- | --sync_strategy | ** Optional, Sync strategy for existing entities can be OVERWRITE and MERGE (Default: MERGE)** |
541+ | Command line argument | Description |
542+ | --------------------------------| ----------------------------------------------------------------------------------------------------------------------------------------|
543+ | -H | ** ThingsBoard host (Default: localhost)** |
544+ | -p | ** ThingsBoard port (Default: 80)** |
545+ | -U | ** ThingsBoard user (email for login)** |
546+ | -P | ** ThingsBoard user password** |
547+ | -b | ** Default branch (Default: main)** |
548+ | -N | ** Version name (You can provide a part of the version name and script will propose you all find versions that include provided name)** |
549+ | --find_existing_entity_by_name | ** Optional, do we need to looking for existing entities by their names instead of using ids(Default: True)** |
550+ | --load_attributes | ** Optional, do we need to load attributes for target entities (Default: True)** |
551+ | --load_credentials | ** Optional, do we need to load credentials for target entities (Default: True)** |
552+ | --load_relations | ** Optional, do we need to load relations for target entities (Default: True)** |
553+ | --load_group_entities | ** Optional, do we need to load entities group for target entities (Default: True)** |
554+ | --load_permissions | ** Optional, do we need to load permissions for target entities (Default: True)** |
555+ | --sync_strategy | ** Optional, Sync strategy for existing entities can be OVERWRITE and MERGE (Default: MERGE)** |
556+ | ------------------------------ | ----------------------------------------------------------------------------------------- |
551557
552558* You always can get the full list of arguments by calling script with no arguments or with* ** -h** * argument.*
553559
0 commit comments