Page 1 of 1

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

Posted: Thursday 19 September 2024 10:59
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.

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

Posted: Tuesday 03 June 2025 16:42
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?

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

Posted: Tuesday 03 June 2025 18:53
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?

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

Posted: Wednesday 04 June 2025 17:59
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.

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

Posted: Wednesday 04 June 2025 18:25
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!!!
.

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

Posted: Wednesday 25 June 2025 15:07
by Gonetolunch
Thank you for the tip about my second user. I've now deleted it and am working as an admin, just like before. So, as I've done too many times before, I had to re-sort all my switches, sensors, and meters. Hopefully for the last time.

If this means that all newly created devices are automatically added to the end of the tabs in the future, as before, then my problem is solved.

Overall, it's annoying for me because all these problems were triggered by the changes made in this 2024.7 update, because after this update, all my tabs were completely empty. Overall, this was a nasty trap for me.

Admittedly, I'm not the most diligent reader of manuals, and this is the first time I've seen the section about user management 8-)

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

Posted: Wednesday 25 June 2025 15:53
by gizmocuz
Yes it does
As mentioned, don't specify devices for the admin users (by default)