Author Topic: Return values on all <job> tags in DLNA Plugin  (Read 1655 times)

Offline guessed

  • Master Member
  • *******
  • Posts: 5293
  • Karma: +90/-22
  • Release compat is not a bolted-on afterthought
Return values on all <job> tags in DLNA Plugin
« on: December 09, 2014, 05:30:18 pm »
@lolodomo,
I'm helping to diagnose some Vera Lite instability that another user is experiencing and, in the process, I noticed that Vera is emitting warnings about the Job tags in the DLNA Plugin:

These log lines look like:
Code: [Select]
LuaUPnp.log.1.log-25 12/09/14 7:02:18.237 LuaInterface::CallFunction_Job device 4 function SDLNAMediaController1_DLNAMediaController1_NotifyAVTransportChange_job didn't return a value <0x2b32a000>
LuaUPnp.log.1.log-25 12/09/14 7:02:18.263 LuaInterface::CallFunction_Job device 4 function SDLNAMediaController1_DLNAMediaController1_NotifyRenderingChange_job didn't return a value <0x2b32a000>

I took a look at the code in source-control and it looks like you're missing code at the end of the <job> Tags that would look along the lines of:

Code: [Select]
  <job>
    ...
    return 4,1
  </job>

To eliminate this as a potential cause, do you mind adding this to the end of your <job> tags?   I've seen at least one case where Vera misbehaved when the right parameters, or right # of parameters, weren't returned from these tag-based codepoints.

If nothing else, it'll stop these log entries from being emitted.

Offline lolodomo

  • Moderator
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
Re: Return values on all <job> tags in DLNA Plugin
« Reply #1 on: December 09, 2014, 07:13:09 pm »
I will check/update that.
We could have the same thing in the Sonos plugin too.

Offline guessed

  • Master Member
  • *******
  • Posts: 5293
  • Karma: +90/-22
  • Release compat is not a bolted-on afterthought
Re: Return values on all <job> tags in DLNA Plugin
« Reply #2 on: December 09, 2014, 08:33:36 pm »
I will check/update that.
We could have the same thing in the Sonos plugin too.

Thanks, appreciated.  At this point I'm just looking to reducing the variables in the diag.   Hopefully the changes will also net some stability ;)

Offline lolodomo

  • Moderator
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
Re: Return values on all <job> tags in DLNA Plugin
« Reply #3 on: December 10, 2014, 04:34:12 am »
I can confirm there is no return in Sonos plugin too.

The first value is the job status and has to be set to 4 if the job is done. But what value to set for the second value that seems to be a timeout. What is its role ?
« Last Edit: December 10, 2014, 04:37:44 am by lolodomo »

Offline futzle

  • Beta Testers
  • Master Member
  • *****
  • Posts: 3250
  • Karma: +189/-9
Re: Return values on all &lt;job&gt; tags in DLNA Plugin
« Reply #4 on: December 10, 2014, 04:38:56 am »
Here: http://wiki.micasaverde.com/index.php/Luup_Plugins_ByHand

My plugins have only ever used 2, 4 and 5.

Offline lolodomo

  • Moderator
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
Re: Return values on all <job> tags in DLNA Plugin
« Reply #5 on: December 27, 2014, 03:34:21 pm »
Code: [Select]
  <job>
    ...
    return 4,1
  </job>

Is it ok with a "return 4,0" ? I don't understand the need for a 1s timeout when returning "Done".

Offline guessed

  • Master Member
  • *******
  • Posts: 5293
  • Karma: +90/-22
  • Release compat is not a bolted-on afterthought
Re: Return values on all &lt;job&gt; tags in DLNA Plugin
« Reply #6 on: December 27, 2014, 03:42:05 pm »
Sure, that's fine.  I'd assume the second argument is ignored when the first argument is 4... But sometimes you never know what they've coded :)

Offline lolodomo

  • Moderator
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
Re: Return values on all &lt;job&gt; tags in DLNA Plugin
« Reply #7 on: December 27, 2014, 04:55:19 pm »
Sure, that's fine.  I'd assume the second argument is ignored when the first argument is 4... But sometimes you never know what they've coded :)

Ok thank you.
I am preparing a new version of the DLNA plugin (and  the Sonos plugin).

Offline guessed

  • Master Member
  • *******
  • Posts: 5293
  • Karma: +90/-22
  • Release compat is not a bolted-on afterthought
Re: Return values on all <job> tags in DLNA Plugin
« Reply #8 on: December 27, 2014, 07:17:46 pm »
Thanks @lolodomo, appreciate the effort. 

When it's in the apps store, I'll get confirmation of the (Vera) log lines being cleared out of the users setup.