Announcement

Collapse
No announcement yet.

Setting color not working using script

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

    Setting color not working using script

    I'm trying to set the color for a Hue bulb using a script. In Homeseer the device values are correct, but the bulb has still the old color.

    My (simplified) script:

    Code:
    Sub Main(ByVal params as object)
      hs.SetDeviceValueByRef(187, 255,True)
      hs.SetDeviceValueByRef(188, 231,True)
      hs.SetDeviceValueByRef(189, 45568,True)
      hs.SetDeviceValueByRef(190, 251,True)
    End Sub
    Any idea?

    #2
    The plugin does not repond to direct devicevalue changes. You can do the same with one script command:

    hs.PluginFunction("JowiHue", "", "SetLightsHueSat", {False, "Name of single bulb", 231, 45568, 251, 0}) for a single bulb

    or

    hs.PluginFunction("JowiHue", "", "SetLightsHueSat", {True, "Name of group", 231, 45568, 251, 0}) for a group

    You can find this in the documentation for the plugn. This document is found in the docs directory inside the installation directory of Homeseer.

    If you want to control the devices directly with scripting I have to change that in the plugin for a future release?

    Wim
    -- Wim

    Plugins: JowiHue, RFXCOM, Sonos4, Jon00's Perfmon and Network monitor, EasyTrigger, Pushover 3P, rnbWeather, BLBackup, AK SmartDevice, Pushover, PHLocation, Zwave, GCalseer, SDJ-Health, Device History, BLGData

    1210 devices/features ---- 392 events ----- 40 scripts

    Comment


      #3
      Cool! It works!

      Didn't know about that documentation.

      Thanks!

      Erwin

      Comment


        #4
        Glad it helped Erwin

        Wim
        -- Wim

        Plugins: JowiHue, RFXCOM, Sonos4, Jon00's Perfmon and Network monitor, EasyTrigger, Pushover 3P, rnbWeather, BLBackup, AK SmartDevice, Pushover, PHLocation, Zwave, GCalseer, SDJ-Health, Device History, BLGData

        1210 devices/features ---- 392 events ----- 40 scripts

        Comment


          #5
          Another one: I'm missing a feature to turn on/off a Hue by script. I can work around that one by creating events for on/off and run a event from my script.

          Maybe it's better to create "Device control" support for scripts.

          Or am I still missing something?

          Thanks!

          Erwin

          Comment


            #6
            Erwin,

            I gave it some thought, but I think direct device control through scriptng might bring a lot of issues. Main issue is that when you have set a longer transition time, the devices is following the changes on the bridge. If the plugin would notice the device changing and set the lights accordingly. So I am afraid this would stop transitions.
            Instead I will put an off command in the scripting interface, this way enabling this missed function.

            Wim
            -- Wim

            Plugins: JowiHue, RFXCOM, Sonos4, Jon00's Perfmon and Network monitor, EasyTrigger, Pushover 3P, rnbWeather, BLBackup, AK SmartDevice, Pushover, PHLocation, Zwave, GCalseer, SDJ-Health, Device History, BLGData

            1210 devices/features ---- 392 events ----- 40 scripts

            Comment


              #7
              Hi Wim,

              I don't fully understand the issue, however the Off command should be enough. The normal pluginfunction is enough to turn the lights on.

              Thanks!

              Erwin

              Comment

              Working...
              X