The last part of highlighting the switch is where I am struggling the most. My current plan is to update the switch device via json, so that the "HaveTimeout" field is set to true instead of false. I believe that this would turn the switch red, which is ideal, but any other suggestions are welcome.
The info about the device is shown below
Code: Select all
curl -s 'http://192.168.88.155:8080/json.htm?type=command¶m=getdevices&rid=45'
{
"ActTime" : 1692389658,
"AstrTwilightEnd" : "21:56",
"AstrTwilightStart" : "05:16",
"CivTwilightEnd" : "20:48",
"CivTwilightStart" : "06:24",
"DayLength" : "13:30",
"NautTwilightEnd" : "21:21",
"NautTwilightStart" : "05:51",
"ServerTime" : "2023-08-18 21:14:18",
"SunAtSouth" : "13:36",
"Sunrise" : "06:51",
"Sunset" : "20:21",
"app_version" : "2023.2",
"result" :
[
{
"AddjMulti" : 1.0,
"AddjMulti2" : 1.0,
"AddjValue" : 0.0,
"AddjValue2" : 0.0,
"BatteryLevel" : 255,
"CustomImage" : 1,
"Data" : "Off",
"Description" : "",
"DimmerType" : "none",
"Favorite" : 0,
"HardwareDisabled" : false,
"HardwareID" : 8,
"HardwareName" : "Pool",
"HardwareType" : "Dummy (Does nothing, use for virtual switches only)",
"HardwareTypeVal" : 15,
"HaveDimmer" : true,
"HaveGroupCmd" : true,
"HaveTimeout" : false,
"ID" : "0001407D",
"Image" : "WallSocket",
"IsSubDevice" : false,
"LastUpdate" : "2023-08-18 19:22:04",
"Level" : 0,
"LevelInt" : 0,
"MaxDimLevel" : 100,
"Name" : "test switch",
"Notifications" : "false",
"PlanID" : "0",
"PlanIDs" :
[
0
],
"Protected" : false,
"ShowNotifications" : true,
"SignalLevel" : "-",
"Status" : "Off",
"StrParam1" : "",
"StrParam2" : "",
"SubType" : "Switch",
"SwitchType" : "On/Off",
"SwitchTypeVal" : 0,
"Timers" : "false",
"Type" : "Light/Switch",
"TypeImg" : "lightbulb",
"Unit" : 1,
"Used" : 1,
"UsedByCamera" : false,
"XOffset" : "0",
"YOffset" : "0",
"idx" : "45"
}
],
"status" : "OK",
"title" : "Devices"
}