Announcement

Collapse
No announcement yet.

Looking for Event Example(s) of Randomized Lighting

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

  • ts1234
    replied
    ksum...just an fyi ...BLOccupied appears to do exactly what I wanted thanks.

    Leave a comment:


  • ts1234
    replied
    ksum - Thanks...sounds pretty much like exactly what I'm looking for and will certainly load it...

    123qweasd - I've done my best to avoid things that need scripting but it's become clear I need to start. Thanks for the info above. It's a great base example!

    Leave a comment:


  • 123qweasd
    replied
    Here's another way to do it:

    Create a virtual device and trigger a recurring event every second or so that generates random numbers within your desired dim range
    (This can be duplicated to multiple VD and reused for various ranges/use cases)

    Code:
    Sub Main(ByVal Parms As Object)
    
    ' Initialize the random-number generator. The Rnd function returns a random number. The number is always less than 1 but greater or equal to 0.
    Randomize()
    
    Dim Z As Integer = Int((130 * Rnd()) + 1) ' Generate random value between 1 and 130.
    
    ' Dim Z As Integer = Int((101 * Rnd()) ) ' Generate random value between 0 and 100.
    
    
    hs.SetDeviceValueByRef(4466, Z, True)
    
    'hs.writelog ("Random","Value = " & Z )
    
    End Sub
    Once completed, simply use Easytrigger to fire random events, add schedule conditions and use your virtual devices to define ON/OFF and/or DIM (control a device using an expression; replacement variable; or another device value); just keep every action at least 1sec apart so that your random VDs changes values.

    Here I use a random number between 1 and 130, where 1-100 is a dim level and any value over 100 turns the light Off, you can obviously change the VD range and random triggers to increase/decrease the ON/OFF periods)


    Click image for larger version

Name:	efwewe.PNG
Views:	128
Size:	207.2 KB
ID:	1432637

    Spud provided another scheduling approach here, you can combine it with the random values:
    https://forums.homeseer.com/forum/ul...175#post864175

    Also keep in mind that Easytrigger "group" concept is intended to replicate the same action to multiple devices so it wouldn't make sense to use a "group" to trigger different individual actions...


    Another feature I tend to forget:
    "Security random offset", which can be enabled/disabled via simple scripting.

    https://help.homeseer.com/help/HS3/static/#.general
    https://help.homeseer.com/help/HS3/s...etsecuritymode


    hope this helps,


    Leave a comment:


  • ksum
    replied
    There is a free plugin you may want to look at: The BLOccupied Plugin for HS3 will allow you to randomly simulate house occupancy by turning on lights and appliances.

    Leave a comment:


  • ts1234
    replied
    Eman - Thanks! Will give that a go soon!

    Uncle Michael - I keep trying to avoid that, but will likely have break down and do it since things like creating 5 different events to accomplish something is just too confusing to come back to a year later and work on when something changes. Thanks! I'll try to be nice and not soapbox my desire too much for more switches like else if/for/while in events .

    Leave a comment:


  • Uncle Michael
    replied
    I'm guessing you do not want to use a script. That would allow you to do it with one event (and one script), but it would take some effort - and probably considerable trial and error.

    Leave a comment:


  • Eman
    replied
    Without obligation test SceneMaster : https://shop.homeseer.com/products/c...lug-in-for-hs3and see what you come up with.
    • I also have Easy trigger but that one eats lights for dinner

    Eman

    Leave a comment:


  • ts1234
    started a topic Looking for Event Example(s) of Randomized Lighting

    Looking for Event Example(s) of Randomized Lighting

    What I want...and at least on an initial search I didn't find a good one...

    Randomly turn on and off individual lights in a group of lights to varying dim levels. I do have Easytrigger for defining groups if the right approach. If there were 10 lights in that group, a random number of them would be on at the same time, but all for different lengths of time and dim levels. Is there anyway for this to work in a single event (much preferred)?
Working...
X