ioBroker / ioBroker.zigbee

Zigbee communcation with Hue, Xiaomi, Lighttify... via TI CC2xxx USB stick
MIT License
313 stars 190 forks source link

Wrong/outdated names in dev_names.json #1510

Closed theimo1221 closed 9 months ago

theimo1221 commented 2 years ago

Hello team,

Checking the backup file I noticed that most of the device names are missing: image

Now I fear that in case of a crash, the names will not be recovered.

Just pressing edit name and save without changes doesn't update the dev_names.json. Only changing combined with changing back does indeed update the file, with than a correct name.

Is there any way I can let ioBroker recreate the whole file with correct names? I can't do it manually as there are over 200 devices in the file.

Best regards

Thiemo

theimo1221 commented 2 years ago

Temporary Workaround

Using this snippet one can recreate the text content in the browser console, by using the data within the cards in the zigbee devices overview:

var data = [];
$(".card").each((i, e) => {
  var jq = $(e);
  var name = jq.find('.card-title').eq(0).text()
  var id = jq.find('.labelinfo:contains("iee")').eq(0).next().text().split("0x")[1];
  data.push(`"${id}": "${name}"`);
})
console.log(data.join(",\n"))
arteck commented 2 years ago

@asgothian dev_names.json is yours product :-)

asgothian commented 2 years ago

yep, but it will have to wait to next weekend - i am off to vienna :)

I'll check for a sollution inside the adapter.

arteck commented 10 months ago

check version 1.9.2 .. you can rebuild it with this button grafik