Has anyone had any luck integrating this into a script? I would simply like to change the color with a script but thus far have not figured it out.
Announcement
Collapse
No announcement yet.
script?
Collapse
X
-
Guest
There is a Philips Hue API that uses JSON via HTTP commands.
Here is a link to get you started:
https://developers.meethue.com/develop/get-started-2/
- Likes 1
-
Originally posted by ajachierno View PostHas anyone had any luck integrating this into a script? I would simply like to change the color with a script but thus far have not figured it out.
Code:public object Main(object[] parms) { int colorControlFeatRef = 1839; string color = "001199"; CAPI.CAPIControl[] controls = hs.CAPIGetControlEx(colorControlFeatRef, true); CAPI.CAPIControl ctrl = Array.Find(controls, c => (c.ControlType == Enums.CAPIControlType.Color_Picker)); if (ctrl != null) { ctrl.ControlString = color; if (hs.CAPIControlHandler(ctrl) != CAPI.CAPIControlResponse.All_Success) { hs.WriteLog("Script", string.Format("Problem while trying to set device {0} to {1}", colorControlFeatRef, color)); } } else { hs.WriteLog("Script", string.Format("Can't find color picker control for device {0}", colorControlFeatRef)); } return 0; }
- Likes 1
Comment
-
So will something like this work with this plugin?
[CODESub Main(ByVal Params As Object)
Dim s As Double = hs.DeviceValueEx(1994)
if s =2 then
hs.PluginFunction("JowiHue", "", "SetLightsHueSat", {False, "WestLeft", 255, 1310, 255, 10})
elseif s =3 then
hs.PluginFunction("JowiHue", "", "SetLightsHueSat", {False, "WestLeft", 255, 1965, 255, 10})
][/CODE]
If not are there any examples of script calls for this plugin?
Thanks,
TimFB Page - https://www.facebook.com/pages/Capt-Tim/209398425902188
HSTouch Layouts - https://www.facebook.com/media/set/?...5902188&type=3
Comment
-
Originally posted by fungun View PostSo will something like this work with this plugin?
[CODESub Main(ByVal Params As Object)
Dim s As Double = hs.DeviceValueEx(1994)
if s =2 then
hs.PluginFunction("JowiHue", "", "SetLightsHueSat", {False, "WestLeft", 255, 1310, 255, 10})
elseif s =3 then
hs.PluginFunction("JowiHue", "", "SetLightsHueSat", {False, "WestLeft", 255, 1965, 255, 10})
][/CODE]
If not are there any examples of script calls for this plugin?
Thanks,
Tim
Comment
-
Originally posted by fungun View PostSo will something like this work with this plugin?
[CODESub Main(ByVal Params As Object)
Dim s As Double = hs.DeviceValueEx(1994)
if s =2 then
hs.PluginFunction("JowiHue", "", "SetLightsHueSat", {False, "WestLeft", 255, 1310, 255, 10})
elseif s =3 then
hs.PluginFunction("JowiHue", "", "SetLightsHueSat", {False, "WestLeft", 255, 1965, 255, 10})
][/CODE]
If not are there any examples of script calls for this plugin?
Thanks,
Tim
HS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon
Comment
-
As Jon wrote, you have used scripting calls for the JowiHue plugin. This forum is for the HomeSeer Hue plugin. The help file for JowiHue has all the scripting calls.
Thanks,
TimFB Page - https://www.facebook.com/pages/Capt-Tim/209398425902188
HSTouch Layouts - https://www.facebook.com/media/set/?...5902188&type=3
Comment
-
Originally posted by fungun View PostI do realize that, but was wondering if this plugin has scripting calls similar to the JowiHue plugin. Since I haven't seen any documentation on the HS Hue plugin.
Thanks,
Tim
Here is an animation we still use for Christmas. The driveway path lights and the garage sconces are running a JowiHue animation. It works reliably every year.
HS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon
Comment
-
Yup, I went back to JowiHue.
Thanks,
TimFB Page - https://www.facebook.com/pages/Capt-Tim/209398425902188
HSTouch Layouts - https://www.facebook.com/media/set/?...5902188&type=3
Comment
Comment