Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 1,769
» Latest member: Marceljat
» Forum threads: 10,749
» Forum posts: 74,293

Full Statistics

Online Users
There are currently 141 online users.
» 0 Member(s) | 141 Guest(s)

Latest Threads
Early MQTT support
Forum: CQC Support
Last Post: znelbok
19 minutes ago
» Replies: 24
» Views: 431
Values Tab - Regular Expr...
Forum: CQC Support
Last Post: rbroders
4 hours ago
» Replies: 19
» Views: 2,029
Templates from 5.2.10 to ...
Forum: CQC Support
Last Post: George M
8 hours ago
» Replies: 6
» Views: 49
Echo Set-up Woes
Forum: CQC Support
Last Post: dlmorgan999
Yesterday, 05:11 AM
» Replies: 2
» Views: 38
How do I do this?
Forum: Installation/Configuration
Last Post: Dean Roddey
03-22-2019, 02:43 PM
» Replies: 139
» Views: 4,821
Variable Error in Schedul...
Forum: CQC Support
Last Post: Dean Roddey
03-22-2019, 09:30 AM
» Replies: 3
» Views: 47
A failure occurred while ...
Forum: CQC Support
Last Post: Shaky
03-21-2019, 07:54 PM
» Replies: 3
» Views: 52
Official 5.4 Beta Discuss...
Forum: Beta Discussions
Last Post: Dean Roddey
03-21-2019, 07:06 PM
» Replies: 362
» Views: 27,092
Official 5.4 Beta Release...
Forum: Beta Discussions
Last Post: Dean Roddey
03-20-2019, 02:43 PM
» Replies: 38
» Views: 4,138
Problem with B&K Driver /...
Forum: CQC Support
Last Post: kblagron
03-19-2019, 12:00 PM
» Replies: 9
» Views: 194

 
  Lost Power - Elk connection problem
Posted by: Ron Haley - 02-26-2019, 10:53 PM - Forum: CQC Support - Replies (7)

Lost power, and when system came up, couldn't connect to Elk.  Did a find, and the IP address is now 169.254.247.6.  For years It's been 192.168.1.89, which matches my router at 192.168.1.1.  This looks like some sort of switch address.  Any ideas on how I can revert back to my prior address?  

Dean, my annual subscription is due, and as usual I'm having trouble finding where to do it on the web page Smile

Thanks

Print this item

  Early MQTT support
Posted by: Dean Roddey - 02-25-2019, 07:25 PM - Forum: CQC Support - Replies (24)

As of 5.3.937, some early support for MQTT has been added, if that's something you are interested in. There is a new driver which acts as an MQTT client (which means it can talk to some MQTT server you want it to talk to and access data that has been published to that server.) That can be local or remote, as you wish.

If you aren't familiar with MQTT, it's a simple 'messaging middle-ware' scheme, which means it can take messages from sources, and distribute those to consumers who ask to see them. The published messages are 'topics', and consumers subscribe to these topics. When the publisher of a topic updates the message value, the server will try to send that new value to all of the subscribers.

In the context of CQC, this means that any device or system that publishes data to an MQTT server can be indirectly gotten to from within CQC. So it makes it possible to get various more obscure bits and bobs into CQC without having to have specific drivers for them. Various types of gadgets out there can publish to an MQTT server.

For now, the support is pretty simple. The big problem, a with Z-Wave only worse, is that there's just this random information available, and how does the driver know what info is there, what type of field to store that info in, and how to pull the data out of the MQTT server and convert it to the field data type (there are no standards for data format in MQTT.)

Here is a sample configuration file, which you would put into [cqc]\CQCData\Server\Data\MQTT\Config.xml. Eventually there will be a client side driver config tab, but we need to get much further along in solidifying the configuration format. As mentioned that's far and away the hard part.

Code:
<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE MQTTCfg PUBLIC "urn:charmedquark.com:CQC-MQTTCfg.DTD" "CQCMQTTCfg.DTD">
<MQTTCfg Version="1" MQTTPort="1883" MQTTAddr="test.mosquitto.org"
         MsgTrace="Yes" VerboseMode="Yes">

    <Fields>
        <LightSwitch Topic="CQCDev/Power1" BaseName="KitchenFan" Access="RW">
            <PLFmt Type="Text">
                <TextMap>
                    <TextVal MQVal="off"   FldVal="False" Out="Yes"/>
                    <TextVal MQVal="on"    FldVal="True"  Out="Yes"/>
                    <TextVal MQVal="allon" FldVal="True"/>
                </TextMap>
            </PLFmt>
        </LightSwitch>

        <Dimmer Topic="CQCDev/Light2" BaseName="KitchenTable" Access="RW"
                MinVal="0" MaxVal="100">
            <PLFmt Type="Card" Bytes="2" Endian="Little"/>
        </Dimmer>

        <MotionSensor Topic="CQCDev/Motion1" BaseName="HallMot">
            <PLFmt Type="Card" Bytes="1"/>
        </MotionSensor>

        <MotionSensor Topic="CQCDev/Motion2" BaseName="LRMot">
            <PLFmt Type="Card" Bytes="1"/>
        </MotionSensor>

        <TempSensor Topic="CQCDev/Temp1" BaseName="LivingRoom" Type="Int"
                    MinVal="-10" MaxVal="48">
            <PLFmt Type="Text"/>
        </TempSensor>

        <TempSensor Topic="CQCDev/Temp2" BaseName="Kitchen" Type="Float"
                    MinVal="30" MaxVal="115">
            <PLFmt Type="Text" Precis="1"/>
        </TempSensor>
    </Fields>

</MQTTCfg>



Header

The header allows you indicate the address and port to use when contacting the MQTT server, and some other options.

  • MsgTrace - The driver supports a trace file, which will be important for debugging issues in the field. You can enable it via the file. Currently that's the only way to do so.
  • VerboseMode - You can force the driver into verbose mode via the file if you want to make sure it stays in verbose mode even across reloads for a while. Obviously remove this eventually.
  • MQTTAddr - The host name/address of the MQTT server to connect to.
  • MQTTPort - The port to connect to.
  • UserName/Password - MQTT server can support login. If so, set these two to appropriate values. If either is set, it is passed to the server in the MQTT connection process.
  • Secure - Set to Yes if you want to make a secure connection to the MQTT server. Obviously it has to support that, and the appropriate security certificates must be in place.  The port to use will differ based on secure or non-secure connection type. The defaults are 1883 for non-secure and 8883 for secure.
  • SecPrincipal - When doing secure connections you have to provide a 'security principal', which is basically the DNS name for which the security certificate is issued. Normally it is the same as MQTTAddr so you don't have to provide this. But, if it's different, indicate that here. 

Fields

In this XML file there is a Fields element. Under there you will define one or more fields. They are indicated by way of their semantic field types (LightSwitch, Dimmer, MotionSensor, etc....) The supported types are all demonstrated in a sample config file below. For each one you provide some basic information:

  • Topic - This is the MQTT topic path for the value that you want to store in this field. It obviously has to be something that makes sense for the type of field you choose.
  • BaseName - The is similar to other drivers where you provide the basic part of the name, which may be 'decorated' in various ways, such as for V2 compatibility. The only has to be unique enough to prevent duplicate field names (i.e. you can have a motion sensor and light named Kitchen, since their ultimate field names will be MOT#Kitchen and LGHT#Sw_Kitchen, assuming they are V2 compatible.) The V2 compatible fields will be used if the field configuration allows for such.
  • Access - The field access, which is R, W, or RW. Obviously needs to make sense for the topic .
  • MinVal/MaxVal - If the field is numeric, you can assign min/max values which will be used to set a range limit.
  • Type - For a temp sensor (and possibly for others later) where the type is not defined strictly by the semantic type, you can indicate a type (currently Int or Float) that the field should have, usually driven by the values the topic provides.

Currently we don't have any sort of 'enumerated value' field support. That's obviously something we'll need to support moving forward. And of course more semantic field types. The ones in the example are all that are supported so far.

Payload Format

Within each field is a 'payload format' element,  which you use to tell the driver how to interpret the MQTT payload. A payload can be either a text string, or some binary value. A lot of them are text strings apparently, but they could be binary.

The simplest ones are the two temp sensors. In this case, it just says the format is text, which implies that the values in the text are literally just the sensor value. So 50 or -2 or 45.20 or whatever as a text value. The driver just converts to binary. 

Note the second one has a 'Precis' value, which means precision. In that case it's assumed the formatted value is 10x times the actual value. So 45.2 shows up at 452. The driver will divide by 10 (one digit of precision) to get the final value.

For a boolean field that comes in as text, you have to provide a map. The first one is a light switch (obviously boolean) and it provides a TextMap element. Each value in the text map maps between an MQTT value and a field value (which in this case must be True or False.) You can have multiple values that map to each. In this example both on and allon map to true.

Though it's not used yet (no field writes are supported yet) you have to mark the ones that should be used when the field is written to, and CQC has to convert that true/false value to a topic value to send out. In this case the off and on values are marked as Out="Yes" to indicate these are the values to use.

For binary payloads, you can indicate the type (Card or Int, so unsigned or signed), the number of bytes in the value, the offset into the payload where the value is, and the 'endianness' of it. If you don't say explicitly it defaults to big endian since MQTT itself is big endian and probably most programs will follow that lead when they publish binary values. But, if they don't, you can indicate little endian, as the KitchenTable dimmer one does.

In most cases it will probably just be the value and nothing else. But, if that's not true, you can indicate an Offset value, e.g. Offset=10, which indicates that the value to extract is ten bytes into the payload data.

There is no means currently to map a range of MQTT values to a different range of field values. That's something that will obviously be provided moving forward. Currently, the value that comes in from MQTT must be the actual value for numeric fields.

Config Validation

Because the config file is kind of complicated, and to avoid a slog of edit, reload, check the logs cycles, if you open a CQC Command Prompt, you can run a little program called CheckMQTTCfg and it will check the file and report any errors. If it passes that it at least syntactically correct and as semantically correct as the program can figure out, though I'm sure there are more checks I can do. We'll discover that as we move forward.

But it should avoid a LOT of busy work getting the config file right. As I said, I don't want to do heavy docs until we get closer to the real thing. In the meantime, just ask if you have questions.

Trace File

If you enable the trace file, it will be in the same directory as you created above for the config file. It will be called Trace.Txt. It may have zero size, but should still have content in it. You can just do:

type Trace.txt

to see the output. You can't open it in an editor, since it is a live file. But you can do:

type Trace.Txt > MyTrace.Txt

or whatever and redirect the output to another file that you can open in an editor. Mostly it's for my use, but serious MQTT users will obviously get to understand what it's telling them.


In Conclusion and Thusly and Henceforth So

This is early stuff, but in so far as the limitations go, just getting info into CQC for a fairly small set of field types, it should be pretty useful already.  So give it a shot and see how it works for you.

One thing I'm considering, in order to avoid the config file getting out of hand, because the possible things you'd need to tell it are almost endless, is to maybe just turn it into a CML class that the driver will load and run. Or, to do a Razor/Blazor style thing, with CML snippets embedded into the file. Mostly that would take over the things like the text map and to do things like map between MQTT values and field values.

That might be the only way to keep it from turning into something like the Z-Wave driver, which took endless years of work to get it flexible enough to handle most of the things it needs to. Of course if we were just exposing raw values that would be one thing, but we need to have that strong mapping between CQC's well defined types and MQTTs completely undefined topic formats. Else we lose a lot of the value of doing this.

Print this item

  Accidental account deletion
Posted by: Dean Roddey - 02-10-2019, 09:59 PM - Forum: CQC Support - No Replies

Due to a not so clear reaction of MyBB to a mistake of mine, I deleted a page of real accounts instead of spammer accounts. There are lots of old and unused accounts, and probably all of these were those. But, if you suddenly find your account not found, let me know. Send an e-mail to support at our domain.

Print this item

  Hue Lighting Control
Posted by: jokermac - 02-10-2019, 08:11 AM - Forum: Installation/Configuration - Replies (3)

I'm in the process of moving to LED and have made a significant investment in HUE.  So far my review is mixed.  The lights are nice and I like the ability to have color, but Phillips app and control is a bit lacking.  

Now trying to integrate with CQC and interested in best practices for control from CQC.  Some initial questions I have are:

1.  In CQC do you have to control everything by individual light, or is there a way to combine for group control?
2.  How many devices do you run on a single hub?
3.  How are you controlling lights across multiple hubs if/when not doing so through CQC?  The Phillips app requires you to switch the hub connection before you can control the associated lights.   
4.  In CQC I see a field for scene that is R/W, but not sure how you would control a scene without a group or room.  Says it is enumerated with the default hue scenes, but how do you make use of this?
5.  Does the CQC driver support motion sensors and switches?  Does not appear to.
6.  Any other advice or thoughts from users who have experience with the Hue system and integration to CQC?

Sorry if this has already been discussed.  I didn't see any recent threads.

Print this item

  Combining label and value???
Posted by: rtarver - 02-08-2019, 08:05 PM - Forum: Installation/Configuration - Replies (2)

Been banging my head on this for the evening.  I'm building some simple lighting pages for my phone.  In the end, I decided on a standard set of buttons; Off, 25%, 50%, 75%, Full.  I'd also like to somehow have another button(header) that says:  "Carriage Lights: 50%".  Obviously, the X% is a function of the current value.

I've tried this several ways and can't seem to get it sorted out.  I've tried it with variables and with field values.  What I honestly wanted was a label button in the middle with another button on either side to raise/lower by 20%.  I can work the logic with if/else for not going over/under 100/0... but then I run into faults when trying to add values.

There's gotta be an easier way than what I've been doing (which isn't working perfectly).

Thoughts anyone?

TIA

Print this item

  Windoze knows best... edgeport drivers :(
Posted by: rtarver - 02-04-2019, 08:26 PM - Forum: Installation/Configuration - Replies (13)

I'm about to pull what remaining hair I have left out.  Just built a brand new NUC with a fresh Win10 license.  I have a USB based 16-port edge port.  Windows picks up on it but only sees 8 of the ports.  I need more than that.  For the life of me, I can't get the digiport driver installer to install correctly.  I'm pretty sure it's a rights issue to /system32 folder.  I can run as admin, I can grant permissions, I can take possession, etc.  Pretty much everything I've googled to no avail.

Anybody have any suggestions to get win10 to see the other 8 ports?  I know this probably isn't the best forum for it... but I dread going all noobie in another forum.

TIA,

Russ

Print this item

  Considering cqc, what is it's best complement of systems?
Posted by: rhosch - 02-04-2019, 07:28 PM - Forum: Installation/Configuration - Replies (14)

Terrible title. Can't think of a good short way of asking the question. New to cqc forums, have been reading up on it, will download to play with soon, considering for new construction.

I've seen Dean say a few times on avsforum and cocoontech that it's best to pick aan automation controller first, then pick systems that it plays best with.  OK. But perusing the forums here, elsewhere, cqc documentation, I'm having a hard time sorting out just what those systems are. So I thought I'd just ask directly!

Lighting - radiora2. Very close to locking this in as a certainty.

Audio - ?  Something like an echo dot in each room and a ln WHA controller/amp combo like from HTD sounds appealing. Does cqc play well with HTD? Can a cqc touchscreen replace a standard Lync keypad?

Security - elk M1 or something else?

Cameras - blue iris or other?

Irrigation - ?

Home theater - I know cqc has built in libraries, players etc. Is there another media app like Kodi or Plex that cqc is known to integrate seamlessly with and give a better combined experience than cqc alone?

Thermostat - ? Stay in lutron family, or... ?

Video - not leaning towards distributed video. If I did, for the value Netplay from videostorm would be high on the list. Integrate with cqc OK?




Bottom line, new construction, basically a clean slate to pick components that play well together within some semi-reasonable budget. What would you be looking at?

Print this item

  Neo purchased by C4
Posted by: Dean Roddey - 02-04-2019, 02:56 PM - Forum: General Automation - Replies (2)

This may be of interest to some folks here, not sure:

"Control 4 purchases NEEO, discontinues all consumer facing hardware sales effective today."

https://www.reddit.com/r/homeautomation/...inues_all/

Print this item

Star Aqara integration?
Posted by: ghurty - 02-03-2019, 09:47 PM - Forum: CQC Support - Replies (1)

Hii started reading about Aqara. It looks like they may have some low cost solutions  Would CQC be able to integrate with it?

Thank you

Print this item

  Unbelievable how Quick and Cheap Technology has Changed
Posted by: kblagron - 01-30-2019, 11:54 PM - Forum: General Automation - Replies (1)

So 10 years ago I wanted a video distribution solution and chose the B&K HD-6 that provided 6 zones of Component Video distributed via Cat5.  It worked great at the time, but after buying the unit and the 6 receivers I was out close to $3000. 

I have held on to the HD6 longer than I should, especially with HDMI finally getting distributed on just one Cat5e wire.  This week I purchased the J-Tech 1x4 HDMI splitter that comes with the base unit plus 4 satellite receivers for $199.  I had been using a couple of J-Tech extenders and splitters over the past two years and felt comfortable that the company made a product that would hold up, and this new unit is amazing so far.  I always had issues with honeycombing on the HD-6 (probably due to electrical interference), but all the video on the J-Tech is fantastic (and the signal includes sound that the HD-6 didn't).

It's not anything that can be controlled, but of course the DirecTV and the TV's it broadcasts signals to can.  

It's tough retiring the HD-6, but it will have to go the way of the Sony CX777 and numerous other items that I have tried but didn't like.  As a HA hobbyist, its fun when something you buy works, which is never guaranteed.  One of these days I am going to have to add up all the stuff that I bought and retired, never used, or never liked.

Print this item