(7th Jun, 2014 04:59 AM)menakite Wrote: [ -> ]Please try the netcat commands in my previous post
Code:
nc: connect to localhost port 9090 (tcp) failed: Connection refused
Quote:Also ensure JSON-RPC is enabled: http://wiki.xbmc.org/?title=JSON-RPC_API#Enabling_JSON-RPC (TCP/localhost applies to you; you may need to increase the settings level to advanced or expert, not sure)
Can I change that on the commandline?
If not, I'll do that tomorrow. I can't be in front of the TV right now.
That'd translate to editing the XML configuration file by hand, which is highly unsafe. Let's see tomorrow.
Yes if you change xbmc port, it crash,
will have a look there.
for now, you can change port on
/usr/local/sbin/upstart-xbmc-bridge.py
change line 14 with your port,
but it will be erased on next update.
will put it in a config file later.
(7th Jun, 2014 04:59 AM)menakite Wrote: [ -> ]ensure JSON-RPC is enabled: http://wiki.xbmc.org/?title=JSON-RPC_API#Enabling_JSON-RPC (TCP/localhost applies to you; you may need to increase the settings level to advanced or expert, not sure)
(I'm going to work through your individual suggestions one by one, so as not to confuse myself or my computer.
)
It's already on. Now strongly suspecting it's because I use port 8080, where 9090 is expected by bridge.
(7th Jun, 2014 05:18 PM)belese Wrote: [ -> ]you can change port on
/usr/local/sbin/upstart-xbmc-bridge.py
change line 14 with your port,
but it will be erased on next update.
I am going to change it in the XBMC UI as it's more straightforward and will stick.
So: Under Settings/Services/Webserver I'm going to change "port" value to 9090.
Is this right?
Port 8080 is used by the XBMC webserver and 9090 by the JSON API socket server. Those are different things.
(8th Jun, 2014 02:35 AM)CurlyMo Wrote: [ -> ]Port 8080 is used by the XBMC webserver and 9090 by the JSON API socket server. Those are different things.
In that case I'm not going to do that.
I'm getting "Failed to start communication server" messages in XBMC when I try to toggle JSON-RPC off and on.
Are you maybe running transmission?
(8th Jun, 2014 03:14 AM)CurlyMo Wrote: [ -> ]Are you maybe running transmission?
Alas, no. I know where you were going with that and it would have explained a lot.
Here's the output of a command I was asked to run previously that may answer what is and isn't running, port wise.
Code:
$ sudo netstat -nlp | grep xbmc.bin
tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN 914/xbmc.bin
tcp 0 0 0.0.0.0:1204 0.0.0.0:* LISTEN 914/xbmc.bin
tcp 0 0 0.0.0.0:1206 0.0.0.0:* LISTEN 914/xbmc.bin
tcp 0 0 0.0.0.0:36666 0.0.0.0:* LISTEN 914/xbmc.bin
tcp 0 0 0.0.0.0:36667 0.0.0.0:* LISTEN 914/xbmc.bin
udp 0 0 0.0.0.0:9777 0.0.0.0:* 914/xbmc.bin
udp 0 0 0.0.0.0:1900 0.0.0.0:* 914/xbmc.bin
unix 2 [ ACC ] STREAM LISTENING 4440 914/xbmc.bin /home/xbian/.xbmc/temp/commoncache.socket
I found this in advancedsettings.xml
Code:
<jsonrpc>
<compactoutput>false</compactoutput>
<tcpport>9999</tcpport>
</jsonrpc>
I've changed it to 9090 (although it's highly unsafe to do so) and restarted XBMC.
I'm not seeing the respawns in dmesg anymore, nor am I seeing restarts in the bridge's log file. Fixed?
Can you add this fix to the wiki.
I can see that changing the tcp port to 9999 is given as an example on the XBMC wiki, but I don't know if I changed it earlier myself based on that. If I did, it's less likely anybody else has done so and needs that info.
That said, where do you suggest I put this info?
http://wiki.xbmc.org/?title=advancedsettings.xml
On the xbian wiki. Just make it logical.
(8th Jun, 2014 03:34 AM)JumbledGrass Wrote: [ -> ]I've changed it to 9090 (although it's highly unsafe to do so) and restarted XBMC.
Glad you solved it. For the reader coming from Google, I was referring to manually edit the guisettings.xml file. That's ok for advancedsettings.xml.
@
belese I'm trying to make this an addon. I needed to make 2 patches for XBMC as the Python API is SO limited, but it's quite complete, except a couple details. Will push on GitHub when my fixed line gets repaired (!) for you to review.
(9th Jun, 2014 05:22 PM)belese Wrote: [ -> ]what are you needed that are not on xbmc python api?
It's missing the callbacks for the clean library actions (start/finished), my patch adds these. (My other patch added Player.isPlayingChannel() for PVR as I see it forces priority 5, but I ended up with Player.getPlayingFile().startswith("pvr://"))
I'll try to get this upstream, though Gotham only gets fixes so it won't land there.
Quote:if you want an addon, maybe rewrite it by using
http://romanvm.github.io/xbmcstubs/docs/classxbmc_1_1_monitor.html
I'm indeed subclassing Monitor and Player.
Quote:you can have access to all json notification, and it doesn't need to have json-server on.
Yeah, that's what I'm trying to achieve: avoid these problems by not depending on something the user can disable or change its settings.
Quote:or there is already a kind of xbmc/xbian service in xbian-config addon,
it's kind of plugnplay, you can just add a file in service dir (class name should be the same that file name),
EDIT : my mistake, it's not yet pnp, you have to add service here too (but code exist for pnp, so can add it)
https://github.com/xbianonpi/xbian-package-config-xbmc/blob/master/content/usr/local/share/xbmc/addons/plugin.xbianconfig/services.py
which herit from service like this
https://github.com/xbianonpi/xbian-package-config-xbmc/blob/master/content/usr/local/share/xbmc/addons/plugin.xbianconfig/services/firstrun.py
class service herit from xbmc.monitor, so all cb are accessible.
Ah! I didn't really know about this possibility, though I prefer if they remain separate.
I'll ping you on GitHub when I finish the remaining bits, test and then push.