[ST Edge] Issue with LAN device rename

Hi,

Could it be that renaming of device in ST App is not propagated to the platform?

To reproduce:

  1. open logger
  2. create LAN device, for example a switch
  3. press a button. You should see emitting event log with device id and name
  4. rename the device
  5. press a button. You will see emitting event with the old name

My use case:
For virtual things driver, I’d like to show a list of virtual devices created. Naturally, once the device name is changed, I’d like to be able to show the new one.

I also tried to force refresh the driver’s cache:

local device_uuid_list = driver.device_api.get_device_list()
for i, uuid in ipairs(device_uuid_list) do
    driver:get_device_info(uuid, true)
end

but it didn’t do any good.
Then I tried to print json, returned from driver.device_api.get_device_info.
This call returns the old name.

Thank you for your help

Hi, @ygerlovin!

The change in the device label (the name shown in the ST app) can take from 12 up to 24 hrs to update in the Hub.
So, you need to wait for a while to see this new value.

1 Like

Thank you @nayelyz .
Is force refresh required to see the updated value?
Thanks

No, if you want to force the refresh, you would have to restart/disconnect your Hub after two hours of the label change.
But, remember that this will drop all the schedules you have in your drivers
Otherwise, the value is updated (12/24 hours) due to the automatic synchronization.