Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Android Widgets directly controlling CQC!
#1
Check it out! Tasker is MUCH more powerful than I realized, turns out you can have widgets directly call CQC tasks. I just set one up to directly tell CQC to turn on my entry lights.

Its obviously the "entry lights" light bulb. I can add more too, as desired.

[Image: gtagjX1.png]
------------------------------------
Some of my devices: Sonos, Aeotec zWave, Nest, Rain8Net, Various H/T
What's next: CQC-Voice, Brultech GEM
My vlogs: https://www.youtube.com/c/IVBsHomeAutomation
Reply
#2
Is via local intranet or internet or both?
Thanks
George M
Reply
#3
George M Wrote:Is via local intranet or internet or both?

Both. I used my dyndns account.
------------------------------------
Some of my devices: Sonos, Aeotec zWave, Nest, Rain8Net, Various H/T
What's next: CQC-Voice, Brultech GEM
My vlogs: https://www.youtube.com/c/IVBsHomeAutomation
Reply
#4
IVB Wrote:Check it out! Tasker is MUCH more powerful than I realized, turns out you can have widgets directly call CQC tasks. I just set one up to directly tell CQC to turn on my entry lights.

This is interesting. Do you have any hints on how to get Tasker to do this?
My Other web server is Dropbox.
Reply
#5
Sure thing. I'll submit this as a how to with a cleaner writeup later, but I'll use you all as my guinea pigs to make sure its clear first:

1) Code up this macro in the CML Macro thingey, compile/package it, import it. (I stole it from znelbok and barely changed it, hence the random mentions about camera stuff). NOTE: YOU MAY NEED TO TWEAK THE VARIABLES DRIVER NAME & FIELD NAME in the code. I have sample-variables-driver and NFCTagReceived, so either you need to also use those exact names or change it.
2) Have I mentioned you need to set up a variables driver field and add a string field called NFCTagReceived (unless you changed it to something else in which case add that).
3) In tasker, set up one task for each widget you're going to want. I'm using Browse URl/URL, although the one side effect is that it physically opens Chrome. I'm trying to get HTTP GET or HTTP POST to work, but it ain't. My line is:
Quote:http://IVBIsAStud.homedns.org:11001/CMLB...NFC?Cmd=<2 letter code to keep URL short>
.
Vary the two letter code for each event. IE, my code for this particular one is HL (Home, lights on). I use tasker with NFC, so I also have tasks for things like LV (leaving), VD (vivek docked, and yes I know the abbreviation)
4) On your phone, add a Tasker widget that calls that task.
4) In the CQC Admin Interface, BrowseFields section, set up a trigger on that field for any change.
5) In the CQC Event Server, set up one triggered event for each task that looks for "Is New Fld Value For", that field, and whatever 2 letter codes you used. Add whatever actions you want. Don't just have to be lighting related, could be anything/everything you do with CQC.

I think thats it.
------------------------------------
Some of my devices: Sonos, Aeotec zWave, Nest, Rain8Net, Various H/T
What's next: CQC-Voice, Brultech GEM
My vlogs: https://www.youtube.com/c/IVBsHomeAutomation
Reply
#6
Just realized you can skip step 1 and just import my driver pack, if you create a variables driver and field name named the same way as mine. Here's that pack.


Attached Files
.cqcmacropack   NFC.CQCMacroPack (Size: 949 bytes / Downloads: 7)
------------------------------------
Some of my devices: Sonos, Aeotec zWave, Nest, Rain8Net, Various H/T
What's next: CQC-Voice, Brultech GEM
My vlogs: https://www.youtube.com/c/IVBsHomeAutomation
Reply
#7
IVB Wrote:Just realized you can skip step 1 and just import my driver pack, if you create a variables driver and field name named the same way as mine. Here's that pack.
Sweet. Even better. Thank you so much. FWIW, I'm running TARiva, but I only use it for about one or two buttons. Easily replaced by widgets.
My Other web server is Dropbox.
Reply
#8
oh I also run taRIVA, couldn't do without it, I love the ability to create varying size buttons and have 2way control (this is just 1way, that light bulb is static).

But for perhaps 1-3 1way tasks, this is perfect.
------------------------------------
Some of my devices: Sonos, Aeotec zWave, Nest, Rain8Net, Various H/T
What's next: CQC-Voice, Brultech GEM
My vlogs: https://www.youtube.com/c/IVBsHomeAutomation
Reply
#9
Okay. I have set up CQC so that when sample-variables-driver.NFCTagReceived changes to OF, it toggles the lights in my office and resets to blank. And I have imported the macro.

Now I figure I'll get one piece working at a time and homedns/Tasker will be last, so to test the macro, I enter the following into my browser:
http://xx.xx.xx.xx:11001/CMLBin/User/NFC?Cmd=OF

xx.xx.xx.xx is my current IP. Nothing happens. I'm wondering what is :11001? Is that a port. Do I need to open it in my router, and/or in my windows firewall. Is there anything else I need to tell CQC to monitor for this info?
My Other web server is Dropbox.
Reply
#10
the IP address is the address of the CQC Web server not your IP address. the :11011 is the port number that the CQC web server is running on. So unless you installed it on that same port it will be something else (80 or 8080 most likely). Run the installed again and see if the CQC web server is installed and what port it is on.

Your macro has to be called NFC.

Is the triggered event working properly. When you change the field in the variable driver did the lights come on?

THats your first step. Don't forget that the variable field if a boolean needs to be reset so that you can re-trigger next time you want to use the macro.

The last step is the running of the HTML in the browser.

In Summary :-

Did you create a variable driver with the same moniker as that in the macro?
Does the variable driver contain a field of the same name as that used in the macro?
Is the CQC Web Server running?
Is the port number correct?

Mick
Mykel Koblenz
Illawarra Smart Home
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  CQC controlling Model Railroad??? Deane Johnson 53 33,969 05-12-2017, 02:11 PM
Last Post: Deane Johnson
  Any way to add click sound to widgets on my iPad? Deane Johnson 1 1,745 08-15-2016, 03:29 PM
Last Post: znelbok
  Controlling Insteon Scene Controller buttons ellisr63 8 6,044 10-14-2014, 11:38 AM
Last Post: SomeWhatLost
  Android based device Voice control of CQC How To Discussion Thread batwater 5 4,707 12-07-2013, 10:01 PM
Last Post: RichardU
  Controlling ZigBee (or Z-Wave) on HAI anogee 2 2,494 12-18-2012, 12:06 PM
Last Post: Dean Roddey
  Animated image Widgets DaveB 1 1,710 12-11-2012, 08:48 PM
Last Post: Dean Roddey
  Controlling an onscreen GUI cavalier240 10 4,546 03-20-2012, 09:40 AM
Last Post: standon
  Need help with controlling an app simon 26 10,577 11-28-2009, 01:42 PM
Last Post: sic0048
  XLat'd widgets not updating Sendero 7 2,956 01-21-2009, 08:27 PM
Last Post: Sendero
  Controlling devices that use HDMI-CEC cavalier240 4 3,285 09-26-2008, 05:25 AM
Last Post: sic0048

Forum Jump:


Users browsing this thread: 1 Guest(s)