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

Offline tbever

  • Sr. Newbie
  • *
  • Posts: 40
  • Karma: +0/-0
Re: Luup Plugin: SQBlaster interface
« Reply #30 on: April 23, 2011, 08:50:33 pm »
Rather than admitting defeat, I was able to set up a work around.

I created a new room (LG Air Conditioner) and created 3 separate scenes, ie Power off, Power on/off and Set temp 74 Cool Fan1 (a preconfigured code that Mat captured from the remote).  I just set up the IR-Blaster-Room to send out a direct Pronto code to the A/C for each scene and that worked fine.  This will probably serve my needs until I can figure things out a little better.

Offline guessed

  • Master Member
  • *******
  • Posts: 5294
  • Karma: +90/-22
  • Release compat is not a bolted-on afterthought
Re: Luup Plugin: SQBlaster interface
« Reply #31 on: April 23, 2011, 09:05:03 pm »
Try these, the others had some sort of DOS characters in them, which I hadn't noticed when I edited them last time and these were breaking MiOS parsing somehow.  Not sure how they got in since they don't appear to be in the devxxxxxx.xml file, so they should not have generated into the [original] D_ and I_ files.

Offline tbever

  • Sr. Newbie
  • *
  • Posts: 40
  • Karma: +0/-0
Re: Luup Plugin: SQBlaster interface
« Reply #32 on: April 24, 2011, 12:40:32 am »
Excellent!  Thanks guessed! That did the trick.

I did have to create a variable to link the device to the IR-Blaster-room device using your other instructions, and after that everything worked like a champ!  I was busting my brains trying to figure out what I did wrong.  I was using microsoft visual studio 2005 Tools for applications to edit the xml files but I must have screwed it up somehow.

Tomorrow I will try to fill out the IRl commands a bit and see if I can get some of the longer states ie 74 Cool F1 working.

Offline tinkerdoctor

  • Sr. Newbie
  • *
  • Posts: 31
  • Karma: +0/-0
Re: Luup Plugin: SQBlaster interface
« Reply #33 on: May 19, 2011, 10:19:56 am »
Any Progress?  I am in the process of building an house using mini splits. 

Offline guessed

  • Master Member
  • *******
  • Posts: 5294
  • Karma: +90/-22
  • Release compat is not a bolted-on afterthought
Re: Luup Plugin: SQBlaster interface
« Reply #34 on: May 19, 2011, 09:53:51 pm »
@tinkerdoctor,
The stubs above will do the Off (Discrete), and On/Off (Toggle) for the specific model of AirCond that was being used (an LG). 

Technically the other commands of the AirCond could be generated, and manually "assigned" to various AV-based IR Controls, but there's no "standard" for IR commands at this time, so the tool has no-where to map them when it brings them over to Vera.

What are you specifically looking for in terms of control of your units?

Offline SquareConnectMat

  • Moderator
  • Full Member
  • *****
  • Posts: 248
  • Karma: +0/-0
Re: Luup Plugin: SQBlaster interface
« Reply #35 on: May 22, 2011, 08:12:06 pm »
What brand/model of mini-splits are you planning on using?

Mat

Offline tinkerdoctor

  • Sr. Newbie
  • *
  • Posts: 31
  • Karma: +0/-0
Re: Luup Plugin: SQBlaster interface
« Reply #36 on: June 07, 2011, 08:35:03 pm »
I have missed the reply.
At this stage I don’t know yet.  Cost and efficiency are the most important.  By the way the house is in Mexico.  I am considering either SQBlaster or an appliance module (with possible relay for 220V) for just on off (I ransack all local RS within 30miles)

Offline SquareConnectMat

  • Moderator
  • Full Member
  • *****
  • Posts: 248
  • Karma: +0/-0
Re: Luup Plugin: SQBlaster interface
« Reply #37 on: June 08, 2011, 02:56:02 am »
We have a dealer in Mexico who I know has successfully recorded most of the air conditioner brands available in Mexico. If you email me at mat @ squareconnect.com, I'll connect you...


Mat

Offline drag0n

  • Full Member
  • ***
  • Posts: 130
  • Karma: +1/-1
Re: Luup Plugin: SQBlaster interface
« Reply #38 on: November 21, 2011, 10:19:03 am »
These instructions are great.
I've successfully created a device for my Air Conditioner, with 3 commands: POWER ON, POWER OFF and Power on cool.
See attached xml files.  I can now use vera scenes to control my Aircon through sq blaster.

I would like this device to be recognized as a standard switch, so that I can use dashboard and ivera to turn it ON/OFF without the need to use scenes.

Can anyone suggest what needs to be changed in the device definition in order for it to be treated like a binary light switch?
_____________________________________
Vera Lite, Remotec Z-URC 550, MiniMote, TKB TZ66D, TKB TZ-71, ZXT-120, ACT ZRP200 , SmartSwitch, Quad Relay, Poly Lock & Poly Pad, SQ Blaster & SQ Blaster+, HMS100, Everspring SF812, Current Cost EnviR, RFXtrx, RollerTrol , Flamingo FA20RF

Offline guessed

  • Master Member
  • *******
  • Posts: 5294
  • Karma: +90/-22
  • Release compat is not a bolted-on afterthought
Re: Luup Plugin: SQBlaster interface
« Reply #39 on: November 21, 2011, 11:45:01 pm »
Can anyone suggest what needs to be changed in the device definition in order for it to be treated like a binary light switch?
In theory, you'd add the BinarySwitch1 ServiceId and you'd then put in a little Lua to "wire" the Light events to call the corresponding IR calls.

In practice, this is a little more complex because most Control points (and the Dashboard itself) won't cleanly recognize it as a switch if you do that.

One approach to this is to add Luup Startup Logic that creates a Child device, using the standard luup.chdev methods, but have the Parent (IR) device handle all of the events of the Child (<handleChildren>1</handleChildren> in D_SQdev1401130560.xml)

eg. basic device creation example from the Weather code http://code.mios.com/trac/mios_weather/browser/trunk/I_GoogleWeather.xml#L264
eg. handleChildren example from the RFXCOM code http://code.mios.com/trac/mios_rfxcom/browser/D_RFXCOM.xml#L18

Then add <action> blocks for the Switch events, this would look like the following, and be put into the IR device implementation file (I_SQdev1401130560.xml):

eg. <action> block for urn:upnp-org:serviceId:SwitchPower1 from the RFXCOM code http://code.mios.com/trac/mios_rfxcom/browser/I_RFXCOM.xml#L1149

Then implement if... then... else logic, along with luup.call_action(...) to invoke the various handlers on the Parent to send the IR commands.

if (lul_settings.newTargetValue == "1") then
    luup.call_action("urn:micasaverde-com:serviceId:DiscretePower1", "On", {}, PARENT_DEVICE)
else
    luup.call_action("urn:micasaverde-com:serviceId:DiscretePower1", "Off", {}, PARENT_DEVICE)
end



That's not all of it, but it'll get you a good starting point to experiment with ...  8)

Offline mcvflorin

  • Administrator
  • Hero Member
  • *****
  • Posts: 1759
  • Karma: +11/-3
Re: Luup Plugin: SQBlaster interface
« Reply #40 on: January 30, 2012, 08:32:14 am »
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.
« Last Edit: January 30, 2012, 08:47:07 am by mcvflorin »

Offline guessed

  • Master Member
  • *******
  • Posts: 5294
  • Karma: +90/-22
  • Release compat is not a bolted-on afterthought
Re: Luup Plugin: SQBlaster interface
« Reply #41 on: January 30, 2012, 11:06:42 pm »
Thanks!

Offline guessed

  • Master Member
  • *******
  • Posts: 5294
  • Karma: +90/-22
  • Release compat is not a bolted-on afterthought
Re: Luup Plugin: SQBlaster interface
« Reply #42 on: February 01, 2012, 01:45:01 am »
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?

Offline SquareConnectJohn

  • Moderator
  • Full Member
  • *****
  • Posts: 171
  • Karma: +1/-0
Re: Luup Plugin: SQBlaster interface
« Reply #43 on: February 01, 2012, 03:15:39 pm »
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
Square Connect Co-Founder

Offline guessed

  • Master Member
  • *******
  • Posts: 5294
  • Karma: +90/-22
  • Release compat is not a bolted-on afterthought
Re: Luup Plugin: SQBlaster interface
« Reply #44 on: February 01, 2012, 03:25:54 pm »
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
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.