Hi Wim, hope all is well.
Ran into a very perplexing problem that took me a couple of days to figure out. I'll try to summarize...
I have a script that I use to control dimmable Homeseer objects/devices via events triggered by central scenes. In order to use the CAPI Control Handler you have to supply the Label of the control object you wish to set a value for. The below snippet works with any dimmable object in my system.
But it throws an error when I try to control a JowiHue light device.
I finally figured out that JowiHue light objects are not labeled like every other dimmable light in HS4, specifically, there's no "Dim" prefix.
Below illustrates this:

Now... I can solve this by manually altering the JowiHue light device and adding the "Dim" prefix to the status control, but I'd have to remember to do this every time I add a new light device. And I suspect if I use the reset the status/graphics option I'd lose the prefix. Or I can maintain two different scripts where the control label is just "(value)%"
But my favorite solution would be if you could add the Dim prefix so JowiHue lights look like every other light
Thoughts?
Ran into a very perplexing problem that took me a couple of days to figure out. I'll try to summarize...
I have a script that I use to control dimmable Homeseer objects/devices via events triggered by central scenes. In order to use the CAPI Control Handler you have to supply the Label of the control object you wish to set a value for. The below snippet works with any dimmable object in my system.
Code:
Imports System.Threading, System.Convert Sub Main(ByVal Parms As Object) Dim ParmArray() As String ParmArray = Parms.ToString.Split(ToChar(",")) Dim DeviceRef As Integer = Integer.Parse(ParmArray(0)) Dim DimValue As Integer = Integer.Parse(ParmArray(1)) '' set the device to the dim value Dim cc As HomeSeerAPI.CAPIControl = hs.CAPIGetSingleControl(DeviceRef, True, "Dim (value)%", False, False) cc.ControlValue = DimValue Dim cr As HomeSeerAPI.CAPIControlResponse = hs.CAPIControlHandler(cc) End Sub
I finally figured out that JowiHue light objects are not labeled like every other dimmable light in HS4, specifically, there's no "Dim" prefix.
Below illustrates this:
Now... I can solve this by manually altering the JowiHue light device and adding the "Dim" prefix to the status control, but I'd have to remember to do this every time I add a new light device. And I suspect if I use the reset the status/graphics option I'd lose the prefix. Or I can maintain two different scripts where the control label is just "(value)%"
But my favorite solution would be if you could add the Dim prefix so JowiHue lights look like every other light

Thoughts?
Comment