Page 1 of 1

idx number are being re-used on new devices

Posted: Tuesday 24 January 2023 14:19
by pjsgsy
Hi,

I have a huge issue with my Domoticz. A while back I created some new scenes and these got created with device idx's that were already in use by other sensors. I lost a lot of historical data I wanted. I did post about it in the bug section a few months back, but I did not hear anything, so...

I've just been trying to make some changes to my setup, and the device idx's are getting duplicated all over the place, which means I am losing devices and things are stopping working. I've gone back to a backup again, but if I add/change any devices, the issue will just start again.

I've seen a few threads in here about idx numbers, but nothing like this. I understand this idx is stored in the db somewhere, but I do not know if it is easy to change. Perhaps I can set it over my current highest value (210), somehow? Otherwise, it seems to start around 5/6 and I already have sensors there!

Anyone can help me with this? As I am totally stuck with it as is.... Thanks.

Re: idx number are being re-used on new devices

Posted: Friday 27 January 2023 0:09
by waltervl
This is really strange as IDX of group/scene can be the same as normal devices by design. Domoticz can handle this and should not lead to data loss. Perhaps a script or plugin is mixing things up?


Below my device list with double IDX
Screenshot_20230127-000540-736.png
Screenshot_20230127-000540-736.png (168.53 KiB) Viewed 365 times

Re: idx number are being re-used on new devices

Posted: Friday 27 January 2023 10:31
by gizmocuz
Well there is a difference between devices and non-devices (like scenes/groups) so this is normal and have always been like this
The database tables are also different