led-control icon indicating copy to clipboard operation
led-control copied to clipboard

v.2.0.0 Not setting UI elements after preset select

Open uresu opened this issue 3 years ago • 5 comments

[First of all, awesome work on v2.0.0, really enhances a great piece of work - do you want to see a video of my setup in action?]

The issue I have is that when I select a preset, the UI elements (select boxes etc) are not populated with the settings that they actually are. I would expect the palettes and patterns for each section to be updated after a preset is selected. I hope this is clear...

uresu avatar Feb 21 '22 20:02 uresu

  1. What web browser and version are you using?
  2. Can you send a screenshot of what is reported in the Javascript console (press F12 or use the right click menu to open developer tools in your web browser, and select the Console tab)?

jackw01 avatar Feb 21 '22 20:02 jackw01

Hi Jack, I'm using Chrome version 98.0.4758.102 (Official Build) (x86_64)

console shows :

Loading preset: All White Store.js:80 Loading preset: Pride Store.js:80 Loading preset: Forest Store.js:80 Loading preset: All White Store.js:80 Loading preset: Sunset

I actually think the view is being updated with the WRONG settings. In the background the right settings are displayed on the LEDs but the UI is loading values from a different preset.

uresu avatar Feb 22 '22 07:02 uresu

Can you send the config file (at /etc/ledcontrol.json by default)?

jackw01 avatar Feb 22 '22 17:02 jackw01

{
   "functions":{
      "0":{
         "default":true,
         "primary_scale":1.0,
         "primary_speed":0.0
      },
      "1":{
         "default":true,
         "primary_scale":1.0,
         "primary_speed":0.0
      },
      "100":{
         "default":true,
         "primary_scale":1.0,
         "primary_speed":0.2
      },
      "110":{
         "default":true,
         "primary_scale":1.0,
         "primary_speed":0.2
      },
      "112":{
         "default":true,
         "primary_scale":1.0,
         "primary_speed":0.2
      },
      "114":{
         "default":true,
         "primary_scale":1.0,
         "primary_speed":0.2
      },
      "120":{
         "default":true,
         "primary_scale":1.0,
         "primary_speed":0.2
      },
      "130":{
         "default":true,
         "primary_scale":1.0,
         "primary_speed":0.2
      },
      "140":{
         "default":true,
         "primary_scale":1.0,
         "primary_speed":0.1
      },
      "141":{
         "default":true,
         "primary_scale":1.0,
         "primary_speed":0.1
      },
      "150":{
         "default":true,
         "primary_scale":1.0,
         "primary_speed":0.05
      },
      "160":{
         "default":true,
         "primary_scale":1.0,
         "primary_speed":0.2
      },
      "161":{
         "default":true,
         "primary_scale":1.0,
         "primary_speed":0.2
      },
      "170":{
         "default":true,
         "primary_scale":1.0,
         "primary_speed":0.2
      },
      "180":{
         "default":true,
         "primary_scale":1.0,
         "primary_speed":0.2
      },
      "190":{
         "default":true,
         "primary_scale":1.0,
         "primary_speed":0.2
      },
      "2":{
         "default":true,
         "primary_scale":1.0,
         "primary_speed":0.0
      },
      "200":{
         "default":true,
         "primary_scale":1.0,
         "primary_speed":0.3
      },
      "210":{
         "default":true,
         "primary_scale":1.0,
         "primary_speed":0.3
      },
      "3":{
         "default":true,
         "primary_scale":1.0,
         "primary_speed":0.0
      },
      "310":{
         "default":true,
         "primary_scale":1.0,
         "primary_speed":0.2
      },
      "320":{
         "default":true,
         "primary_scale":1.0,
         "primary_speed":0.2
      },
      "330":{
         "default":true,
         "primary_scale":1.0,
         "primary_speed":0.1
      },
      "331":{
         "default":true,
         "primary_scale":1.0,
         "primary_speed":0.1
      },
      "340":{
         "default":true,
         "primary_scale":1.0,
         "primary_speed":0.2
      },
      "350":{
         "default":true,
         "primary_scale":1.0,
         "primary_speed":0.2
      },
      "400":{
         "default":true,
         "primary_scale":1.0,
         "primary_speed":0.2
      },
      "410":{
         "default":true,
         "primary_scale":1.0,
         "primary_speed":0.2
      },
      "420":{
         "default":true,
         "primary_scale":1.0,
         "primary_speed":0.2
      },
      "430":{
         "default":true,
         "primary_scale":1.0,
         "primary_speed":0.2
      },
      "440":{
         "default":true,
         "primary_scale":1.0,
         "primary_speed":0.2
      },
      "450":{
         "default":true,
         "primary_scale":1.0,
         "primary_speed":0.2
      },
      "6":{
         "default":true,
         "primary_scale":1.0,
         "primary_speed":0.2
      },
      "7":{
         "default":true,
         "primary_scale":1.0,
         "primary_speed":0.2
      }
   },
   "palettes":{
      "1645181389944":{
         "colors":[
            [
               0.42371323529411764,
               1,
               1
            ],
            [
               0.29342830882352944,
               1,
               1
            ]
         ],
         "default":false,
         "name":"Forest"
      },
      "1645471247398":{
         "colors":[
            [
               0.6342486213235294,
               1,
               0.5900160845588236
            ],
            [
               0.6541819852941176,
               1,
               0.31588924632352944
            ]
         ],
         "default":false,
         "name":"Moonlit Pond"
      }
   },
   "presets":{
      "All White":{
         "g_1645125891751":{
            "brightness":1,
            "color_temp":6500,
            "function":1,
            "palette":500,
            "saturation":1,
            "scale":1,
            "speed":0.2
         },
         "g_1645125925367":{
            "brightness":1,
            "color_temp":6500,
            "function":1,
            "palette":500,
            "saturation":1,
            "scale":1,
            "speed":0.2
         },
         "main":{
            "brightness":1,
            "color_temp":6500,
            "function":1,
            "palette":90,
            "saturation":1,
            "scale":1,
            "speed":0.2
         }
      },
      "Forest":{
         "g_1645125891751":{
            "brightness":1,
            "color_temp":6500,
            "function":190,
            "palette":1645181389944,
            "saturation":1,
            "scale":1,
            "speed":0.07
         },
         "g_1645125925367":{
            "brightness":1,
            "color_temp":6500,
            "function":150,
            "palette":1645471247398,
            "saturation":1,
            "scale":1,
            "speed":0.02
         },
         "main":{
            "brightness":0.07,
            "color_temp":6500,
            "function":0,
            "palette":1645181389944,
            "saturation":1,
            "scale":1,
            "speed":0.2
         }
      },
      "Pride":{
         "g_1645125891751":{
            "brightness":1,
            "color_temp":6500,
            "function":100,
            "palette":500,
            "saturation":1,
            "scale":1,
            "speed":0.2
         },
         "g_1645125925367":{
            "brightness":1,
            "color_temp":6500,
            "function":100,
            "palette":500,
            "saturation":1,
            "scale":1,
            "speed":0.2
         },
         "main":{
            "brightness":1,
            "color_temp":6500,
            "function":100,
            "palette":500,
            "saturation":1,
            "scale":1,
            "speed":0.2
         }
      },
      "Sunset":{
         "g_1645125891751":{
            "brightness":1,
            "color_temp":6500,
            "function":190,
            "palette":280,
            "saturation":1,
            "scale":1,
            "speed":0.07
         },
         "g_1645125925367":{
            "brightness":1,
            "color_temp":6500,
            "function":150,
            "palette":280,
            "saturation":1,
            "scale":1,
            "speed":0.07
         },
         "main":{
            "brightness":0.07,
            "color_temp":6500,
            "function":150,
            "palette":290,
            "saturation":1,
            "scale":1,
            "speed":0.04
         }
      }
   },
   "save_version":2,
   "settings":{
      "calibration":0,
      "global_brightness":1,
      "global_brightness_limit":1,
      "global_color_b":170,
      "global_color_g":190,
      "global_color_r":255,
      "global_color_temp":6500,
      "global_saturation":1,
      "groups":{
         "g_1645125891751":{
            "brightness":1,
            "color_temp":6500,
            "function":1,
            "mapping":[
               
            ],
            "name":"Shower",
            "palette":500,
            "range_end":355,
            "range_start":171,
            "saturation":1,
            "scale":1,
            "speed":0.2
         },
         "g_1645125925367":{
            "brightness":1,
            "color_temp":6500,
            "function":1,
            "mapping":[
               
            ],
            "name":"Purlin",
            "palette":500,
            "range_end":444,
            "range_start":355,
            "saturation":1,
            "scale":1,
            "speed":0.2
         },
         "main":{
            "brightness":1,
            "color_temp":6500,
            "function":1,
            "mapping":[
               
            ],
            "name":"Shelves",
            "palette":90,
            "range_end":171,
            "range_start":1,
            "saturation":1,
            "scale":1,
            "speed":0.2
         }
      },
      "sacn":0
   }
}

uresu avatar Feb 22 '22 18:02 uresu

I have been using v2.0.0 on a daily basis for over a month and have tested with your configuration and haven't seen anything like this issue. If it is still a problem, can you possibly capture it in a screen recording?

jackw01 avatar Mar 19 '22 03:03 jackw01