wez3/domoboard

Support Selector Switch

Closed this issue · 11 comments

Add support for the Selector Switch

Example:
multi

{
"ActTime" : 1484914957,
"ServerTime" : "2017-01-20 13:22:37",
"Sunrise" : "08:37",
"Sunset" : "17:08",
"result" : [
{
"AddjMulti" : 1.0,
"AddjMulti2" : 1.0,
"AddjValue" : 0.0,
"AddjValue2" : 0.0,
"BatteryLevel" : 255,
"CustomImage" : 16,
"Data" : "Off",
"Description" : "",
"Favorite" : 1,
"HardwareID" : 6,
"HardwareName" : "Virtuele schakelaars",
"HardwareType" : "Dummy (Does nothing, use for virtual switches only)",
"HardwareTypeVal" : 15,
"HaveDimmer" : true,
"HaveGroupCmd" : true,
"HaveTimeout" : false,
"ID" : "0001413C",
"Image" : "Cooling",
"IsSubDevice" : false,
"LastUpdate" : "2017-01-13 18:08:00",
"Level" : 0,
"LevelActions" : "||",
"LevelInt" : 0,
"LevelNames" : "Off|Cool|Heat",
"LevelOffHidden" : false,
"MaxDimLevel" : 100,
"Name" : "Airco Evy - Mode",
"Notifications" : "false",
"PlanID" : "5",
"PlanIDs" : [ 5 ],
"Protected" : false,
"SelectorStyle" : 0,
"ShowNotifications" : true,
"SignalLevel" : "-",
"Status" : "Off",
"StrParam1" : "",
"StrParam2" : "",
"SubType" : "Selector Switch",
"SwitchType" : "Selector",
"SwitchTypeVal" : 18,
"Timers" : "false",
"Type" : "Light/Switch",
"TypeImg" : "Light",
"Unit" : 1,
"Used" : 1,
"UsedByCamera" : false,
"XOffset" : "0",
"YOffset" : "0",
"idx" : "237"
}
],
"status" : "OK",
"title" : "Devices"
}

{
"ActTime" : 1484915065,
"ServerTime" : "2017-01-20 13:24:25",
"Sunrise" : "08:37",
"Sunset" : "17:08",
"result" : [
{
"AddjMulti" : 1.0,
"AddjMulti2" : 1.0,
"AddjValue" : 0.0,
"AddjValue2" : 0.0,
"BatteryLevel" : 255,
"CustomImage" : 7,
"Data" : "Set Level: 20 %",
"Description" : "",
"Favorite" : 0,
"HardwareID" : 6,
"HardwareName" : "Virtuele schakelaars",
"HardwareType" : "Dummy (Does nothing, use for virtual switches only)",
"HardwareTypeVal" : 15,
"HaveDimmer" : true,
"HaveGroupCmd" : true,
"HaveTimeout" : false,
"ID" : "00014140",
"Image" : "Fan",
"IsSubDevice" : false,
"LastUpdate" : "2016-06-10 22:19:45",
"Level" : 20,
"LevelActions" : "||||",
"LevelInt" : 20,
"LevelNames" : "Off|Auto|Low|Mid|High",
"LevelOffHidden" : true,
"MaxDimLevel" : 100,
"Name" : "Airco Evy - Fan",
"Notifications" : "false",
"PlanID" : "0",
"PlanIDs" : [ 0 ],
"Protected" : false,
"SelectorStyle" : 0,
"ShowNotifications" : true,
"SignalLevel" : "-",
"Status" : "Set Level: 20 %",
"StrParam1" : "",
"StrParam2" : "",
"SubType" : "Selector Switch",
"SwitchType" : "Selector",
"SwitchTypeVal" : 18,
"Timers" : "false",
"Type" : "Light/Switch",
"TypeImg" : "Light",
"Unit" : 1,
"Used" : 1,
"UsedByCamera" : false,
"XOffset" : "0",
"YOffset" : "0",
"idx" : "241"
}
],
"status" : "OK",
"title" : "Devices"
}

{
"ActTime" : 1484919006,
"ServerTime" : "2017-01-20 14:30:06",
"Sunrise" : "08:37",
"Sunset" : "17:08",
"result" : [
{
"AddjMulti" : 1.0,
"AddjMulti2" : 1.0,
"AddjValue" : 0.0,
"AddjValue2" : 0.0,
"BatteryLevel" : 255,
"CustomImage" : 106,
"Data" : "Set Level: 60 %",
"Description" : "",
"Favorite" : 0,
"HardwareID" : 6,
"HardwareName" : "Virtuele schakelaars",
"HardwareType" : "Dummy (Does nothing, use for virtual switches only)",
"HardwareTypeVal" : 15,
"HaveDimmer" : true,
"HaveGroupCmd" : true,
"HaveTimeout" : false,
"ID" : "00014158",
"Image" : "Horizontal2",
"IsSubDevice" : false,
"LastUpdate" : "2016-05-05 15:53:46",
"Level" : 60,
"LevelActions" : "|||||||",
"LevelInt" : 60,
"LevelNames" : "Off|Swing|Stop|Left|Middle Left|Middle|Middle Right|Right",
"LevelOffHidden" : true,
"MaxDimLevel" : 100,
"Name" : "Airco Evy - Horizontaal",
"Notifications" : "false",
"PlanID" : "0",
"PlanIDs" : [ 0 ],
"Protected" : false,
"SelectorStyle" : 1,
"ShowNotifications" : true,
"SignalLevel" : "-",
"Status" : "Set Level: 60 %",
"StrParam1" : "",
"StrParam2" : "",
"SubType" : "Selector Switch",
"SwitchType" : "Selector",
"SwitchTypeVal" : 18,
"Timers" : "false",
"Type" : "Light/Switch",
"TypeImg" : "Light",
"Unit" : 1,
"Used" : 1,
"UsedByCamera" : false,
"XOffset" : "0",
"YOffset" : "0",
"idx" : "265"
}
],
"status" : "OK",
"title" : "Devices"
}

Added different examples. Difference in LevelOffHidden and Buttons vs Combobox

Seems to work ok at least with the types of selector I use.

Please implement "LevelOffHidden" also. I disabled the Off at the Horizontal selector switch for instance.

btw, thanks for adding this nice feature.

airco

And SelectorStyle: 0=Buttons and 1=Combobox/Dropdownlist

I don't know if there is a combobox available in the python libraries, but it would be nice to have the same options in Domoboard as in Domoticz.

I've added 8 selectors to my config:
Airco Evy - Mode = 237, selector
Airco Thijs - Mode = 236, selector
Airco Woonkamer - Mode = 235, selector
Airco Zolder - Mode = 238, selector
Airco Evy - Temp = 245, setpoint
Airco Thijs - Temp = 244, setpoint
Airco Woonkamer - Temp = 243, setpoint
Airco Zolder - Temp = 246, setpoint

The strange thing is that when I click on Woonkamer - Mode = Heat, the Heat of Thijs turns on.

airco2

just fixed you're last problem but the selector style must wait

Thanks, works great!

The selectorstyle is a nice to have :)

airco3

nice great to see :)!
I will create an issue/feature request for the selector style.