Option to change idx

Use this forum to discuss possible implementation of a new feature before opening a ticket.
A developer shall edit the topic title with "[xxx]" where xxx is the id of the accompanying tracker id.
Duplicate posts about the same id. +1 posts are not allowed.

Moderators: leecollings, remb0

Post Reply
HvdW
Posts: 616
Joined: Sunday 01 November 2015 22:45
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.2
Location: Twente
Contact:

Option to change idx

Post by HvdW »

Is it possible to have an option to change the idx number of a device in the future.

User case.
I have a temperature/humidity meter outside.
Every now and then it need to have new batteries.
When batteries are changed it gets a new idx.
This is not a problem in itself but I'd like to see the long run temperature scales like Temperature Last Year.

I'm handling it now by adapting the old idx in domoticz.db to the new assigned idx after battery replacement.

Adding this option of swapping idx numbers is a very risky thing. I realise that.

The suggestion is that domoticz reads the Hardware and/or Type and/or SubType name and makes a suggestion to attach the 'new' device to an existing device with corresponding idx number.
I don't know if ID is handed out by the device. If that is the case it would be simple to match old and new.
Bugs bug me.
Kedi
Posts: 577
Joined: Monday 20 March 2023 14:41
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Somewhere in NL
Contact:

Re: Option to change idx

Post by Kedi »

What I do is replace the device with the new one in the old device. There is a button for it after the 'Edit' button.
Logic will get you from A to B. Imagination will take you everywhere.
User avatar
waltervl
Posts: 5890
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Option to change idx

Post by waltervl »

See the wiki for more info on the mentioned Replace function https://www.domoticz.com/wiki/Managing_ ... ace_device

Perhaps also interesting to read this whole page ;)
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest