Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Amazon Echo Hue Simulator Driver
[Image: amazon-logo._CB321495207_.png]
Amazon Echo Hue Simulator Driver
Version 1.1

This driver will allow control of your CQC devices from the Amazon Echo.  
This is accomplished by simulating the Phillips Hue bridge on your local network, these will show up as connected devices in the Echo app.

Here is an example of what it can do...
[Image: 0.jpg]

Release Info
  • Version 1.0 Original Version
  • Version 1.1 Fixed issue with switch type causing echo to not recognize devices

Configuration File

You need to create an XML configuration file to map voice names to devices.  Here are the rules for that file, an example is posted below...
  • Default location <CQCDir>/CQCData/MacroFileRoot/Drivers/EchoHueSim/EchoConfig.xml
  • All <Device> tags must be enclosed in <Config></Config> tags
  • Each connected device should be in it's own <Device></Device> tags
  • <Name> - Voice tag/name used by the Echo to activate the device. ┬áMust be unique.
  • <Type> - Switch/Dim - Switch for on/off devices, Dim for devices that support more than on/off
  • <Moniker> - Optional Driver name/monkier to control
  • <Field> - Optional CQC field name to control
  • <OnValue> - Optional command to send to CQC when Echo sends an On command
  • <OffValue> - Optional command to send to CQC when Echo sends an Off Command


I apologize for the complexity of the install but due to the way both the Echo and CQC (no TCP listener) work, this is as simple as I could make it.
  • The CQCEchoRelay file must be unzipped with 7ZIP, this was done due to forum file size limits.
  • Install CQCEchoRelay Service on a machine on your network (Run the Install_CQCEchoRelay batch file as an Administrator). ┬áBy default this will run on TCP port 8585, but you can change that by running the install file with the /P:<port> option. ┬áInstall_CQCEchoRelay /? for more info. ┬áA firewall entry will also be automatically created.
  • Create an XML config file and place it under MacroFileRoot. ┬áThe default location is <CQCDIR>\CQCData\MacroFileRoot\\Drivers\EchoHueSim\EchoConfig.xml.
  • Add the driver in the CQC Admin Interface.

Driver Installation
  • IP Address/Port - Enter the ip address of the machine running the CQCEchoRelay. ┬áThis must be an IPv4 interface address, localhost/ and IPv6 will not work.
  • Echo Name/Address - Enter the DNS name/IP Address of your Echo. ┬áThis is just used for discovery but it is best if your Echo is on a static/fixed address.
  • Config File Location - Path to your XML configuration file under MacroFileRoot.

You must discover your devices in the Echo before they can be used.  Up to 61 devices can be discovered.  If you have multiple Echos, you must start discovery from the Echo entered during the driver configuration.  All the Echos on the same account will share the same list of devices.
After you have built your configuration follow these steps:
  • In the Echo app or web portal under settings Forget All Connected Devices.
  • Set the driver's Discover field to True (discovery lasts 60 seconds).
  • Say "Alexa, discover my devices" (from echo you entered during driver installation)
  • The Echo will report back the number of devices found, this should match the number in the drivers Device Count field.

The driver has the ability to create a configuration file for you based on all of your v2 Scenes, Lights, and Relay type fields in your other drivers.
In order to use this the driver must be loaded first, so you will need to create a dummy config to get the driver loaded then run the export by setting the Export field to True.  This will generate an export file under macrofileroot with the date/time in the file name.  It will not overwrite your existing file.  You can then use this file or copy items from it to your main config file and reconfigure/reload the driver.


The driver can be used in two different ways.  The first way is to control fields directly.  To do this you put in your Moniker/Field in the configuration file for the device and optionally things like onvalue/offvalue.  The driver will then turn on/off (or set a card4 value) for that field directly based on Echo commands.

The second way to use the driver is with "dummy" devices.  You can just configure a <Name> and <Type>.  The driver will send a CQC User Action Event anytime a command is sent by Echo with a value of Name,Cmd,Value.  This can then be used in triggered events to do anything you want.

Voice Commands
  • On/Off -
    "Alexa, turn on <name>.",
    "Alexa, turn off <name>."
  • Dim -
    "Alexa, set <device> brightness to [##]%"
    "Alexa, set <device> to [##]"
    "Alexa, dim <device> to [##]%"
    "Alexa, dim <device> to [##]

  • In testing up to 61 devices were discovered.
  • May conflict with the Hue Bridge, do not discover devices in both the driver and hue bridge from the Echo
  • Devices may show up as "offline" in Echo App but should still be controllable.
  • The CQCEchoRelay relies on a network utility named ncat.exe. ┬áThis tool is also regularly used by network security experts and some hackers. ┬áBecause of this it is sometimes reported by Antivirus tools like Symantec as a virus. ┬áIt is not a virus and is required for the driver to work. ┬áIf you have AV issues you will need to exclude the executable from your AV program. "C:\Windows\System32\ncat.exe".
  • The CQCEchoRelay Service will autostart but not show up as running or started. ┬áIf you see ncat.exe in your task list or you run the netstat -ano | find "8585" you can verify it is working.
[Dean: A change in the HTTP client in the 5.x time frame caused an ambiguous type name in this driver. It's a trivial fix so I have attached a 5.x workable version of the original driver pack. Wuench, if you ever update this, we can get this simple fix into it so that this extra pack can be gotten rid of.]

Attached Files
.cqcdrvpack   EchoHueSim_1_1.CQCDrvPack (Size: 28.58 KB / Downloads: 14)
.zip (Size: 43.13 KB / Downloads: 20)
.zip (Size: 477.54 KB / Downloads: 62)
.cqcdrvpack   EchoHueSim_1_1_ForV5_x.CQCDrvPack (Size: 28.59 KB / Downloads: 12)
My Home Theater/Automation Website

[THREAD=5957]BlueGlass CQC Config[/THREAD]
[THREAD=10624]Wuench's CQC Drivers[/THREAD]
Great job Wuench!

61 Devices is pretty sweet, but the ability to Dim is bleeping awesome! I've had it working on my ISY, but getting it for CQC will force me to get my CQC server up and running again Smile

Getting voice input through the Echo has caused the first incident of my wife requesting that I automate something. I personally think reliable, non-threatening natural voice input is the tipping point for home automation.
Here is a sample configuration file....
  • Kitchen Lights - This is a simple switch. The field is a boolean and on/off will set it to true/false.
  • Outside Lights - This is a v2 Scene field which is a string field. So you need the OnValue/OffValue.
  • Cool Temp - This is a Card4 field. If you use the Echo dim commands it will return a value of 0..100 and set the field to that value. On/Off will throw errors.
  • TV - This is a dummy entry. It will only generate a CQC User Action Event. So you can create a triggered action to do whatever you want with the value.

          <Name>Kitchen Lights</Name>

          <Name>Outside Lights</Name>

          <Name>Cool Temp</Name>


Here is triggered action example that will split the values for TV event and run two global actions to actually turn on/off the TV. Just create a triggered event with Is User Action From <EchoDriver>.

// --------------------------------------------
// Parse Name,Command,Value
// --------------------------------------------
TrigEvent::GetUserActionVals(LVar:Type, LVar:Data)
System::GetNthToken(%(LVar:Data), ,, 1, LVar:Name)
System::GetNthToken(%(LVar:Data), ,, 2, LVar:Cmd)
System::GetNthToken(%(LVar:Data), ,, 3, LVar:Value)

// --------------------------------------------
// TV
// --------------------------------------------
If System::Equals(%(LVar:Name), TV, No Case)
   If System::Equals(%(LVar:Value), true, No Case)
      // Turn On TV
      // Turn Off TV
My Home Theater/Automation Website

[THREAD=5957]BlueGlass CQC Config[/THREAD]
[THREAD=10624]Wuench's CQC Drivers[/THREAD]
Very nice! Got a couple of test lights working without much trouble. Had some issue with the Echo IP address but re-did the Echo setup and created a static address as suggested. Everything fell into place after that.
The zip file seems to be corrupted.
Dean Roddey
Explorans limites defectum
It's a 7z file you have to use 7Zip to extract it. I couldn't get the filesize low enough to upload with a regular zip.
My Home Theater/Automation Website

[THREAD=5957]BlueGlass CQC Config[/THREAD]
[THREAD=10624]Wuench's CQC Drivers[/THREAD]
My install is throwing an error.

CIDMacroEng, CIDMacroEng_Engine.cpp.1801, Status/App Status
Exception 'SocketErrors.ConnFailed' was thrown from line 1679

The install seemed to go fine. Ran the install with admin rights. Socket 8585 is linked to the CQC Server, so the application seems to be running. I configured the most basic of config files below with the last example as a dummy switch (strange but when you try to search for the xml file during install it only allows it within Program Data). I have the xml in either location (as described in the driver setup as well). Just cycles between wait for connectand waiting for comm resource.

I also used a static IP address for the Echo.

Config file below




Any ideas?
See if the relay is listening. From a command prompt run:
netstat -ano | find "8585"

You should see something like:
My Home Theater/Automation Website

[THREAD=5957]BlueGlass CQC Config[/THREAD]
[THREAD=10624]Wuench's CQC Drivers[/THREAD]
naturally im traveling. guess i'll have something to do when i get home.

do the needful ...
Hue | Sonos | Harmony | Elk M1G // Netatmo / Brultech
Just discovered that Echo won't take the name "Mute". It loads and discovers ok, but when you try to say "Alexa, Turn On/Off Mute" it doesn't send anything. I think it is interpreting it as a cancel or shut up command, or maybe it's part of the built in audio stuff.

I ended up changing my voice tag to "Sound".
My Home Theater/Automation Website

[THREAD=5957]BlueGlass CQC Config[/THREAD]
[THREAD=10624]Wuench's CQC Drivers[/THREAD]

Possibly Related Threads…
Thread Author Replies Views Last Post
  RainMachine Sprinkler Irrigation Controller Driver kblagron 41 1,012 03-25-2020, 07:41 AM
Last Post: kfly
  Tesla Driver Driver kfly 8 357 02-24-2020, 08:04 AM
Last Post: kfly
  LIFX Driver bobskie708 15 5,515 01-05-2020, 11:00 AM
Last Post: simplextech
  Universal Devices ISY Insteon Driver wuench 369 172,333 12-28-2019, 05:15 PM
Last Post: simplextech
  JVC D-ILA Driver jokermac 32 2,803 12-18-2019, 12:30 PM
Last Post: jokermac
  RunTimer2 driver rbroders 18 7,179 10-17-2019, 04:38 PM
Last Post: rbroders
  Writing Driver - Varying commands based on checksum gReatAutomation 3 653 07-22-2019, 01:08 PM
Last Post: Dean Roddey
  Samsung HLxxA750 DLP Beta Driver jrunde 37 20,826 07-19-2019, 01:24 PM
Last Post: gReatAutomation
  New Driver - How hard would this be? kblagron 4 1,271 05-20-2019, 11:28 AM
Last Post: zaccari
  Cytech Comfort Driver znelbok 6 1,190 04-10-2019, 05:39 PM
Last Post: znelbok

Forum Jump:

Users browsing this thread: 1 Guest(s)