Announcement

Collapse
No announcement yet.

Set light to preset from script

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Set light to preset from script

    I have looked through the manual but can find a way to set lights to a preset from a script. I know I can just match the hut and saturation of a preset but I am trying to set a light to a preset based on the status text of a virtual device. I hope there is a way if not it would be a nice future addition.

  • #2
    lsvortex,

    You are right, there is no scripting possible yet for setting a preset. Will add it in a future release. But you can use presets in events, maybe this is a work around for now for you? Use JowiHue actions, set lights for that.

    Thanks,

    Wim
    -- Wim

    Plugins:RFXCOM, HSTouch Server, Squeezebox, BLGData, Restart, Jon00's Perfmon and Network monitor, WeatherXML, BLBackup, TenScripting, BC4, Pushover, PHLocation, JowiHue, Zwave, Sonos
    650 devices ---- 336 events ----- 40 scripts

    Comment


    • #3
      Originally posted by w.vuyk View Post
      lsvortex,

      You are right, there is no scripting possible yet for setting a preset. Will add it in a future release. But you can use presets in events, maybe this is a work around for now for you? Use JowiHue actions, set lights for that.

      Thanks,

      Wim
      Wim,

      That is what I am doing, using events. But I've not tried to do more complex things because it would mean a lot of events. If you implement this, I will use it.

      Bill

      Comment


      • #4
        All,

        With the new beta, 2.0.1.10, there are two new script commands added for presets. One to activate a preset and another one to set a random preset.
        Here is how to use it; will be added to the documentation later:

        SetPreset
        Code:
        Dim test As Boolean = hs.PluginFunction("JowiHue", "", "SetPreset", { "Gold", "TableLight;KithchenLight",""})
        SetPresetRandom
        Code:
        Dim test As Boolean = hs.PluginFunction("JowiHue", "", "SetPresetRandom", {"TableLight;KithchenLight","Colorfull",""})
        -- Wim

        Plugins:RFXCOM, HSTouch Server, Squeezebox, BLGData, Restart, Jon00's Perfmon and Network monitor, WeatherXML, BLBackup, TenScripting, BC4, Pushover, PHLocation, JowiHue, Zwave, Sonos
        650 devices ---- 336 events ----- 40 scripts

        Comment

        Working...
        X