Jump to content
C4 Forums | Control4



Recommended Posts

I think the most glaring omission within the Composer programming model is the lack of comments. Remember, these installed systems are meant to be in place for decades! I have some fairly complex programming involving timers (non-linear flow), boolean logic, and obviously a large number of input devices. Ten years from now when my dealer is out of business and I want to add some new gadget, it will be very difficult for a new dealer else to jump in and fix it. Good comments are among the most important aspects of well written code that will require long-term maintenance. I would think C4 would establish a Best Practices model and include commented code to avoid the bad reputation that will surely come in 10 years when there is a large installed base that is a nightmare to maintain!

It could be very simple, perhaps under Program Control add a comment 'command'.

Oh, and can't we get some better boolean logic. Simple left-to-right AND / OR / NOT (and of course ELSE) would make programming sooooo much nicer. For example, I want to execute some code if any door is open or any door is unlocked, otherwise I want to execute some other code. Not easy (or maintainable) with the current system when I have 20 or more monitored doors.

Link to comment
Share on other sites


You can use a string variable to make a "comment". This is what I've been doing for a while, as I too have some pretty complex stuff running behind the scenes. But you are correct, an IF/THEN/ELSE would be nice. For your comments simply create a string variable named "comment" and put whatever text you would like and add it to your lines, you'll have to keep going back and forth though to change the comment text.

Link to comment
Share on other sites

You can fake some boolean ops with math - use addition for OR.

(this or that or the other)

foo = 0

If door1 unlocked increment foo

If door2 unlocked increment foo


if foo != 0 then blah blah blah

X AND Y is just !(!X OR !Y), so make up an OR with the REVERSE of the condition you want to check. If foo==0 at the end, then do it.

So, yeah, real boolean logic would be nice.

Link to comment
Share on other sites


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

  • Create New...