More than one slider in tab

Hi,
I’m trying to build a RGB controler to drive a RGB Led strip.

I would have 3 sliders, one by color … but it doesn’t work at all :-X

I’v got two issues :

  • First it never print more than one slider (the last one, the blue one here) on tab.
  • Second, despite I put MaxValue to 255, the max value stayed 100.
[...]
            "Control": [
                {
                    "ControlGroup": "3",
                    "ControlType": "slider",
                    "top": "0",
                    "left": "0",
                    "Label": {
                        "lang_tag": "cmd_on",
                        "text": "On"
                    },
                    "Display": {
                        "Service": "urn:upnp-org:serviceId:Dimming1",
                        "Variable": "LoadLevelStatus",
                        "MinValue": "0",
                        "MaxValue": "100",
                        "Top": 100,
                        "Left": 50,
                        "Width": 100,
                        "Height": 25,
                        "ID": "newLoadlevelTarget"
                    },
                    "Command": {
                        "Service": "urn:upnp-org:serviceId:Dimming1",
                        "Action": "SetLoadLevelTarget",
                        "Parameters": [
                            {
                                "Name": "newLoadlevelTarget",
                                "ID": "newLoadlevelTarget"
                            }
                        ]
                    },
					"ControlCode": "dim"
                },
                {
                    "ControlGroup": "1",
                    "ControlType": "button",
                    "top": "1.5",
                    "left": "0",
                    "Label": {
                        "lang_tag": "cmd_off",
                        "text": "Off"
                    },
                    "Display": {
                        "Service": "urn:upnp-org:serviceId:Dimming1",
                        "Variable": "LoadLevelStatus",
                        "Value": "0",
                        "Top": 50,
                        "Left": 50,
                        "Width": 75,
                        "Height": 20
                    },
                    "Command": {
                        "Service": "urn:upnp-org:serviceId:Dimming1",
                        "Action": "SetLoadLevelTarget",
                        "Parameters": [
                            {
                                "Name": "newLoadlevelTarget",
                                "Value": "0"
                            }
                        ]
                    },
					"ControlCode": "power_off"
                },
                {
                    "ControlGroup": "2",
                    "ControlType": "button",
                    "top": "1.5",
                    "left": "1",
                    "Label": {
                        "lang_tag": "cmd_on",
                        "text": "On"
                    },
                    "Display": {
                        "Service": "urn:upnp-org:serviceId:Dimming1",
                        "Variable": "LoadLevelStatus",
                        "Value": "100",
                        "Top": 50,
                        "Left": 450,
                        "Width": 75,
                        "Height": 20
                    },
                    "Command": {
                        "Service": "urn:upnp-org:serviceId:Dimming1",
                        "Action": "SetLoadLevelTarget",
                        "Parameters": [
                            {
                                "Name": "newLoadlevelTarget",
                                "Value": "100"
                            }
                        ]
                    },
					"ControlCode": "power_on"
                },
                {  
                    "ControlType": "slider",
                    "Label": {
                        "lang_tag": "cmd_Red",
                        "text": "Red"
                    },
                    "Display": {
                        "Service": "urn:antor-fr:serviceId:LEDController1",
                        "Variable": "Red",
                        "MinValue": "0",
                        "MaxValue": "255",
                        "Top": 200,
                        "Left": 50,
                        "Width": 100,
                        "Height": 25,
                        "ID": "newRed"
                    },
                    "Command": {
                        "Service": "urn:antor-fr:serviceId:LEDController1",
                        "Action": "SetColor",
                        "Parameters": [
                            {
                                "Name": "newRed",
                                "ID": "newRed"
                            }
                        ]
                    },
                    "ControlCode": "Dim_Red"
                },
                {
                    "ControlType": "slider",
                    "Label": {
                        "lang_tag": "cmd_Green",
                        "text": "Green"
                    },
                    "Display": {
                        "Service": "urn:antor-fr:serviceId:LEDController1",
                        "Variable": "Green",
                        "MinValue": "0",
                        "MaxValue": "255",
                        "Top": 250,
                        "Left": 50,
                        "Width": 100,
                        "Height": 25,
                        "ID": "newGreen"
                    },
                    "Command": {
                        "Service": "urn:antor-fr:serviceId:LEDController1",
                        "Action": "SetColor",
                        "Parameters": [
                            {
                                "Name": "newGreen",
                                "ID": "newGreen"
                            }
                        ]
                    },
                    "ControlCode": "Dim_Green"
                },
                {
                    "ControlType": "slider_vertical",
                    "Label": {
                        "lang_tag": "cmd_Blue",
                        "text": "Blue"
                    },
                    "Display": {
                        "Service": "urn:antor-fr:serviceId:LEDController1",
                        "Variable": "Blue",
                        "MinValue": "0",
                        "MaxValue": "255",
                        "Top": 300,
                        "Left": 50,
                        "Width": 25,
                        "Height": 100,
                        "ID": "newBlue"
                    },
                    "Command": {
                        "Service": "urn:antor-fr:serviceId:LEDController1",
                        "Action": "SetColor",
                        "Parameters": [
                            {
                                "Name": "newBlue",
                                "ID": "newBlue"
                            }
                        ]
                    },
                    "ControlCode": "Dim_Blue",
                    "ControlHeader":"1" 
                }
            ]
 [...]

Any idea why ? ???

Great thank for your help :slight_smile:

Antor, when I last went and looked at the supporting JavaScript code for slider controls, I found a lot of hardcoded assumptions. It’s possible that “range 0-100” and “only one per device” are two of those hardcoded assumptions. You’d really have to go digging in the JavaScript to confirm that.

I noticed a similar problem few days ago when I tried to include a second slider in a flash tab.
Probably another MCV bug.

Please note that this plugin is using two vertical sliders : Radio Thermostat Wi-Fi Plugin
Does it mean that the problem is only with horizontal sliders ?
Or does it mean that this plugin is no more working with the last firmware version ?

I agree, use a javascript Tab you can do almost what you wan’t, and no “magic stuff” comming from mcv to understand :wink:

[quote=“lolodomo, post:4, topic:173016”]Please note that this plugin is using two vertical sliders : Radio Thermostat Wi-Fi Plugin
Does it mean that the problem is only with horizontal sliders ?
Or does it mean that this plugin is no more working with the last firmware version ?[/quote]

Hi lolodomo, I tried with vertical sliders :

  • Yes, you can put more than One :). Funny thing to note, first is red and other are blue … one more hard codded thing
  • I have same issues with MaxValue to 255 … blocked at 100.