flutter_thingsboard_app icon indicating copy to clipboard operation
flutter_thingsboard_app copied to clipboard

How to set Device Name from attribute

Open ferchinas opened this issue 4 years ago • 1 comments

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

ferchinas avatar Nov 26 '21 16:11 ferchinas

Hello @ferchinas,

is it still relevant?

ybeshkarov avatar Jun 11 '24 18:06 ybeshkarov

Closed as not relevant anymore.

ybeshkarov avatar Jul 08 '24 08:07 ybeshkarov