thingsboard / flutter_thingsboard_app

ThingsBoard Mobile Application
https://thingsboard.io/products/mobile/
BSD 3-Clause "New" or "Revised" License
208 stars 155 forks source link

How to set Device Name from attribute #10

Closed ferchinas closed 2 weeks ago

ferchinas commented 2 years ago

Hello, thank you very much for this wonderful App. I need users to be able to change the deviceName of each of their devices. Since I did not find a way to set the value of the "Name" or "Label" property of the devices from the dashboard. I save it in a shared attribute (so that the device can read it and show it on its screen) that the user can change it from the dashboard.

I plan to retrieve the value with the following call

var entityId = EntityId.fromTypeAndUuid (EntityType.DEVICE, device.entityId.id!);
var deviceServerAtts = tbClient.getAttributeService (). getAttributesByScope (entityId, "SHARED_SCOPE", ["config.deviceName"]);

The problem is that I don't know where to replace "Name" of the device with the value of the shared attribute "config.deviceName" in the whole App.

Can someone guide me? Thank you

ybeshkarov commented 1 month ago

Hello @ferchinas,

is it still relevant?

ybeshkarov commented 2 weeks ago

Closed as not relevant anymore.