Jump to content
C4 Forums | Control4

More advanced programming in composer


PapaSmurf74

Recommended Posts

While composer has the basics covered, it is really lacking in programming conveniences.  

 

First of all, I hate programming in a gui environment.  Give me a text editor and I can get the job done in half the time.

 

Second, I'd like more options for flow control.  currently, my house has over 60 lighting loads.  I have a macro that goes through each one manual to store and restore the light level of each load.  I find this useful for programatically saving scenes.  There has got to be a better way to do this than manually create 60+ set variables commands.

 

Third, how about some basic boolean operations.  If this or that then do this.  For that matter how about an else statement.

 

The composer environment uses lua as a backend language.  Allow us to write lua macros that we can reference in our programming environment.

 

Please understand I'm fairly new to composer.  I may be missing some functionality.  This is the motivation for this post hoping to find a better way of doing things.

Link to comment
Share on other sites


I think you want to look at Advanced Lighting Scenes.

 

I know that you can statically create a scene based on the current light level, but I'm trying to do this dynamically.  Here's an example:  I want to be able to flash all the lights in the house when someone pushes the doorbell, but then I want to return all the light levels to what they were before the flash scene was run.  Here is what my program currently looks like

 

Run macro -> save all light levels

Activiate Scene -> flash lights (this leaves all lights on at the end)

Run macro -> restore all light levels

 

What I'm trying to find out is if there is a better way to save/restore all the light levels other than having a macro with 60 individual instructions that have to be manually programmed.

Link to comment
Share on other sites

The better way it to write a *driver* to do this in DriverWorks (using Lua), then exposing commands to 'save levels' and 'restore levels' on a certain set of lights.

 

While Lua is used in DriverWorks, it's not the base of Director, and programming in ComposerPro is not Lua programming.

 

RyanE

Link to comment
Share on other sites

light level saver.....i like the sound of that as a driver...

 

Working on this one.  All credit to RyanE as I'm using his Light Usage and LED Wizard drivers to work from.  While I'm thinking about it, for those interested in this, let me know which features would be useful.  I'm going for a "Light Wizard" type of swiss army knife driver.  Right now I'm working on the following capabilities:

  • Light level save and recall
  • List advanced scenes and scene members (in lua window)
  • List keypads (in lua window)
  • List lights (in lua window)
  • Flash LEDs
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.