SQ Blaster Plugin, http requests too fast ?

Thanks for publishing.

I’ve only ever done the IR stuff using [tt][/tt] blocks with Lua or code-generate [tt][/tt] blocks with embedded Pronto codes. These seem to run fine, in single-tests as well as in composite (scenes) scenarios… at least I haven’t had any trouble with them (yet)

but the jobs here are all related to the same device, so logically the order of execution should be kept.

The [tt]job[/tt] stuff hasn’t got a clear definition for what happens within a single device, or across devices, when it’s called rapidly. Personally, I’d like to be able to have multiple concurrent jobs in a single Device (for concurrent execution) so I can see both “needs” here.

[tt][/tt] has generally been a safe bet, given it’s guaranteed ordering, but with the downside of blocking the Control Point during execution.

You mentioned previously that your [tt][/tt] blocks were crashing. Can you explain what you’re seeing when you switch from [tt][/tt] to [tt][/tt]?

Side-notes…
Looking at your code, you might be interested in:
http://code.mios.com/trac/mios_sqblaster/browser/trunk/I_SQBlasterController1.xml

It’s a code-generator that converts source IR files (this case in SQBlaster format) on the fly into MiOS format [tt]D_.xml[/tt]/[tt]I_.xml[/tt] files, and then instantiates them as child devices. It’s not fully functional just yet, but might give you some code snippets to do the file loading/parsing (using [tt]string.match()[/tt] with multiple captures, for example) and some stuff about handling the config files in a “standard” location reachable from the UI so folks can upload new ones easily.

Unfortunately the [tt]D_[/tt] and [tt]I_[/tt] files have a “fixed”, compile time, format implementing one or more Services. The UI tends to show “all” actions exposed by any of the Service(s) you implement… which can be annoying when you’re implementing everything from TV’s to Amp’s, through to Blu-Ray players… they all implement loads of Services and you end up implementing them all “just in case”.

The code generator above was done to try and avoid that headache - albeit at the loss of runtime flexability (and code size 8) )

@Roy S

Thanks for sharing your code. Would you mind posting your complete plugin?

You might find LIRC2Luup4SBS (a lirc file to Luup device compiler) interesting (even if you don’t own the HW required):
http://forum.micasaverde.com/index.php?topic=5709.0

@guessed,

When I replace [tt][/tt] with [tt][/tt] blocks, and I execute a few actions, Lua terminates with the following error:

[tt]LuaUPnP Terminated with Exit Code: 245[/tt]

From then on, the only option is to do a full reboot. That’s why I switched to [tt]job[/tt] blocks.
I will try to think of a solution to eliminate the order problem (maybe add more delays ??? …).

Meanwhile, thanks for the tip about SQBlasterController. I might use it as I want to develop a user friendly web interface to generates the IR Code files used by my plugin (Will use the SQ Blaster IR learning API ).

@Ap15e,

I’ve attached the plugin files. I’m not sure they can be of any use to anyone at the moment, but they can definitely be tweaked. I’ve also attached an IR Pronto Codes file (needs to be unzipped) as an example (Samsung Plasma TV model no PS50C430A1XTW).