We have moved at community.getvera.com

Author Topic: Luup plugin TV with SQ Blaster plugin  (Read 7315 times)

Offline Maartenvt

  • Full Member
  • ***
  • Posts: 146
  • Karma: +0/-0
Luup plugin TV with SQ Blaster plugin
« on: July 20, 2011, 12:16:23 pm »
Hi all

Maybe a wrong quastion, but i cannot get it to work.

I installed the  SQBlaster as an IR Transmitter Device within Vera. everything ok. Link = http://code.mios.com/trac/mios_sqblaster

I exported my TV Pronto codes from my SQ Remote. But how do i create a LUUP plugin with these set of codes and command to use this from my Vera. Does somebody can explain me or give my a example. I do not understand and get it to work with this page: http://code.mios.com/trac/mios_panasonic-tv

My IR Pronto code are:
<SQCommandInfo key="dev4168673188">
  <device_configuration key="dev4168673188" transport_protocol="IR" name="UPC Digital Media Receiver - Video" manufacturer="UPC" device_type="Digital Media Receiver - Video" location="" gateway_id="sq-blaster-a85c.local" command_protocol="hex" UEIDeviceType="N" ms_delay="500"/>
  <command_info command_name="POWER ON" SQKeyCode="2" ir_data="L28 12500 dc060052 ffad0052 1850052 13100ce 8b0052 de0052 8c1235 25515555 24251250 " SQSource="L" learn_date="326059800.670785" support_ph="true"/>
  <command_info command_name="POWER OFF" SQKeyCode="3" ir_data="L28 12500 dc060052 afef0052 1850052 13100ce 8b0052 de0052 8c9235 25515552 24255150 L28 12500 dc060052 afee0052 1850052 13100ce 8b0052 de0052 8c9235 25515555 24255150 " SQSource="L" learn_date="326059878.145564" support_ph="true"/>
  </SQCommandInfo>

Thanks a lot  :)
Vera Edge (Firmware rev. 1.7.2406), 1x Düwi INTERACT³ light switch, 1x  ZIR010 Motion Sensor.

Offline guessed

  • Community Beta
  • Master Member
  • ******
  • Posts: 5301
  • Karma: +92/-22
  • Release compat is not a bolted-on afterthought
Re: Luup plugin TV with SQ Blaster plugin
« Reply #1 on: July 21, 2011, 01:00:53 am »
For your first go round, try running it through the manual process outlined here :

    http://forum.micasaverde.com/index.php?topic=5734.0

If that doesn't generate a valid I_ xxx.XML, and D_ xxx.XML file, then attach what you get and repost....

Offline guessed

  • Community Beta
  • Master Member
  • ******
  • Posts: 5301
  • Karma: +92/-22
  • Release compat is not a bolted-on afterthought
Re: Luup plugin TV with SQ Blaster plugin
« Reply #2 on: July 22, 2011, 11:24:11 pm »
Did that work, or do you need a hand?

Offline Maartenvt

  • Full Member
  • ***
  • Posts: 146
  • Karma: +0/-0
Re: Luup plugin TV with SQ Blaster plugin
« Reply #3 on: July 25, 2011, 01:37:22 pm »
Thanks for the manual. i will start reading it and try some things.

i will let you know how i did :)
Vera Edge (Firmware rev. 1.7.2406), 1x Düwi INTERACT³ light switch, 1x  ZIR010 Motion Sensor.

Offline Maartenvt

  • Full Member
  • ***
  • Posts: 146
  • Karma: +0/-0
Re: Luup plugin TV with SQ Blaster plugin
« Reply #4 on: July 25, 2011, 03:17:32 pm »
How do i generate the I_ xxx.XML, and D_ xxx.XML file?

I copyd the files from the forum and begin to edit it.

the results:
Vera Edge (Firmware rev. 1.7.2406), 1x Düwi INTERACT³ light switch, 1x  ZIR010 Motion Sensor.

Offline guessed

  • Community Beta
  • Master Member
  • ******
  • Posts: 5301
  • Karma: +92/-22
  • Release compat is not a bolted-on afterthought
Re: Luup plugin TV with SQ Blaster plugin
« Reply #5 on: July 25, 2011, 09:13:01 pm »
The SQBlaster file containing their IR codes, for each of your SQBlaster/SQRemote devices is in XML format (from Box.net)

MiOS requires two files (I_xxx.xml and D_xxx.xml) for each Plugin/Device, these are also in XML format.


The current process involves:

a) having the SQBlaster dev_xxx.xml file for your device (from Box.net)
b) running an XML Transform on the dev_xxx.xml file from SQBlaster, to create the corresponding I_xxx.xml file.
c) running an XML Transform on the I_xxx.xml file from MiOS, to create the corresponding D_xxx.xml file.


The transformation process involves using a XSLT Transform, from a hosted site like:
    http://www.shell-tools.net/index.php?op=xslt  OR;
    http://xslttest.appspot.com/

or from any command-line XSLT Tool if you're more familar with those.



For Step (b) above...
Use the contents of this file for the XSLT input field:
    http://code.mios.com/trac/mios_sqblaster/browser/trunk/xslt/SQBlaster_I.xsl

and the contents of dev_xxx.xml file for the XML input field

Save the result as I_xxx.xml


For Step (c) above...
Use the contents of this file for the XSLT input field:
    http://code.mios.com/trac/mios_sqblaster/browser/trunk/xslt/SQBlaster_D.xsl

and the contents of I_xxx.xml file for the XML input field.

Save the result as D_xxx.xml




NOTE: If you change the file names, note that "xxx" is actually embedded inside the D_xxx.xml file, and this needs to be changed also.

NOTE2: I'll add a Wiki page to discuss how to do it using the Website, and include some screen snippets to better walk folks through it.  I have a fully automated version, but ran into Bugs in MiOS that prevented it from working (it did everything from Plugin creation, Device instantiation, and wiring to SQBlaster within MiOS so it would save all these manual steps.

PS: Looks like my hyperlinks to the XSLT Transform files in this post were out of date, so I updated them:
    http://forum.micasaverde.com/index.php?topic=5734.msg29906
« Last Edit: October 17, 2012, 12:17:29 am by guessed »

Offline guessed

  • Community Beta
  • Master Member
  • ******
  • Posts: 5301
  • Karma: +92/-22
  • Release compat is not a bolted-on afterthought
Re: Luup plugin TV with SQ Blaster plugin
« Reply #6 on: July 25, 2011, 09:20:13 pm »
btw, your hand converted one is close.  It has a few problems:

In the I_xxx.xml file...
a) The first <name>POWER ON</name> should be <name>On</name>
b) The second <name>POWER ON</name> should be <name>Off</name>

In the D_xxx.xml file...
a) You need a Service's section like the following:
Code: [Select]
<serviceList>
    <service>
      <serviceType>urn:micasaverde-com:service:DiscretePower:1</serviceType>
      <serviceId>urn:micasaverde-com:serviceId:DiscretePower1</serviceId>
      <SCPDURL>S_DiscretePower1.xml</SCPDURL>
    </service>
</serviceList>

and eliminate the "blank" <serviceList /> tag

Offline Maartenvt

  • Full Member
  • ***
  • Posts: 146
  • Karma: +0/-0
Re: Luup plugin TV with SQ Blaster plugin
« Reply #7 on: July 26, 2011, 09:51:30 am »
Thank you for your reply.

one more question. you talk about the servicelist, <SCPDURL>S_DiscretePower1.xml</SCPDURL>

Do i need to create these files? S_DiscretePower1.xml

and if yes, what should be inside thes files.
Vera Edge (Firmware rev. 1.7.2406), 1x Düwi INTERACT³ light switch, 1x  ZIR010 Motion Sensor.

Offline guessed

  • Community Beta
  • Master Member
  • ******
  • Posts: 5301
  • Karma: +92/-22
  • Release compat is not a bolted-on afterthought
Re: Luup plugin TV with SQ Blaster plugin
« Reply #8 on: July 26, 2011, 10:24:58 am »
No need to create that one, it's part of the standard set that ships with MiOS.

Offline Maartenvt

  • Full Member
  • ***
  • Posts: 146
  • Karma: +0/-0
Re: Luup plugin TV with SQ Blaster plugin
« Reply #9 on: July 26, 2011, 11:59:23 am »
Great, thanks.

I get this icon on my device. is this ok? it is not the IR icon
Vera Edge (Firmware rev. 1.7.2406), 1x Düwi INTERACT³ light switch, 1x  ZIR010 Motion Sensor.

Offline guessed

  • Community Beta
  • Master Member
  • ******
  • Posts: 5301
  • Karma: +92/-22
  • Release compat is not a bolted-on afterthought
Re: Luup plugin TV with SQ Blaster plugin
« Reply #10 on: July 27, 2011, 01:48:38 am »
Yup, each IR Device has an ugly [what is that?] icon unless a specific .json is built for it.... which seems like overkill. 

You can test the device itself using SQRemote, or using a direct MiOS URL of the form:

On...
    http://192.168.x.x:49451/data_request?id=lu_action&DeviceNum=yyy&serviceId=urn:micasaverde-com:serviceId:DiscretePower1&action=On

Off...
    http://192.168.x.x:49451/data_request?id=lu_action&DeviceNum=yyy&serviceId=urn:micasaverde-com:serviceId:DiscretePower1&action=Off

... with appropriate substitutions for x.x and yyy, based upon your specific deployment.