We have moved at community.getvera.com

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

Offline guessed

  • Community Beta
  • Master Member
  • ******
  • Posts: 5301
  • Karma: +92/-22
  • Release compat is not a bolted-on afterthought
Re: Luup Plugin: SQBlaster interface
« Reply #75 on: May 16, 2012, 01:07:10 am »
I can't test it at the moment, but this should do the same thing:
    http://code.mios.com/trac/mios_sqblaster/changeset/46/?format=zip&new=46

The change involves is similar to @blargyblarg's, but instead completely removes the "S_IrTransmitter1.xml" parameter from both luup.chdev.append() calls, passing "" instead, and defining the <handleChildren> element in the D_SQBlaster1.xml file to instruct it to call the parent device code when needed.

Not sure why the original was working on UI4, which is where I tested it, and not under UI5.  Once I restore my SQBlaster+ unit, and test it under UI5, I'll push the above changes more formally to apps.mios.com.

Offline guessed

  • Community Beta
  • Master Member
  • ******
  • Posts: 5301
  • Karma: +92/-22
  • Release compat is not a bolted-on afterthought
Re: Luup Plugin: SQBlaster interface
« Reply #76 on: May 25, 2012, 02:39:50 am »
These changes, along with the one for Temperature in Celsius, have been pushed to apps.mios.com tonight.  They're pending approval, but will be automatically deployed once they're approved (to UI5 users)

For UI4 Users, there's a new TAG (0.32) that has the revised files also:
    http://code.mios.com/trac/mios_sqblaster/browser/tags/0.32

The ZIP download link is at the bottom of that page, with the link:
    http://code.mios.com/trac/mios_sqblaster/changeset/48/tags/0.32?old_path=%2F&format=zip

Offline santoal

  • Newbie
  • *
  • Posts: 17
  • Karma: +0/-0
Re: Luup Plugin: SQBlaster interface
« Reply #77 on: June 03, 2012, 10:18:05 am »
Hi
I've been trying to follow this thread and resolve my issue but with no success. Like above, I can add devices by the commands do not appear on the advanced tab when creating a scene. Sometimes I get the error "Invalid Json for device..."
Details below...
Device: 12 V LED dimmers with IR Remote

Imported xml files from SQ Remote and used XSLT to transform resulting with the attached files. All commands are learnt with SQKeyCode = "0" (not sure if this is the issue).

IR Transmitter plugin works ok in Mios UI4 having added Samsung remote successfully from online catalogue.

Using notepad in Windows 7 with save as "ANSI".

Any hep appreciated. Thanks
« Last Edit: June 03, 2012, 10:20:06 am by santoal »

Offline guessed

  • Community Beta
  • Master Member
  • ******
  • Posts: 5301
  • Karma: +92/-22
  • Release compat is not a bolted-on afterthought
Re: Luup Plugin: SQBlaster interface
« Reply #78 on: June 03, 2012, 10:56:52 am »
@santoal,
It looks like all of the codes in the original dev569779581.xml file are learned.  In this case, all will have SQKeyCode=0, and there's no obvious way to provide a mapping.

When there's no mapping, I put them all into a "Placeholder" ServiceId called urn:squareconnect-com:serviceId:PlaceHolderAV1.  There are only mappings for AV gear, since that's the interface that MiOS provides for IR-based stuff.

You'll see that in the I_LEDRemote.xml has a bunch of these. 

If you want to try something basic, you can manually map the 0%/100% codes to something like DiscretePower1's Off/On actions. 

In the I_LEDRemote.xml, for 100%, this would look like:
Code: [Select]
    <action>
      <serviceId>urn:micasaverde-com:serviceId:DiscretePower1</serviceId>
      <name>On</name>
      <sqblaster command_name="POWER ON" SQKeyCode="2"/>
      <ir>L1b 11800 d2832425 55555554 44444445 44545554 55454441 30823000 L1b 11800 d3832425 55555554 44444445 44545554 55454441 30823000 </ir>
    </action>

And you'd need to add the following to the D_LEDRemote.xml file:
Code: [Select]
      <service>
        <serviceType>urn:micasaverde-com:service:DiscretePower:1</serviceType>
        <serviceId>urn:micasaverde-com:serviceId:DiscretePower1</serviceId>
        <SCPDURL>S_DiscretePower1.xml</SCPDURL>
      </service>

Offline santoal

  • Newbie
  • *
  • Posts: 17
  • Karma: +0/-0
Re: Luup Plugin: SQBlaster interface
« Reply #79 on: June 04, 2012, 11:06:41 am »
Thanks... that has worked perfectly for the 100%.
Where can I find a list of standard AV functions for mapping other learned commands?

Offline guessed

  • Community Beta
  • Master Member
  • ******
  • Posts: 5301
  • Karma: +92/-22
  • Release compat is not a bolted-on afterthought
Re: Luup Plugin: SQBlaster interface
« Reply #80 on: June 04, 2012, 11:15:55 am »
The definitions are scattered inside the various S_*.xml files on your Vera unit.  Probably the easiest way to see some of the more common ones are to look at the source code of a few AV Plugins on http://code.mios.com

The S_*.xml define the ACTION names to use, but you have to glean the ServiceId's from other files.  It's a bit painful (no real doc here either) so it's sometimes easier to look at the working examples.  The downside is that they don't always exercise all of the potential ACTIONS from each of the S_*.xml files, just the common ones.

Offline vascodp

  • Sr. Newbie
  • *
  • Posts: 41
  • Karma: +0/-0
Re: Luup Plugin: SQBlaster interface
« Reply #81 on: June 12, 2012, 09:01:10 am »

My Vera got unstable, so I took a look at the logs and found two issues (among others) related with the Sonos plugin:
 
1. Every minute, the plugin logs several messages (log1.txt), but one of those has log level 1, so I guess it's an error. However, It's not explicit enough, so I don't know what it means... Is there something wrong with my configuration ? Is it due to the temperature being reported in fareneight ?
 
2. Plugin #188 fails to load. After rebooting, UI5 shows "Loading plugin #188" for a minute. The log shows the associated error. According to http://forum.micasaverde.com/index.php/topic,9052.msg59279.html#msg59279 It doesn't seem to be required at UI5, but the instructions for it's removal refer to a hidden plugin, and my SQ Blaster plugin, as well as the 4 independent IR channel plugins (using S Blaster plus) are visible at the interface. Should I remove as explained under the refered link ?

@guessed, is the new changeset, published at May 24, already avaliable ?

Offline guessed

  • Community Beta
  • Master Member
  • ******
  • Posts: 5301
  • Karma: +92/-22
  • Release compat is not a bolted-on afterthought
Re: Luup Plugin: SQBlaster interface
« Reply #82 on: June 12, 2012, 09:22:45 am »
The latest code samples the blaster every minute, to get Temperature readings from SQBlaster+ models.  This is logged at log level 1, not for any valid reasoning other than I like it to stand out in the logs ;)

You don't mention the specifics of what your seeing wrong, so I can't tell if it's this, or something else.



#188 is a long standing issue wit the SQRemote Plugin that MCV didn't automatically cleanup during UI5 upgrade.  It's benign and, in theory, can be cleaned up using a technique that @mcvflorin posted in one of the threads here.  I'm waiting for them to automatically clean it up, as CTs shouldn't have to do that upon product upgrade.

I can't tell If the 0.32 build is in apps.mios.com, as the site is erroring with a full screen SQL syntax error (no testing?)

 I suspect it is there, I just can't check it right now.

Offline drag0n

  • Full Member
  • ***
  • Posts: 130
  • Karma: +1/-1
Re: Luup Plugin: SQBlaster interface
« Reply #83 on: June 12, 2012, 03:26:34 pm »

Should I remove as explained under the refered link ?

To get rid of the plugin #188 error message, you have to search and delete  the SQ Remote device (which is hidden), not the SQ Blaster devices which are visible and should remain intact.
http://forum.micasaverde.com/index.php/topic,9052.msg59279.html#msg59279
_____________________________________
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 vascodp

  • Sr. Newbie
  • *
  • Posts: 41
  • Karma: +0/-0
Re: Luup Plugin: SQBlaster interface
« Reply #84 on: June 14, 2012, 06:16:35 pm »

@guessed, I see nothing wrong with the plugin, except that the log level is 1. Besides, you deserve to stand out in the logs every minute  ;)

@dragon, guessed, my mistake for confusing SQ Remote with SQ Blaster. I used mcvflorin's technique and got rid of it  :D



Offline guessed

  • Community Beta
  • Master Member
  • ******
  • Posts: 5301
  • Karma: +92/-22
  • Release compat is not a bolted-on afterthought
Re: Luup Plugin: SQBlaster interface
« Reply #85 on: June 14, 2012, 11:41:01 pm »
@guessed, I see nothing wrong with the plugin, except that the log level is 1. Besides, you deserve to stand out in the logs every minute  ;)
I've made mods to the code to move messages into better buckets. 

50 ... SQBlaster: ... Startup, and the periodic updates go into level=50
35 ... SQBlaster: ... debug: Debug now go into level=35
01 ... SQBlaster: ... error: Errors go into an error level=1 (red)

The periodic processing now goes into level 50, the first bucket, so they won't be red anymore, but they are still emitted.
Errors, like not being able to contact the SQBlaster are now errors, and will appear red in the log files.

When  we have a reasonable set of changes to bundle, these will be put into apps.mios.com (etc) but for now they're just untested in trunk.

Offline Weeves

  • Jr. Member
  • **
  • Posts: 61
  • Karma: +1/-0
Re: Luup Plugin: SQBlaster interface
« Reply #86 on: May 01, 2013, 10:11:57 am »
New to this, but am I right in thinking that if you parsed the devxxx.xml file into D_xxx.xml, I_xxx.xml and S_xxx.xml, and linked them correctly inside, you would end up with a device that exposed services for all IR codes in the devxxx file (and no extras)?

If so, what would be the disadvantage against using the "standard" service interfaces?

Offline guessed

  • Community Beta
  • Master Member
  • ******
  • Posts: 5301
  • Karma: +92/-22
  • Release compat is not a bolted-on afterthought
Re: Luup Plugin: SQBlaster interface
« Reply #87 on: May 01, 2013, 11:12:58 am »
New to this, but am I right in thinking that if you parsed the devxxx.xml file into D_xxx.xml, I_xxx.xml and S_xxx.xml, and linked them correctly inside, you would end up with a device that exposed services for all IR codes in the devxxx file (and no extras)?

If so, what would be the disadvantage against using the "standard" service interfaces?
More or less, except I don't create the S_xxx.xml file, it would be pointless since Vera's UI is really just for setup, not for use (in practice)

By implementing MCVs AV/IR services, control points can know what to expect when calling the device.  Right now, SQRemote and the built in HTML/Image one are the only control points that do, but it means they can pickup and work with the Devices directly.

Like anything, you can always go custom, but then the control points won't know how to call you.  It be akin to everyone building their own 'switch' service, no one would be able to call it.

Offline Pestus

  • Full Member
  • ***
  • Posts: 122
  • Karma: +2/-0
Re: Luup Plugin: SQBlaster interface
« Reply #88 on: May 29, 2013, 12:46:22 pm »
Hello all.  I've been using the Vera for lighting, locks, alarm and HVAC for awhile now.  Thanks to help from Guessed and his fantastic drivers, I've got a great platform.

My next project is integrating audio/visual.  I've been looking at the SQ Blaster Plus, and I am pleased to see so much activity on this forum in regards to custom setups and troubleshooting.

My main question is the disturbing lack of Android support for the native apps.  I note the presence of aftermarket apps made by other people..  but is an apple handheld mission critical to use or install this device properly?  Will I lose any functionality or whatnot if I don't use the first party iOS apps?  I'd rather not spend the many hours and the money to learn the system, if I'd be limited by OS support.

My second question is I can't seem to find a database of compatible IR devices.  I'm looking for a cheap media box that has XBMC support.  I'm considering something like the G-Box Midnight MX2, or the Ouya if they ever get their act together. (And someone comes up with an IR dongle arrangement)  Anyone know how the IR support is for some of the newer more exotic computers?

Thanks in advance!

Offline Ruetech

  • Full Member
  • ***
  • Posts: 147
  • Karma: +1/-2
Re: Luup Plugin: SQBlaster interface
« Reply #89 on: September 19, 2015, 07:12:08 pm »
Can someone please point me towards the xls files that I'm supposed to run through the transform process with my xml files for the devices. When I try to follow the links it says they are private and I need to login. Thanks in advance.