pstuart Posted October 26, 2012 Share Posted October 26, 2012 Anyone done one? I would like to get a random number for a delay and do a fun halloween mode, that randomly flickers lights, plays random sounds, etc. Is math.random() even a supported command in the lua interpreter on Control4? Link to comment Share on other sites More sharing options...
cdnDesigner Posted October 26, 2012 Share Posted October 26, 2012 Yup.Command:a = math.random()print(a)Output:0.862239448225350.209601123081150.77965636158330.843653675954470.996795556505020.999694814905240.611499374370560.392437513351850.266212958159120.297280800805690.840144047364730.0237434003723260.375865962706380.0926236762596510.677205725272380.0562150944547870.00878933072908720.918790246284370.275887325663010.272896511734370.58790856654561 Link to comment Share on other sites More sharing options...
pstuart Posted October 26, 2012 Author Share Posted October 26, 2012 Cool, now do you have a driver written already? Or do I have a weekend project on my hands? Link to comment Share on other sites More sharing options...
cdnDesigner Posted October 27, 2012 Share Posted October 27, 2012 It does sound like fun, but no I don't have one. Link to comment Share on other sites More sharing options...
seth_j Posted October 29, 2012 Share Posted October 29, 2012 I'll write one today.. Link to comment Share on other sites More sharing options...
pstuart Posted October 29, 2012 Author Share Posted October 29, 2012 Awesome... I didn't have time this weekend but was going to try to tackle it tonight. Seth, you rock! Link to comment Share on other sites More sharing options...
seth_j Posted October 29, 2012 Share Posted October 29, 2012 I already have one written just have to re-purpose it. Link to comment Share on other sites More sharing options...
seth_j Posted October 29, 2012 Share Posted October 29, 2012 I'm having a lot of fun with this one! My previous driver wasn't up to what I wanted the end result to be. Only one setting: Creepiness Got some testing to do and then I'll post it. Link to comment Share on other sites More sharing options...
CFUG Posted October 29, 2012 Share Posted October 29, 2012 I get my kicks with CA motions and announcements. Link to comment Share on other sites More sharing options...
Cyknight Posted October 29, 2012 Share Posted October 29, 2012 Only one setting: Creepiness Halloween Special! Link to comment Share on other sites More sharing options...
seth_j Posted October 29, 2012 Share Posted October 29, 2012 Okay. All done I think -- been a crazy busy day it turns out. There are a couple of variables setup on the driver.. Pretty easy if you know your way around programming. I made a short video explaining how to use it.Check it out at http://www.luadrivers.comNote: you might have to right-click -> Save As... on the driver link until the mime types get updated on the web host. Link to comment Share on other sites More sharing options...
pstuart Posted October 29, 2012 Author Share Posted October 29, 2012 Unbelievable!!!!!!!!!!! You sir, will be getting drinks on me at CES or CEDIA next year...Setting this up now. Link to comment Share on other sites More sharing options...
CFUG Posted October 29, 2012 Share Posted October 29, 2012 My bulbs are going to pop on this one... Link to comment Share on other sites More sharing options...
seth_j Posted October 30, 2012 Share Posted October 30, 2012 My bulbs are going to pop on this one... Link to comment Share on other sites More sharing options...
CFUG Posted October 30, 2012 Share Posted October 30, 2012 Darn, some of the lights I could use this on are switch-controlled. Any chance of a mod that just randomizes the time between on & off?Maybe it doesn't matter though... Link to comment Share on other sites More sharing options...
Bud Posted October 30, 2012 Share Posted October 30, 2012 Looks very cool. Could use for Halloween for all lights on front of house inside and out. Another question occurred to me I as was watching your video. I am planning on having scary music and sounds pumped to my front porch speakers through C4/Rhapsody (eg Halloween Music Collection from Midnight Syndicate.) Anyway maybe getting a little off topic but would there be any way to incorporate audio signals to trigger changes to random devices or levels. Could be scary sounds/events or even to beat of music? Link to comment Share on other sites More sharing options...
seth_j Posted October 30, 2012 Share Posted October 30, 2012 Darn, some of the lights I could use this on are switch-controlled. Any chance of a mod that just randomizes the time between on & off?Maybe it doesn't matter though...Use the medium variable and test for true or false.or you could test if the number is > or < 50 and go from there.. many options. Link to comment Share on other sites More sharing options...
seth_j Posted October 30, 2012 Share Posted October 30, 2012 Looks very cool. Could use for Halloween for all lights on front of house inside and out. Another question occurred to me I as was watching your video. I am planning on having scary music and sounds pumped to my front porch speakers through C4/Rhapsody (eg Halloween Music Collection from Midnight Syndicate.) Anyway maybe getting a little off topic but would there be any way to incorporate audio signals to trigger changes to random devices or levels. Could be scary sounds/events or even to beat of music?No way at the moment.. You'd need some fancy 3rd party hardware to detect these things. You can't natively do them in Control4. Cool idea though! Link to comment Share on other sites More sharing options...
Godzilla Posted October 30, 2012 Share Posted October 30, 2012 very very cool Seth..............thanks a bunch Link to comment Share on other sites More sharing options...
CFUG Posted October 30, 2012 Share Posted October 30, 2012 Darn' date=' some of the lights I could use this on are switch-controlled. Any chance of a mod that just randomizes the time between on & off?Maybe it doesn't matter though...[/quote']Use the medium variable and test for true or false.or you could test if the number is > or < 50 and go from there.. many options."Crazy" doesn't hit on whatever the threshold is for ON with any decent frequency. A random T interval between 0 and 100 "crazy" option would rock. Link to comment Share on other sites More sharing options...
CFUG Posted October 30, 2012 Share Posted October 30, 2012 I guess I'll do what you suggested and just test for >50 and <50. Link to comment Share on other sites More sharing options...
Godzilla Posted October 30, 2012 Share Posted October 30, 2012 works great............have it on 8 loads now and is working like a champmaybe will try crazy random...........get the wife in strobe mode.................lol Link to comment Share on other sites More sharing options...
CFUG Posted October 30, 2012 Share Posted October 30, 2012 I'm going back to my old standby with switches- put the ON command and an OFF command on the same execution hierarchy. Totally unpredictable lighting. Link to comment Share on other sites More sharing options...
Letran Posted November 1, 2012 Share Posted November 1, 2012 Darn' date=' some of the lights I could use this on are switch-controlled. Any chance of a mod that just randomizes the time between on & off?Maybe it doesn't matter though...[/quote']Use the medium variable and test for true or false.or you could test if the number is > or < 50 and go from there.. many options.That is great Seth. Thank you.Is it possible to have a c4i file of this driver available in the File Library.I'm sure a lot of other guys will also be interested in the driver.Cheers, Happy Halloween Link to comment Share on other sites More sharing options...
pstuart Posted November 1, 2012 Author Share Posted November 1, 2012 This was a huge hit with the kids and parents last night.Had all my outside lights, and all visible from the outside interior lights on this and the whole house was flickering...Also, played random announcements, like creeky stairs, thunder, chains rattling, etc...After about 3 hours, my wife finally had enough, and asked me to turn it off... So I did.Again, thanks a ton... I'm pretty sure I sold at least a dozen control4 / HA systems tonight based on all the parents asking me how I did it No problems with the zigbee network on a 1000, fyi. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.