How to debug a service addon (find out why it isn't auto starting)

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Wingie Online
Junior Member
Posts: 48
Joined: Dec 2009
Reputation: 0
Post: #1
The last two days i've been working on making the AIRPLAY/SHAIRPORT add-on made by ultraman work on the RC5 release of OPENELEC (Dharma 10.1 release). I've got it working by starting the python script by hand but like to have it work so that XBMC will autostart it on startup/login as supposed for a service add-on.

But I haven't got a clue anymore where to look, have had a look at the
/var/log/messages file and xbmc/temp/xbmc.log but nothing strange in here.
Code:
20:35:48 T:139837869422720 M:1471664128   DEBUG: ADDON: cpluff: 'Plug-in service.multimedia.shair-player has been installed.'

The add-on has been installed but isn't running.

For reference, this is the addon.xml:
Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="service.multimedia.shair-player"
       name="shair-player"
       version="0.99.5"
       provider-name="openelec.tv">
  <requires>
    <import addon="os.openelec.tv" version="0.99"/>
    <import addon="xbmc.python" version="1.0"/>
  </requires>
  <extension point="xbmc.service"
             library="default.py" start="startup">
        <provides>executable</provides>
  </extension>
  <extension point="xbmc.addon.metadata">
    <summary>ShairPort and Airplayer</summary>
    <description>
Airplayer is a script to make media playing software Airplay-compatible. Airplayer features pluggable backends, making it possible to support different media players.
shairport emulates an AirPort Express for the purpose of streaming music from iTunes and compatible iPods. It implements a server for the Apple RAOP protocol. ShairPort does not support AirPlay v2 (video and photo streaming).
    </description>
    <platform>all</platform>
  </extension>
</addon>

This the contents of the default.py
Code:
import xbmc, time, os, subprocess

os.system("shair-player.service")

Is there a way to debug an ADDON to see what's going wrong during execution?

If you need more info just let me know.

For completeness here are my pastebins for
dmesg pastebin.com/UVBPsZwX
lsmod pastebin.com/1ytEhhMX
full xbmc.log pastebin.com/k1mEHk6z
(This post was last modified: 2011-08-14 20:51 by Wingie.)
find quote
giftie Online
Skilled Python Coder
Posts: 2,363
Joined: Mar 2010
Reputation: 54
Location: Calgary, Alberta
Post: #2
Wingie Wrote:The last two days i've been working on making the AIRPLAY/SHAIRPORT add-on made by ultraman work on the RC5 release of OPENELEC (Dharma 10.1 release). I've got it working by starting the python script by hand but like to have it work so that XBMC will autostart it on startup/login as supposed for a service add-on.

But I haven't got a clue anymore where to look, have had a look at the
/var/log/messages file and xbmc/temp/xbmc.log but nothing strange in here.
Code:
20:35:48 T:139837869422720 M:1471664128   DEBUG: ADDON: cpluff: 'Plug-in service.multimedia.shair-player has been installed.'

The add-on has been installed but isn't running.

For reference, this is the addon.xml:
Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="service.multimedia.shair-player"
       name="shair-player"
       version="0.99.5"
       provider-name="openelec.tv">
  <requires>
    <import addon="os.openelec.tv" version="0.99"/>
    <import addon="xbmc.python" version="1.0"/>
  </requires>
  <extension point="xbmc.service"
             library="default.py" start="startup">
        <provides>executable</provides>
  </extension>
  <extension point="xbmc.addon.metadata">
    <summary>ShairPort and Airplayer</summary>
    <description>
Airplayer is a script to make media playing software Airplay-compatible. Airplayer features pluggable backends, making it possible to support different media players.
shairport emulates an AirPort Express for the purpose of streaming music from iTunes and compatible iPods. It implements a server for the Apple RAOP protocol. ShairPort does not support AirPlay v2 (video and photo streaming).
    </description>
    <platform>all</platform>
  </extension>
</addon>

This the contents of the default.py
Code:
import xbmc, time, os, subprocess

os.system("shair-player.service")

Is there a way to debug an ADDON to see what's going wrong during execution?

If you need more info just let me know.

For completeness here are my pastebins for
dmesg pastebin.com/UVBPsZwX
lsmod pastebin.com/1ytEhhMX
full xbmc.log pastebin.com/k1mEHk6z

I thought the Service type of addon is for Eden and up.. http://forum.xbmc.org/showthread.php?tid=92751

[Image: e4f63e45ba34fe4695b3bb08eb2499d8e4ee484e...4c076g.jpg]
For troubleshooting and bug reporting please make sure you read this first you can also use XBMC Log Uploader Script.
Cinema Experience
Cinema Experience Wiki
cdART Manager
fanart.tv


find quote
Wingie Online
Junior Member
Posts: 48
Joined: Dec 2009
Reputation: 0
Post: #3
@giftie thank you for that info, I had already had a search in the XBMC WiKi and there it says Dharma.
http://wiki.xbmc.org/index.php?title=Add...evelopment) and service is mentioned here also so I thought it was already available, because even on the separate page about service add-ons Eden isn't mentioned http://wiki.xbmc.org/index.php?title=HOW...g_services

Note to myself: ask questions earlier, this will help you in shorting your time useful in stead of trying to make it work for 3 hours. Big Grin
find quote
giftie Online
Skilled Python Coder
Posts: 2,363
Joined: Mar 2010
Reputation: 54
Location: Calgary, Alberta
Post: #4
Wingie Wrote:@giftie thank you for that info, I had already had a search in the XBMC WiKi and there it says Dharma.
http://wiki.xbmc.org/index.php?title=Add...evelopment) and service is mentioned here also so I thought it was already available.

Note to myself: ask questions earlier, this will help you in shorting your time useful in stead of trying to make it work for 3 hours. Big Grin

Sometimes people get a little ahead of themselves when it comes to very desired features...

[Image: e4f63e45ba34fe4695b3bb08eb2499d8e4ee484e...4c076g.jpg]
For troubleshooting and bug reporting please make sure you read this first you can also use XBMC Log Uploader Script.
Cinema Experience
Cinema Experience Wiki
cdART Manager
fanart.tv


find quote