rstrouse / ESPSomfy-RTS

A controller for Somfy RTS shades and blinds
The Unlicense
429 stars 32 forks source link

Delete a group messes up the groups #354

Closed alka79 closed 1 month ago

alka79 commented 2 months ago

Hardware

ESP32

Firmware version

v2.4.2

Application version

v2.4.2

What happened? What did you expect to happen?

I deleted group#2 in a list of 4 and it messes up groups !

I first unpaired the shades in group G2 and then deleted the group itself from the app. That worked. Backup shows that the list of groups is now with IDs 1,3,4 So far, so good.

I added a new group G2 which got # 2/16. I added one shade to this newly created G2, paired it, and... when the screen refreshed the added shade appeared with the shades of former G3. All the settings (name, remote adress, shades) of former G3 are now in G2. The group I created just before was gone. I backed up again and now I see group IDs 1,2,4.

Work around : I went back to the first backup to edit and renumber the groups 1,3,4 in sequence 1,2,3. Then restored that modified backup file. Recreated a group (which got number 4) and gave it the same Remote Address as before. Added the same shade to this new G4 without actually pairing it because it was already paired, and it worked. Everything works again and I was able to add more shades G4.

It appears that the app does not like when groupIDs are not in sequence.

How to reproduce it (step by step)

see above

Logs

No response

rstrouse commented 2 months ago

Are you sure you are using the final release of v2.4.2 and not the pre-release. This was an issue with the pre-release where it was not clearing the members appropriately. Either way I will test your scenario.

alka79 commented 2 months ago

Yest is is 2.4.2. I reported the issues with groups due to json in 2.4.1 This issue is different.

rstrouse commented 2 months ago

I'll check it out. It does try to sequence the groups so that it back fills the slots so perhaps the sorting algorithm needs some work.

alka79 commented 2 months ago

As a secondary question, i have doubts about backup file restore.

After recreation of the groups 2 and 1, in the group section of my backup file, I had theses lines (partial view)

  1,  0,    615811,G3  ...
  2,  0,    615812,G4  ...
  3,  0,    615822,G2  ...   
  4,  0,    615821,G1  ...

For the sake of perfectness, I wanted to reorder. I edited the backup file and cut/paste the lines to reorder like this:

  1,  0,    615821,G1  ...
  2,  0,    615822,G2  ...
  3,  0,    615811,G3  ...   
  4,  0,    615812,G4  ...

I restored that file. The app seemed to react normally after a restore with a board reset. I reloaded the app in the browser and surprise : the groups order did not change. I backed up again and the backup file was the same as first one. As if the restore was ignored. Makes me question what happens when a backup file is restored.

rstrouse commented 2 months ago

To change the order of the groups you drag and drop them into the order you would like them to display in the app.

alka79 commented 2 months ago

oh stupid me! I was trying to drag and drop in the control section of the app and that did not work. It works perfectly in the settings :)

rstrouse commented 1 month ago

I am going to close this for now as this is fixed in the impending v2.4.3 release.