Author Topic: Luup Plugin: SQBlaster interface  (Read 39998 times)

Offline ehillis

  • Full Member
  • ***
  • Posts: 115
  • Karma: +1/-2
Re: Luup Plugin: SQBlaster interface
« Reply #45 on: February 06, 2012, 01:11:12 pm »
@guessed
I wondered if you would kindly assist and point me in a proper direction. I am setting up an Add-A-Motor Drapery track and I used SQDesigner, SQremote and SQBlaster and have got control on my iPhone to open and close it. This segment works fine.  I have read all the forum, wiki etc about migrating the info from SQremote to Vera. I was using I-shell tools to perform the conversion but keep getting multiple errors.
I am running Vera 3 (1.5.254) as the target platform. I include the files that SQremote provides in its backup.
« Last Edit: February 06, 2012, 05:08:40 pm by ehillis »

Offline guessed

  • Master Member
  • *******
  • Posts: 5294
  • Karma: +90/-22
  • Release compat is not a bolted-on afterthought
Re: Luup Plugin: SQBlaster interface
« Reply #46 on: February 07, 2012, 12:10:48 am »
You're going to run into similar problems that @tbever ran into in this conversation:
    http://forum.micasaverde.com/index.php/topic,5734.msg38784.html#msg38784

Short version: MiOS does IR for AV, but not IR for AirCond, or other IR-controlled devices.. but we can work around that a little by "tricking" the conversions to use AV-based IR code mappings per my postings.

in your dev83061496.xml file, change:
a) the SQKeyCode from "0" to "3" when command_name="Close"
a) the SQKeyCode from "0" to "1" when command_name="Open"

Then run your files through the generation process:
    http://forum.micasaverde.com/index.php/topic,5734.0.html

Noting exactly which bits to put into which fields...


I just did this with your original files, without the SQKeyCode modifications I've listed above.  I've attached Step-wise screenshots using your files, and the ones references from source control.  I'll attach the [broken] output in another post, the reason it's broken is because the source devxxxxxxx.xml file from SQRemote has no AV Devices in it....so there's no direct mapping without the hack listed above to "map" these codes to something AV-based in MiOS.

BTW: It would pay to get the SQBlaster lads to add dedicated SQKeyCodes for these non-AV IR devices.  Then I can define a mapping for them to "something" in the AV land.

Offline guessed

  • Master Member
  • *******
  • Posts: 5294
  • Karma: +90/-22
  • Release compat is not a bolted-on afterthought
Re: Luup Plugin: SQBlaster interface
« Reply #47 on: February 07, 2012, 12:16:44 am »
... and here is:

a) the source SQRemote file (dev83061496.xml) (Input to Step 1, along with SQBlaster_I.xslt as it's XSLT)
b) the resulting [broken] I_xxx.xml (Output from Step 1, Input to Step 2 along with SQBlaster_D.xslt as it's XSLT)
c) the resulting [broken] D_xxx.xml (Output from Step 2)

Offline ehillis

  • Full Member
  • ***
  • Posts: 115
  • Karma: +1/-2
Re: Luup Plugin: SQBlaster interface
« Reply #48 on: February 08, 2012, 01:51:02 am »
@guessed
Thank you so much for the information and suggestions. I followed them and made the changes and copied the resulting files to vera3 1.5.254. No device or any information shows up. I noticed that no .json file was created and thought that this was odd. It's late for a senior to be up now. Would you have  any thoughts on this. I attach the 2 files.

SQBlaster icon shows UP

Addendum:
I managed to get it working sort off
- added IOdevice to treat UI5 as per the beta discussion. It did not show "open and close" but had entries for "ON" "OFF' and "ON/OFF" found "on" would close it and "ON/OFF" would open it so that's OK. Nobody but me will see what is under the sheets. The Android pads use Home Buddy and the scenes are set up with Open and Close in the names.

Needs to be a reassessment of the whole area of IR control and generation of the Vera files. It would be best if they could be output in the correct structure from SQDesigner and just move them into Vera. This would mean the SQDesigner could target multiple Home Automation Controllers at once or singularly. Just a random thought.

Thanks very much for your able assistance as it turned on the proverbial light bulb and I was able to get my thoughts reordered
« Last Edit: February 08, 2012, 04:16:25 pm by ehillis »

Offline guessed

  • Master Member
  • *******
  • Posts: 5294
  • Karma: +90/-22
  • Release compat is not a bolted-on afterthought
Re: Luup Plugin: SQBlaster interface
« Reply #49 on: February 08, 2012, 09:50:35 pm »
@ehillis,
They generated correctly.  There is no JSON file, as there's no UI for a IR Device.

This new device will, however, show up in a few places:

a) MiOS Advanced Scenes...
This is where you can put your automation steps.  In my case, I use this to create scenes for things like Turning off the TV in the early AM just in case I left it on, shutting down the TV (and other things) when I Arm the Alarm system, etc, etc.

This is probably the most common use-case for the SQBlaster-Plugin - turning things On or Off.  It sounds like your Use-case is similar (except it's open/close based upon some criteria)

Under Advanced-scenes, you pick the IR Device (whatever you created from the I_xxx.xml and D_xxx.xml files you posted), then you pick the actions you want to execute.  Given your generated files, the ones of interest will be:
    urn:micasaverde-com:serviceId:DiscretePower1
        Off
    urn:micasaverde-com:serviceId:TogglePower1
        OnOff


In hindsight, I probably should have mapped you to DiscretePower1's On and Off, but it doesn't impact the scenario...
I've attached a version of the UI4 UI, but something similar should be available under UI5, at least for these "hand-built" IR Device files.

b) SquareConnect's SQRemote...
It now shows up under SQRemote when you [Assign] an action to a button/control.  Since you already use SQRemote, this doesn't greatly buy you anything, but it will appear.... along with this IR Device's two actions.

Offline ehillis

  • Full Member
  • ***
  • Posts: 115
  • Karma: +1/-2
Re: Luup Plugin: SQBlaster interface
« Reply #50 on: February 08, 2012, 11:14:27 pm »
Thanks for all your help. You are certainly a valuable resource to this forum. I have the open and close scenes all working and tomorrow I will call these scenes inside other scenes which isn't a problem at all.

This was to add control to vera to open and close ADD-A-MOTOR 1000 motorized drapery tracks. Now I have all the motorized drapes and blinds in the house automated. This includes Z-wave ones using ESI controller which are a dream to work with, Hunter-Douglas powerrise 2 blinds and the ADD-A_MOTOR. They are all in automated scenes which are scheduled for sunrise and sunset. Wife really likes them. Now on to the automatic door locks. Fifty years of computer technology and still learning. It's good for me.

Thanks for all. Until next time.................Ted

Offline guessed

  • Master Member
  • *******
  • Posts: 5294
  • Karma: +90/-22
  • Release compat is not a bolted-on afterthought
Re: Luup Plugin: SQBlaster interface
« Reply #51 on: February 08, 2012, 11:42:08 pm »
Glad it worked for you. 

I'm about to go down the automated roller-blind path myself, but I'll probably avoid Z-Wave and look at the other options (either bridging an RTS, or using Relay controller), just haven't worked out the right "package" of components just yet...

Offline ehillis

  • Full Member
  • ***
  • Posts: 115
  • Karma: +1/-2
Re: Luup Plugin: SQBlaster interface
« Reply #52 on: February 08, 2012, 11:58:17 pm »
Check out ESI they have just brought out a new motor that seems to have Z-wave built in and the rest is just parts to put them together. It was difficult to find a qualified person to sew the Roman blinds though.

Offline guessed

  • Master Member
  • *******
  • Posts: 5294
  • Karma: +90/-22
  • Release compat is not a bolted-on afterthought
Re: Luup Plugin: SQBlaster interface
« Reply #53 on: February 09, 2012, 12:05:07 am »
My longer-term plan is to keep Z-Wave contained to lighting and thermostats, at least until there are better options for Thermostats... which I'm glad we're starting to see, they just need API support  8)

Everything else will be Wired (Ethernet etc) or Wifi, for resilience and better device security.
« Last Edit: February 09, 2012, 12:16:35 am by guessed »

Offline ehillis

  • Full Member
  • ***
  • Posts: 115
  • Karma: +1/-2
Re: Luup Plugin: SQBlaster interface
« Reply #54 on: February 09, 2012, 12:25:27 am »
Just ordered an RS232/network interface board to interface a full Carrier HRVAC setup to Vera. Got the RS232 commands/responses for the Carrier and chose a RS232 board that someone has set up the interface for in Vera. Lot of work to do to code up the interface but am gradually lining up all the ducks.

Offline manfaiho

  • Jr. Member
  • **
  • Posts: 70
  • Karma: +0/-0
Re: Luup Plugin: SQBlaster interface
« Reply #55 on: April 24, 2012, 12:37:33 pm »
I am new user to VeraLite3 and SQConnect Plus. I have tried to follow your previous steps to generate two XML files based on my box.net configuration backup from SQConnectHD to start my test. But I don't know how to upload these XML files into MIOS for the configuration of IR AUX Channel1 device that generated by SQPlugIn. Do we have a step-by-step guideline how to configure it and the procedure how to make necessary XML files and upload it to MIOS so that I can test it by creating approriate scene in MIOS and let my Windows Phone 7 control my IR device over Internet?

I already checked its WIKi from http://code.mios.com/trac/mios_sqblaster# and read through this thread but still have no idea. Sorry for my 101 question. 

Offline guessed

  • Master Member
  • *******
  • Posts: 5294
  • Karma: +90/-22
  • Release compat is not a bolted-on afterthought
Re: Luup Plugin: SQBlaster interface
« Reply #56 on: April 25, 2012, 01:19:52 am »
@manfaiho,
It sounds like you've already done step (d.3) from here:
   http://code.mios.com/trac/mios_sqblaster#

If this is the case, then you upload these files to VeraLite using the menu:
    Apps >> Develop Apps >> Luup Files

See attached image.  I've highlighted the relevant section on the right in a green box.  That will move/copy the files onto your Vera box.

After that, you can follow this (albeit from UI4, the principal is the same):
    http://wiki.micasaverde.com/index.php/Install_LUUP_Plugins

That will create an IR Device in Vera from the files you just uploaded.  The last step is to associate these files with the SQBlaster.


If you get stuck, feel free to post the original devxxxxxxx.xml file, your derived I_xxxxxx.xml and D_xxxxxxx.xml files, and a screenshot of how far you got.   I tend to make assumptions about how much people know about this stuff (esp uploading files, which was the norm prior to apps.mios.com and UI5)

Offline manfaiho

  • Jr. Member
  • **
  • Posts: 70
  • Karma: +0/-0
Re: Luup Plugin: SQBlaster interface
« Reply #57 on: April 25, 2012, 09:00:39 am »
Thank you so much :-)

I can succesfully uploaded these two XML files into MIOS. But I am not sure how to create the device? Should I go to "Add Device" then select "IR Device" then use "Manual" to create. But it requires me to add "codeset??"....

If I follow the link you provide for UI4 to generate a device, I should go "Develop App" and make the association with these XML files for the device fields. The device can be created but nothing I can control it. Is anywhere I go wrong for the next step? 

Offline manfaiho

  • Jr. Member
  • **
  • Posts: 70
  • Karma: +0/-0
Re: Luup Plugin: SQBlaster interface
« Reply #58 on: April 25, 2012, 09:17:54 am »
I think it may be the problem for these two XML files I attached for your review. I only created a learn command to restart my PC using iMon. I can do it in SQ HQ App. I also attache dev file from my box.com for your check. Seems a bit of diffculty for first learner :-)

Offline vascodp

  • Sr. Newbie
  • *
  • Posts: 41
  • Karma: +0/-0
Re: Luup Plugin: SQBlaster interface
« Reply #59 on: April 27, 2012, 01:53:20 pm »
@manfaiho,

I have exactly the same problem.

Everything seems fine when I manually upload the attached D+I files, generated with the XLS files, to create the device, but no IR Transmitter selection is available and no IR actions are shown at scenes/advanced.

Also tried to create a variable IODevice, and managed to associate it with SQ Blaster (or one of it's channels), but still no actions are available under scenes/advanced.



As a workaround, and because I control my IR devices via luup code only (no UI involved), it would be fine if, for example, luup.call_action( "urn:squareconnect-com:serviceId:PlaceHolderAV1", "CHANNEL UP", {}, 73 ) would work, with 73 representing the id of the IR device to be controlled. Unfortunately it doesn't...

To further test the plugin, I tried to use luup.call_action( "urn:micasaverde-com:serviceId:IrTransmitter1", "SendProntoCode", {ProntoCode="code"}, 67 ), with 67 representing the SQ Blaster plugin id. It doesn´t work, until I manually replace "I_SQBlasterController1.xml" by "I_SQBlaster1.xml", as described at http://forum.micasaverde.com/index.php/topic,10251.msg71419.html#msg71419.

Then, I can directly send pronto codes to the blaster, but I still can't address channels 1 to 4, so not even this workaround (of a workaround...) is good enough.


Every minute, my Vera logs the attached information. Not sure what it means...


@guessed, can you help ?
« Last Edit: April 30, 2012, 11:34:28 am by vascodp »