Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Just read the CQC Driver Dev Docs!
Just taking a breath!

I started of the other day with the idea that...If I want to become a pro installer of CQC then I better buckle down and really learn this software inside and out.

So I figured I would go back to my roots. My first Home Automation software was HS which required me to learn Visual Basic Scripting. I have always had an interest and programming so I have years of self taught experience. But VBScript was not one of my languages. Thankfully, Electron from wrote a tutorial on "How To Parse a Web Page using VBScript. This was a really simple example and an easy to follow tutorial. So now that I have droped HS and have been living by CQC I figured I would go back to my roots and convert Electrons VBScript tutorial into an Equivalent CQC CML tutorial while teaching my self how to use CML.

What I have learned in a nutshell is that CML is a totally differnt beast. It is nice for its purpose but the syntax and naming conventions are way differnt than VBScript or C# or Java. But once I buckled down and started looking at the language reference for CML and started finding the equivalent objects and methods it all started to make sense.

I feel now that I at least have a basic grasp of the CML Syntax. The naming conventions are still far from stuck in my memory. As some of you may have saw, I wrote a macro and after posting it on the forums Dean had told me there is a better way to do the macro. I must say that it kinda discouraged me for the rest of the day.

This morning I woke up and decided that I was calling out of work. I took sick leave so that I could stay home and change the thermostat on my wifes car. It kept overheating. So that fix only took a few minutes which left me with the rest of the day(minus the time for scream kids) to think about my next move. So I decided to RTFM(Read the Fabulous Manual). I totally skiped over the PDL part of the manual. I read all of the introduction stuff and all of the CML Driver stuff. I actually think that I have a good understanding of how CQC works now. I guess I better mention that this is the third time I read the manual. But this time a understood it and did not fall asleep.

So my next step is to do two things. First I am going to tear apart the NetCallerID driver by Andy Swingler (originally by Rohan Hamer) and I am going to go back to referencing the CML Class Reference Guide to see why the are using certain classes and what those classes are for. Once I am done that I should have a good grasp on how to write a Serial Driver and I will probably jump back to that How to Parse a Web Page tutorial so that I can help others out who want to learn amd hopefully by then I will have a clue as to what Dean was talking about in my other thread. Then from there I might try writing a Driver for a BetaBrite which is a LED Marquee Sign. They are a little pricey ($150) but maybe by next payday I can afford one.

Hope I did not bore anyone too much. I just needed to share what I did today with someone and my wife just is not interested Smile
Actually, for a write only driver for those Marquees, you might be able to get away with PDL for that. Not discouraging you from CML by any means, just saying that it probably could be done in PDL if you really want to use one of those guys and would like to get a driver done quickly for it.
Dean Roddey
Explorans limites defectum
I have a sort of CML framework that I gave to someone else (can't remember who) that might make it easier.

It was a driver that I stripped all the guts out of and just left the structure.

It has some comments in it, to help understand what each section does.

If you want it, PM me with your email address.


Software & Hardware Solutions
Makers of the Translink C-Bus Gateway
for the Apple iPad, iPhone and iPod Touch.
Heh..ya, I made a CML template too after I made my first driver. It compiles, has all the required functions...just doesn't do anything. Maybe someone can make that publically available somewhere...on this site...? Wink

I kinda learned CML the other way. I took a driver that did something (in this case, it was a driver for a receiver very similar to mine) and looked at what the code was doing....THEN I'd look in the manuals for some help. You see, I really had a hard time understanding anything from the manuals because there was no example code...I reeeeeally need examples. I needed to SEE where the data was actually being sent to the device, and where the hex control codes were formed. Of course, as a result of doing it this way, I'd often end up emailing Dean and asking him how to do something, or why something didn't work...and he'd very politely and patiently repeatedly point me to where it is in the online docs. :roll:

I have a very strong C++ background, though, and some things are fairly similar...the hardest part for me was just learning how and when functions were called and what they were supposed to do.

Anyway, I encourage the forming of a CML template file, fully compilable and commented, with all required base-class functions and also the "BoolFldChanged, etc" functions. I'll help in that endeavor if I can.
I'll put a dummy driver in the next release, which actually does do a little, e.g. have a couple members that it treats like the 'device', so that it can register a couple fields and read/write them. I'll heavily comment it so that it can serve as an example, and people can copy/paste it to act as th starting point for new drivers.
Dean Roddey
Explorans limites defectum
Dean Roddey Wrote:I'll put a dummy driver in the next release, which actually does do a little, e.g. have a couple members that it treats like the 'device', so that it can register a couple fields and read/write them. I'll heavily comment it so that it can serve as an example, and people can copy/paste it to act as th starting point for new drivers.
Maybe even I will be able to figure it out then :-)
tia, Ron

My HT equipment I want to control by CQC (some day hopefully)
Yamaha CX-A5100, Dune HD pro 4k, Dune HD Pro 4k plus, ISY 994i, LG 86" 4k FP, and a projector in the future
Sounds great, Dean! Make it as filled out/formatted-to-your-liking as you can, as it may very well be the root of most of the drivers you see from here on out.... :cool

If you've got a "beta" of one already, I can give it a test-drive...I just created a basic SageTCP driver last night for development, so it doesn't do anything yet. Just compiles.
I wish there were commented examples in the CML Language Reference. That is a really good reference but it lacks examples which could be used to help those learning to understand when to use a certain method. Some of the methods are self explainatory and won't require examples. But others like the ASCII and Char classes and the TextXcoder ect... They could use short examples. I am not even talking about full examples. Just something short that demonstrates how to use the methods.

Maybe this is something the community could help with.
I'd appreciate any sort of examples when people have them..the PDL I started to understand with alot of help from Dean but got totally lost at the two-way part :-) I then thought to look into the CML stuff but at the time hockey playoffs were on and I lost all interest...

**If anybody is learning to parse webpages and think they could do it easily I would appreciate some sort of "Horoscope" driver that could go to a site like Yahoo(cookied) and retrieve a daily horoscope for all the signs...yes its an odd request but the wife really liked that when I used Mainlobby and asked if I could add it again to CQC :-)
Gallery | Thermostat Graphics Collection | Alarm Keypad Graphics | XM/Sirius 2009 Logo Collection | HA icon Collection | Insteon switch graphics [URL=""]
I like challenges! And I like the idea of a horoscopes. I doubt dean would ever include it as a supported driver just because it would use web site scraping techniques which are very unreliable. I will put this on my list of things to attempt.

Possibly Related Threads…
Thread Author Replies Views Last Post
  how would i read a csv file? indygreg 6 4,706 11-14-2017, 09:53 AM
Last Post: Dean Roddey
  Onkyo/Integra V2 Driver interest zra 9 11,299 10-22-2017, 04:18 PM
Last Post: lleo
  We need a CQC driver for this Dean Roddey 0 2,392 07-27-2017, 09:02 AM
Last Post: Dean Roddey
  A new 'universal' Denon A/V receiver driver Dean Roddey 128 75,719 04-15-2017, 04:45 PM
Last Post: Dean Roddey
  CrystalDiskInfo/read SMART hdd info IVB 2 2,755 09-30-2016, 10:00 AM
Last Post: IVB
  Anyone with Foscam - read this. jkmonroe 6 3,280 03-01-2016, 11:55 AM
Last Post: wuench
  Automating/Driver for Amazon Echo as a player? Sendero 5 4,310 11-05-2015, 11:05 PM
Last Post: IVB
  Lite-on bluray ext driver power supply? Dean Roddey 0 2,242 04-09-2014, 04:45 PM
Last Post: Dean Roddey
  Lessons Learned: TV auto power On + "Generic TCP/IP Passthrough" driver ControlFreak 6 6,568 02-17-2014, 01:01 PM
Last Post: ControlFreak
  Elk Driver AudioCmd RichardU 7 4,571 02-28-2013, 07:17 AM
Last Post: RichardU

Forum Jump:

Users browsing this thread: 1 Guest(s)