Looking for some feedback on upcoming CQC stuff

Dean Roddey

Senior Member
So I'm now in the 'end game' for the next release, and it's been a real brain fryer since it's making some really fundamental changes. I just wanted to describe some of this new stuff and get some feedback before it's too late to make changes 'easily', particularly since some of these changes are driven by comments from folks here.

Not for Programmers
One common complaint we've had is that there were two levels of configuring logic in CQC. To cause things to happen in CQC you create an 'action', which currently is just a flat list of steps, no logic. Any of those steps can be an invocation of one of our CML macros, but that's a programming language and more than many folks want to bite off. To deal with this, we've introduced logic at the action level. The action level is also the level at which are you working via a prompted dialog box, as apposed to CML which is a free form text language. So now you can go do logic via a prompted dialog.

TrigEv_SpeakCC2.jpg


It won't allow you to match a powerful language like CML, but it goes a long way towards preventing a need for CML. In the example above an action is shown that is the action for a triggered event that speaks the day of the week and the current weather conditions (from the weather channel) when motion is detected in the Kitchen, as long as it's not suppressed by setting a global variable value. It also is using a count down timer in the timers driver so that it will only speak again after 15 minutes of no motion.

You can see that it provides If/Else type logic decisions, comments, local and global variables for storing values and manipulating them. The other big difference over the existing system is that it provides lots of helpers for entering values. There was some of this before but it's much expanded now, so that you actually don't have do much typing. If you are writing to an IR device, you can select from a list of all the available IR commands. The parameter fields at the bottom are where you enter the values for the selected command, and the litttle button beside them allows you to do a prompted set of the value and the popup menu on the entry fields allow you to insert various types of info.



Popup Templates
Another big thing in this release is the ability to do 'modal popup interfaces', basically similar to dialog boxes in Windows, but with all the full graphical power of our interface system. This can be used in many ways from popping up a confirmation ("Are you sure you want to turn on the fireplace with your head in it?") to popping up a radar weather image or a CD selection window.

PopupExp3.jpg


It's a very flexible system in that the popup can set global variables that the calling (underlying, invoking) interface can see and react to. That's how you can do a confirmation popup, by just having it set a particular global variable to Yes or No and reacting to it (using the conditional logic we introduced in the previous section) to do something or not. Or a CD selection poup and store the selected title info (a title cookie in our parlance) which can be used when it's closed to play that title.

PopupExp8.jpg


You can see from the example above that you have access to all the graphical power of our interface system to do slick popup looks. And you can combine it with the new action system in nice ways. In the 'Are you sure' popup above, that is a generic template in that the title text and the question text are passed into ot, so it can be used in many situations. Here's an example of invoking it:

PopupExp7.jpg


It's setting up two global variables to indicate the title and question text (all interfaces in a given viewer window share gobal variables) and then invoking the popup. On return, it cleans up the two globals, then checks the value of the variable that the popup stored either Yes or No in and if it was Yes it does an exit command to exit the current template.

A template can have an 'OnLoad' action and there's one set on this popup template that looks for those two variables and loads them into the title and question text 'widgets'. Anyway, lot's of flexibility, and the interface is really quite programmable, allowing you to create very different looks and flows of control.


Triggered Events
Triggered events are what you configure in CQC to react to changes in the system state by running an action. It's composed of two parts, one being the filters that decide whether the action should be run or not and then the action to run. We previously had a 'filter language' that again was a little more obscure than some folks would have liked. So that's now been replaced by a set of four graphically configured filters. In the vast bulk of cases that's more than enough to effectively guarantee that the event will only run when appropriate, though of course the new action logic can be used to further make decisions as to what to do.

TrigEv_SpeakCC1.jpg


This is the filter set for the first example given above for the event that speaks the weather conditions on motion. I'm using our little device simulator for these examples (which simulates a small house's worth of faux devices) so that's what the DevSim you see is referring to. It's see if the incoming event is a change in in the KitchenMotion field, and that the current hour is between 8 and 9, and that the countdown timer channel 1 has zeroed out. Those are combined with All True logic (AND) so it's run if all of them are true.


There are other big goodies as well, in the media area, but I'll touch on them in a subsequent post. I figure these are the ones that most address previously mentioned shortcomings in CQC from folks here. Does any of that make sense above, or address issues that you might have had with CQC so far? If it doesn't make sense, just ask or if you have any comments let me know what you think.
 
This looks pretty cool. Those two examples are great for understanding how it works! Is there a list of fields and filters someplace so we can visualize some more examples? Some typical things I would want to do might include:

If a thermostat setpoint changes confirm the new setting with a voice announcement.

If the wind speed from my weather station is higher than 15 mph AND is higher than the previous high for the day then make a wind warning announcement.

If the doorbell rings, display the appropriate door camera on all touch screens and make a page through the phone system announcing that someone is at the door. Then speak a greeting at the door for the visitor.

At the top of each hour announce the time and date and an update of how long each furnace has run so far that day and how many times the well pump has cycled that day.

At the bottom of each hour announce any reminders for the day and an updated weather forecast for the week.

If the mail comes, speak a greeting to the mailman through the mailbox speaker then page through the phone system to announce the mail has arrived and add a "mail in mailbox" reminder to the hourly reminder queue until the mail trigger is reset.
 
jeffx said:
How about ... control of Multizone audio through JRiver Media Player?
I ask merely for curiousity reasons, not intended to attack the question through any implied or stated bias ;)

Do you mean to use JRMC as a renderer, instead of just zoomplayer? Or something more?
 
Thanks for this information Dean! It really helps to see the new changes in 1.7. (As that thread is pretty ridiculously long, it is hard to see what is new!!)

in response to IVB's comment:
The ability to use J River as a renderer (instead of Zoom player) is a big issue with me as well. It is probably the single reason I have not gone with CQC yet. Nothing can beat J River for audio playback and the formats it supports.

However, I also know that this was not the reason Dean put this thread up! So take that with a grain of salt!!

Thanks so much for this information Dean!
 
Is there a list of fields and filters someplace so we can visualize some more examples? Some typical things I would want to do might include:

The list of fields is driven by what device drivers you've loaded. All fields are 'device fields', i.e. they are some named attribute of a device that the device driver controlling it makes available for read and/or write.

The current list of filters (though others could be added) are:
  • Arbitrary - Just let's you compare any field of the incoming event to see if it's equal to some value. CQC's events are in xAP format, so an event field is something like "/xap-header/source", representing the 'path' to the particular event field within the xAP style event data.
  • Field Value Equals - Checks to see if a device field is equal to some value (used in the example above to see if the countdown timer channel is zero.
  • Is Device Ready - Checks to see if a particular device driver is online and ready to talk to.
  • Is Field Change - Checks if the incoming event is one that's reporting a change in a device field
  • Is Field Change For - Same as above but also sees if it's for a specific field
  • Is From Source - Sees if the 'source' field of the event is a paritcular device or particular field.
  • Is New Fld Value For - Basically like #5 but also then checks to see if the value is a equal to a particular value.
  • Is in Time Range - Used in the example above to limit the event to between a lower hour and up to but not including an upper hour
  • Is Night - Use to limit the event to only at night or only during the day (based on local sunrise/sunset times.)
  • Is Of Class - Checks the xAP style event class an sees if it is equal to a particular value
  • Is User Action - Sees if the event is a user action event (there are field change events and user action events current, and the later is sent out by devices when a button is pressed and that kind of thing, i.e. non-field related changes.) User actions or CML macros can also send these out to trigger something.
  • Is User Action For - Like above but also checks to see if it is a user action from a specific source.
I should also point out that the action system is even more often used in response to a direct user request, i.e. pressing a button on an interface, than it is in setting up triggered or scheduled events. But since strong support for reactive logic is something that has been deemed lacking in CQC so far, I've concentrated on that in the examples here.

Of those lists of things that you mention, currently all of them could be done except automatically changing the user interface in response to an event. I've not wired the event system into the interface viewer yet. There are a lot of potential gotchas there and I'm not going to be able to get that into the next drop. But of course you can have an indicator on the interface show or start blinking or change appearance in response to something, letting you know that you should press the button to load the security camera page.
 
The problem with supporting J.River as a player is that they have set the bar so high to support it that it's hard to justify doing. Because they selected UPnP as their control protocol, they require a huge committment (to implement UPnP) before being able to control them. We just haven't had the time to even consider taking on that huge chunk of work so far.
 
IVB said:
jeffx said:
How about ... control of Multizone audio through JRiver Media Player?
I ask merely for curiousity reasons, not intended to attack the question through any implied or stated bias ;)

Do you mean to use JRMC as a renderer, instead of just zoomplayer? Or something more?
As a way to control multi-zone audio through a PC soundcard (like the m-audio cards). I'm not too familiar with Zoomplayer--with this do the same thing?

The reason I mention this is I am helping someone in the planing stages of automating a new house. I really love everything else about CQC, but I can't advise him to go with CQC without Insteon and PC-Card mutlizone audio support. VR is also on his requirement list, but I could convince him to live without VR.
 
If you are talking about whole home automation, then you probably want to combine CQC with something like an Elk M1 to handle the security and sensors and such, which also gets you Insteon support (or UPB also which I would think would be a better solution for a whole house system personally.)

PC-card multi-channel support is available via Zoom Player which we do suport, and plenty of our current customers are using that configuration.
 
Dean,

Thanks for sharing but I think that you only scratched the surface with explaining all the new features in 1.7. How about the new text editor and some of the additions to the CML language ect.

To the rest,
CQC has come a long way really fast. Dean has become a great listener and has been implementing everything he can as fast as he can. Even though he may not have insteon support now and may not have time to fully implement JRMC he is offering opening discussions about the final touches on the new event action system. So take a good hard look at it and offer up some suggestions to make it better or easier to use. Once he releases it there may not be room for changes due to backwards compatibility and issues like that. So speak now or forever hold your peace.

The only thing that concerns me Dean is the limitation of the popups not being capable of being above the Web widget and possibly other widgets in the future. I know you have done your best but it is a concern.

Also, I would like to still see a drop down list widget.
 
Dean Roddey said:
If you are talking about whole home automation, then you probably want to combine CQC with something like an Elk M1 to handle the security and sensors and such, which also gets you Insteon support (or UPB also which I would think would be a better solution for a whole house system personally.)

PC-card multi-channel support is available via Zoom Player which we do suport, and plenty of our current customers are using that configuration.
Dean, those may be the final bits of information I need to discuss CQC with him, thanks! He's already purchased the M-Audio Delta 1010 and the Elk M1G Insteon enabled kit with the ethernet interface. I'll have to read up on Zoomplayer tonight after hitting the weedy areas of my property with Roundup.
 
Windows is just so weak in the area of alpha blending of layered interfaces. What Squintz is talking about is kind of complicated, but the short version is:

In order to allow you to layer fancy transparent/translucent popups, that requires support for using alpha channel based images in the popups, layered over the background image. Windows is very weak in this area. They have 'layered windows' that come in two flavors. One type can contain child windows but cannot do per-pixel blending, so it's out for this application. The other type cannot contain child windows but can do per-pixel blending, and it requires completely restructuring your application away from the traditional event driven painting that Windows based programs use.

For us, I was able to really just avoid the situation altogether mostly because of the fact that all but one of our interface 'widgets' are purely graphical objects, not child windows. So instead of using a separate layered window and all the complications that involves, I just create a new template data structure (which represents an interface template and it's child widgtes) and just temporarily overlay it over the background.

But, in the one case where there is a real window type widget, which is the case for a web browser widget, that window will always show up over anything drawn into the main window. So if you had a browser widget in the main template, and you do a popup, it cannot show up on top of the browser widget. You can have a web browser widget in a popup itself, since in that case you do want it to show up on top of the popup and everything else under the popup.

This could have been dealt with by using the child-window capable layered window, but then we've have lost the ability to do the slick translucent overlayed popups, which would have been a complete waste of space in my opinion. So Windows is just so weak in this area that there's no good solution, and I picked the compromise that offered the most flexbility and performance.

One thing I will do to ameliorate this issue is to do an 'HTTP Image' widget, which you can just point at a JPEG or PNG on the web and give it an refresh time, and it'll show that image. This is a quite common use for the web browser widget and would remove this layering limitation in those cases since the web browser widget wouldn't be needed for those.

Oh well, what can you do?
 
FYI: I do whole-house audio/video via CQC, using multiple instances of ZP as the renderer, with each instance of ZP being typed to a given M-Audio Delta 410 output pair. From there they go to the Xantech ZPR68, which is also controlled by CQC over RS232.

Hence i can pretty easily do whole-house audio with multizone/multisource in a pretty simple-to-use fashion. For a list of screenshots to give you a handle on usability, check the site in my sig.
 
Back
Top