Announcement

Collapse
No announcement yet.

Random colour?

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

  • fluffypony
    replied
    For anyone that comes across this in future, this is the script I wrote to handle this:


    Code:
    Sub Main(ByVal Parm As Object)
    Dim staticRandomGenerator As New System.Random
    
    Dim i As Integer = staticRandomGenerator.Next(0, 65535)
    
    If hs.PluginFunction("JowiHue", "", "SetLightsHueSat", {True, "GROUP NAME", Nothing, i, Nothing, 100}) Then
    	hs.WriteLog("HueScript", "GROUP colour successfully changed")
    Else
    	hs.WriteLog("HueScript", "GROUP colour failed to change, check log for details")
    End If
    
    End Sub

    Leave a comment:


  • fluffypony
    replied
    I really should try reading the documentation more often Thanks for pointing me in that direction, I'll take a look at it later today!

    Leave a comment:


  • w.vuyk
    replied
    Fluffypony,

    I am just jumping in shortly so I do not have time to work out a real sample. But check the docs of the JowiHue plugin.It should be in the docs directory at your homeseer installation. You will find a PDF wit all possibilities of the plugin, including scripting (vb.net scripting).
    This might put you on track?

    Eventually I can get you a sample to randomize the hue setting later.

    Thanks

    Wim

    Leave a comment:


  • fluffypony
    started a topic Random colour?

    Random colour?

    Is it possible to set a light / group to a random colour? I currently use a python script for this, and I'd like to move the functionality to HS3 + JowiHue. My python script just sets the hue for the group to a random number between 0 and 65535, so doesn't have to be fancier than that
Working...
X