Widget / Device re-sorted in all tabs after adding / enabling a new device

Please use template to report bugs and problems. Post here your questions when not sure where else to post
Only for bugs in the Domoticz application! other problems go in different subforums!

Moderators: leecollings, remb0

Forum rules
Before posting here, make sure you are on the latest Beta or Stable version.
If you have problems related to the web gui, clear your browser cache + appcache first.

Use the following template when posting here:

Version: xxxx
Platform: xxxx
Plugin/Hardware: xxxx
Description:
.....

If you are having problems with scripts/blockly, always post the script (in a spoiler or code tag) or screenshots of your blockly

If you are replying, please do not quote images/code from the first post

Please mark your topic as Solved when the problem is solved.
Post Reply
MichelFrance
Posts: 8
Joined: Tuesday 19 November 2019 16:28
Target OS: Linux
Domoticz version: 2023.1
Location: France
Contact:

Widget / Device re-sorted in all tabs after adding / enabling a new device

Post by MichelFrance »

Version: all
Platform: all
Plugin/Hardware: not relevant
Description:

Hi,

It seems that this problem has already been mentioned in the following posts:
viewtopic.php?p=310650#p310650
and
viewtopic.php?p=308769#p308769
but has not been solved. Maybe the description was not clear, so I will restate the problem.

In my installation, I have around 50 switches:
- 17 blinds
- 8 Tasmota controlled electric socket
- 8 Zigbee controlled electric socket
- 2 Zigbee buttons
- several dummy switches that commands various scenarios such as "open all blinds except my sun's bedroom" or "close blinds for very sunny morning" (close all the east blinds and open the others) or "close blinds for very sunny afternoon" and so on.

Some of the electric sockets switches are "permanent" such as my sun vivarium heating or external light, but some other have changing usage along the time: I some time use one of the switches to control the Christmas tree lights or some temporary usage of this kind.

I also have 15 temperature sensors (for each room and external).

I use to manually sort the devices in a "logical" order, for example for the blinds I order them as "a walk around the house" or for the electric sockets by usage and/or room (remember some of the sockets change usage and location). I also group unused/free sockets.

Fine.

The problem is each time I add a device (real or dummy) all device ordering is lost (dashboard, switch tab, temperature tab, etc) and alphabetically re-sorted... I shall then re-order manually everything to keep my logic.

I don't pretend that my usage is universal, and the current behavior (re-sort alphabetically each time the list of devices is changed) may have sense for some users, but in my case it is very annoying. By the way, devices are not re-sorted when you rename a device, so when looking for a specific device, you cannot expect to find it in it's alphabetical position...

Is there a way to avoid automatic sorting the devices and insert the new devices as the last, having then only to manually move it at the right "logical" position ?

Or could you add an option in order to let the user decide between the to behavior.

Thanks for reading up to the end of this long post, I hope that this is clear and will have a solution.
Regards.
Gonetolunch
Posts: 11
Joined: Thursday 22 December 2016 14:33
Target OS: Raspberry Pi / ODroid
Domoticz version: 2025.1
Location: here -->
Contact:

Widget / Device re-sorted in all tabs after adding / enabling a new device

Post by Gonetolunch »

Me Too!

Since version 2024.7 and now 2025.1, I've also had the problem that every time I add a new sensor, switch, or meter, all the tabs are rearranged alphabetically.

This destroys the order I painstakingly created. Before version 2024.7, this wasn't the case; new things were simply added to the end of the list, so I only had to arrange those.

Now I have to completely re-sort the entire tab lists each time.

Would it be possible to restore the previous state, where new switches, sensors, or meters are simply added to the end of the list?
User avatar
waltervl
Posts: 5791
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Widget / Device re-sorted in all tabs after adding / enabling a new device

Post by waltervl »

I cannot reproduce that. If I order the devices and add a new device this new device will always appear on the end of the page. And the order will stay the same.

I have 1 users (admin) and I have not assigned devices to that admin user (do not assign devices to an admin!).
Do you have more users?
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Gonetolunch
Posts: 11
Joined: Thursday 22 December 2016 14:33
Target OS: Raspberry Pi / ODroid
Domoticz version: 2025.1
Location: here -->
Contact:

Re: Widget / Device re-sorted in all tabs after adding / enabling a new device

Post by Gonetolunch »

This problem with the unwanted rearrangement of switches, sensors and meters first occurred with the update to 2024.7.

At the same time, I had the challenge that after this update I was only shown completely empty tabs, i.e. all my switches, sensors and meters had disappeared. I first had to find out why this was happening and discovered that I first had to release my invisible switches, sensors and meters to a user. At this point I created myself as a second user in addition to admin.

Since then, however, the problem described above has also existed that for every newly added switch, sensor or meter, it first has to be released to the user before it is even displayed. This means that all switches, sensors and meters are sorted alphabetically in all tabs each time.
User avatar
waltervl
Posts: 5791
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Widget / Device re-sorted in all tabs after adding / enabling a new device

Post by waltervl »

Do you actively use 2 users or did you only create one extra for the migration issue?

You should not assign devices to an admin user as mentioned in the wiki.https://wiki.domoticz.com/User_Management
So what if you clear the device assignment list for all the admin users? Also delete the extra user when you do not need that

All (new) devices will automatically be shown to the admin user and sorting works.

But basic rules is: No device assignments to admin users!!!
.
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