The Vera Community forums have moved!

Advanced => Plugins & Plugin Development => Programming => DLNA Media Controller plugin => Topic started by: guessed on December 09, 2014, 05:30:18 pm

Title: Return values on all <job> tags in DLNA Plugin
Post by: guessed 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> (http://wiki.micasaverde.com/index.php/Luup_Plugins_ByHand#.3Crun.2Fjob.2Fincoming.2Ftimeout.3E) 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.
Title: Re: Return values on all <job> tags in DLNA Plugin
Post by: lolodomo on December 09, 2014, 07:13:09 pm
I will check/update that.
We could have the same thing in the Sonos plugin too.
Title: Re: Return values on all <job> tags in DLNA Plugin
Post by: guessed 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 ;)
Title: Re: Return values on all <job> tags in DLNA Plugin
Post by: lolodomo 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 ?
Title: Re: Return values on all &lt;job&gt; tags in DLNA Plugin
Post by: futzle 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.
Title: Re: Return values on all <job> tags in DLNA Plugin
Post by: lolodomo 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".
Title: Re: Return values on all &lt;job&gt; tags in DLNA Plugin
Post by: guessed 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 :)
Title: Re: Return values on all &lt;job&gt; tags in DLNA Plugin
Post by: lolodomo 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).
Title: Re: Return values on all <job> tags in DLNA Plugin
Post by: guessed 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.