Luup Plugin: SQBlaster interface

I commited (created tag) and published version 0.21 which includes an updated doc_url, with a link to the code.mios.com Trac page.

Edit: apps.mios.com plugin ownership given to guessed.

Thanks!

As part of preparing for the release of the SQBlaster Plus, I’m making modifications to the SQBlaster Plugin to handle it’s new functionality.

Per the spec sheet published on http://squareconnect.com, the new Blaster will have 5 channels of IR… one built in (like the original) in addition to 4 individually addressable discrete IR channels.

So far, I’ve modded my Plugin code to create these 4 extra IR channels, and expose them as extra Devices, with the following characteristics, but I’d like comments on what people are expecting:

a) You still have the original “Parent” device, and it’ll show in all the MiOS IrTransmitter dropdowns
b) The new children all have the flags set to force the child devices into the same Room as the Parent blaster, they cannot be moved around
c) The children all have titles of IR Channel 1, …, IR Channel 4 … on the assumption that the Parent is IR Channel Main or whatever.
d) These children only appear if you have a SQBlaster Plus (to make it transparent to the 1st generation SQBlaster users)

I think this is all reasonable behavior except, I’m not sure if people think about it being IR Channel 1…4, or IR Channel 2…5, IR Aux Channel 1…4 (etc) since the “Parent” is really the first channel.

I’m leaning towards changing the child titles to IR Aux Channel 1…4, as these are user-changeable anyhow, and relaxing the restriction so these devices can be placed in any room.

Anyone have a strong feeling one way or another?

Just a note to say that channel 0 is also a true channel, in that if you select channel 1… you will get no IR out of the body of the blaster… its not Main Channel + selected channel… its channel 0, 1, 2, 3 OR 4.

You might want to relax the room constraint as there may be needs to cable through to different rooms.

John

[quote=“SquareConnectJohn, post:44, topic:167682”]Just a note to say that channel 0 is also a true channel, in that if you select channel 1… you will get no IR out of the body of the blaster… its not Main Channel + selected channel… its channel 0, 1, 2, 3 OR 4.

You might want to relax the room constraint as there may be needs to cable through to different rooms.

John[/quote]
Hey John,
I’m not worried about the internal representation, as I have that sorted and I understand these channels are not linked in any way. I’m trying to sort out appropriate labelling/nomenclature that makes sense for a typical user when they see these on the MiOS Dashboard.

Per the picture, a SQBlaster Plus user will get [independent] 5 devices on their Dashboard, and in the related MiOS Dropdown/Picklists. The first one is effectively Channel “0”, then the others represent channel’s 1,2,3,4 (Internally, from a Blaster perspective)

I want to ensure that people get the correct idea that “Channel 1” isn’t the built in one, since “Channel 0” is kinda a programming construct, more than a user one. I’m leaning to using labels like IR AUX Channel 1…4 for the extra independent channels

I’ll relax the room construct.

@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.

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 [tt]SQKeyCode[/tt] from “0” to “3” when [tt]command_name=“Close”[/tt]
a) the [tt]SQKeyCode[/tt] from “0” to “1” when [tt]command_name=“Open”[/tt]

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 [tt]SQKeyCode[/tt] 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 [tt]devxxxxxxx.xml [/tt]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.

… and here is:

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

@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

@ehillis,
They generated correctly. There is no JSON file, as there’s no UI for a [tt]IR Device[/tt].

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 [tt]I_xxx.xml[/tt] and [tt]D_xxx.xml[/tt] 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.

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

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…

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.

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.

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.

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 SQBlaster and read through this thread but still have no idea. Sorry for my 101 question.

@manfaiho,
It sounds like you’ve already done step (d.3) from here:
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 [tt]devxxxxxxx.xml[/tt] file, your derived [tt]I_xxxxxx.xml[/tt] and [tt]D_xxxxxxx.xml[/tt] 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)

Thank you so much :slight_smile:

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?

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 :slight_smile:

@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 ?