Support for XBMC2 plugin (formerly XBMCRepeat)

Questions and comments specific to a particular plugin should go here.
krantzet
Posts: 5
Joined: Sat Apr 06, 2013 6:03 am

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by krantzet » Thu Apr 11, 2013 7:58 am

Mine wouldn't work until I changed the port in both XBMC & EventGhost to 8080. Might be worth a shot...
I found the problem.
I had a password set for http access in XBMC.
Now its working!!

jonib
Plugin Developer
Posts: 1244
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by jonib » Thu Apr 11, 2013 8:15 pm

krantzet wrote:I found the problem.
I had a password set for http access in XBMC.
Now its working!!
Glad you found the problem. I was supposed to ask if you used a password as the XBMC2 plugin don't support it yet, but I guess I forgot, sorry.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image

jonib
Plugin Developer
Posts: 1244
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by jonib » Tue May 21, 2013 11:13 pm

Sooooooo, I wasn't going to release any more "Test" releases, as the next release was going to be a "Release candidate" and was going to be the release that was done (barring any bugs).
But unfortunately life-stuff™ happened and a month went by that I haven't been able to work on the XBMC2 plugin, but before that I got a lot done (relatively). I'm hoping to finish it now that life-stuff™ is hopefully settling down.

So, I'm not finished, but I think the stuff that's working is better than the last good test version, so I wanted to make a new one. As it might take a bit of time for me to get going with the coding again (I'm like a cold engine, takes a while to warm up :oops: ).

OK so what's new with this test version:
  • Redesigned the plugins config dialog, much nicer then before. I'm going to tweak it further still.
  • Big changes to the JSON-RPC notifications, you no longer need to use an action to (dis)connect, just enable/disable in the plugins settings.
  • The plugin now uses the SSDP(UPnP) protocol to detect the IP and port of any XBMCs on the LAN via the "Search" button and also to detect when XBMC has started so it can connect to recieve JSON-RPC notifications. So at least one of the UPnP settings in XBMC need to be enabled to use JSON-RPC notifications, hopefully this wont cause any problems?
  • If you activate the JSON-RPC notifications you can use the XBMC2.System.OnStart and XBMC2.System.OnQuit events to detect when XBMC starts/closes.
  • Finally added username and password support. The password is stored insecurely at the moment, I'll look into it before the proper release.
  • Now there is a "Test" connection button in the settings, It will use the current IP/Port and Username/password to try to connect to XBMC and show a notification if it works and some tips in the log if it doesn't.
Most of these features are going to change for the proper release as they are not as polished as I'd like.

The plugin supports events via JSON-RPC notifications and also the older Broadcast events, the broadcast events are not supported in XBMC 12 (Frodo) and later.
The plugins settings will be reset, so if the default settings are no good you need to check them.

I'm really proud of the new "Search" button, seen in the screenshot below:
XBMC2NewSettings.png
You press it and EventGhost locks up :twisted: after some seconds you should have a list of IP addresses for any XBMC on the network (As long as UPnP is active in XBMC).

The "Test" connection button seen in the screenshot should help in testing that the settings are correct. It will get even better when its finished.

So anybody interested please test it, especially anyone having problems with events in the previous test versions. And post about any problems/bugs or suggestions about how things should look/work.

jonib
Attachments
__init__.py
XBMC2 "Test" ver 0.6.9 (small update3) json fix
(95.89 KiB) Downloaded 837 times
Last edited by jonib on Sat May 25, 2013 8:47 am, edited 4 times in total.
XBMC2 plugin to control XBMC. If you want to flatter me Image

Samme
Posts: 33
Joined: Tue Nov 22, 2011 9:07 am

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by Samme » Wed May 22, 2013 1:06 pm

I got some errors when trying to add the plugin...

Any idea what it might be?
Attachments
eg.png

jonib
Plugin Developer
Posts: 1244
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by jonib » Wed May 22, 2013 2:00 pm

Samme wrote:I got some errors when trying to add the plugin...
Hmm, did you use a previous "test" version before? Do you know which one?

Anyway try to download the updated one.(same link) Thanks for testing and reporting.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image

eman457
Posts: 26
Joined: Wed May 22, 2013 10:53 am

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by eman457 » Wed May 22, 2013 2:05 pm

jonib wrote:Sooooooo, I wasn't going to release any more "Test" releases, as the next release was going to be a "Release candidate" and was going to be the release that was done (barring any bugs).
But unfortunately life-stuff™ happened and a month went by that I haven't been able to work on the XBMC2 plugin, but before that I got a lot done (relatively). I'm hoping to finish it now that life-stuff™ is hopefully settling down.

So, I'm not finished, but I think the stuff that's working is better than the last good test version, so I wanted to make a new one. As it might take a bit of time for me to get going with the coding again (I'm like a cold engine, takes a while to warm up :oops: ).

OK so what's new with this test version:
  • Redesigned the plugins config dialog, much nicer then before. I'm going to tweak it further still.
  • Big changes to the JSON-RPC notifications, you no longer need to use an action to (dis)connect, just enable/disable in the plugins settings.
  • The plugin now uses the SSDP(UPnP) protocol to detect the IP and port of any XBMCs on the LAN via the "Search" button and also to detect when XBMC has started so it can connect to recieve JSON-RPC notifications. So at least one of the UPnP settings in XBMC need to be enabled to use JSON-RPC notifications, hopefully this wont cause any problems?
  • If you activate the JSON-RPC notifications you can use the XBMC2.System.OnStart and XBMC2.System.OnQuit events to detect when XBMC starts/closes.
  • Finally added username and password support. The password is stored insecurely at the moment, I'll look into it before the proper release.
  • Now there is a "Test" connection button in the settings, It will use the current IP/Port and Username/password to try to connect to XBMC and show a notification if it works and some tips in the log if it doesn't.
Most of these features are going to change for the proper release as they are not as polished as I'd like.

The plugin supports events via JSON-RPC notifications and also the older Broadcast events, the broadcast events are not supported in XBMC 12 (Frodo) and later.
The plugins settings will be reset, so if the default settings are no good you need to check them.

I'm really proud of the new "Search" button, seen in the screenshot below:
The attachment XBMC2NewSettings.png is no longer available
You press it and EventGhost locks up :twisted: after some seconds you should have a list of IP addresses for any XBMC on the network (As long as UPnP is active in XBMC).

The "Test" connection button seen in the screenshot should help in testing that the settings are correct. It will get even better when its finished.

So anybody interested please test it, especially anyone having problems with events in the previous test versions. And post about any problems/bugs or suggestions about how things should look/work.

jonib

Man, I love your plugin but this test version (XBMC2 "Test" ver 0.6.9) errors out without installing. "So I turned to the stone age way of installing (BRUTE FORCE) software"
1st I installed the old stable version (XBMC2 ver 0.6.3d found ), Started Eventghost and configured it then exited EG and opened the hood (Plugins/XBMCRepeat), copied the new XBMC2 "Test" ver 0.6.9 and restarted EG. It WORKED!!!. Please guys (I know nothing about coding) don't ask me what goes on in there but it worked. There was still one more problem when XBMC Frodo shutting down. The shutdown is so fast that it errors out that it stops responding on the next reboot.This is because JSON-RPC gets no chance to respond on shutdown but sometimes does. So I use the PING plugin with the action "ping one now" which gives two events of XBMC dead or alive. I created 2 macros (XBMC_is_DEAD = Action: Disable:Plugin:XBMC2) and (XBMC_is_ ALIVE = Action: Enable:Plugin:XBMC2). Works like charm with an occasional error when XBMC shuts down too fast.

One more thing though, if you use XBMC Constellation volume controller when "Log raw events" is turned on in the XBMC2 plugin causes EG to hung.
To remedy that, turn off " Log Actions" in EG setting in the View menu and tick the box on bottom of EG gui. Plus untick Log raw events in XBMC2 plugin in dialog box.
A bit crude!! but it works.
XBMC2 (a).gif
My EG Settings
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Jonib, please this one (http://www.pulse-eight.com/store/produc ... apter.aspx) may be off topic but I think everyone here would love it.
Please!,Please create a plugin for it so you can do even more amazing things in Eventghost. I'm not in any way adverting or aftiliated with pulse-eight.com, They make nice XBMC packeges for Windows, linux and OSX and they make that product to go with it. And please guys don't wring my neck for telling you about this. I just love your work and please be nice!
Best Regards.

Eman457.

jonib
Plugin Developer
Posts: 1244
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by jonib » Wed May 22, 2013 5:41 pm

eman457 wrote:
jonib wrote:Sooooooo, I wasn't going to release any more "Test" releases (rest of quote deleted)
You didn't really need to quote my whole announcement. :oops:
Man, I love your plugin but this test version (XBMC2 "Test" ver 0.6.9) errors out without installing.
Thanks and sorry. :cry: But that's why its a "test" release. :twisted: Glad you found a way to get it working. Hopefully the updated version don't have the problem anymore.
There was still one more problem when XBMC Frodo shutting down. The shutdown is so fast that it errors out that it stops responding on the next reboot.This is because JSON-RPC gets no chance to respond on shutdown but sometimes does.
You shutdown the computer from Frodo? And what stops responding on the next reboot? This sounds kinda serious so want to understand exactly the problem and hopefully fix it.
So I use the PING plugin with the action "ping one now" which gives two events of XBMC dead or alive. I created 2 macros (XBMC_is_DEAD = Action: Disable:Plugin:XBMC2) and (XBMC_is_ ALIVE = Action: Enable:Plugin:XBMC2). Works like charm with an occasional error when XBMC shuts down too fast.
Glad you found a workaround, but I don't like it if you need to disable the plugin as its meant to work always enabled.
One more thing though, if you use XBMC Constellation volume controller when "Log raw events" is turned on in the XBMC2 plugin causes EG to hung.
Is this the XBMC Constellation volume controller? it's for iOS so can't test. So need more information about what's happening, you could use the Log redirector to get the log before EG hangs, so it might help me fix it.
To remedy that, turn off " Log Actions" in EG setting in the View menu and tick the box on bottom of EG gui. Plus untick Log raw events in XBMC2 plugin in dialog box.
A bit crude!! but it works.
You shouldn't need "Log raw events" normally anyway and I'm probably going to remove the option, as the plugin will show the raw event if needed without it.
Jonib, please this one (http://www.pulse-eight.com/store/produc ... apter.aspx) may be off topic but I think everyone here would love it.
I would love to but it's unlikely it will happen, as I'm struggeling to finish the XBMC2 plugin and have a lot of other projects that are way higher priority for me. sorry.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image

eman457
Posts: 26
Joined: Wed May 22, 2013 10:53 am

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by eman457 » Wed May 22, 2013 11:28 pm

You shutdown the computer from Frodo? And what stops responding on the next reboot? This sounds kinda serious so want to understand exactly the problem and hopefully fix it.

Thanks man, for the quick response.
I use the iPad with an application (XBMC Constalletion https://itunes.apple.com/gb/app/xbmc-co ... 07301?mt=8). It shows all metadata plus remote control for my remote stand alone installation of XBMC (Pulse Eight), i.e with wifi and Eventghost running on my remote Home Automation Server. The XBMC shutdown process is instant which does not give Eventghost enough time to process the shutdown events causing the XBMC2 plugin to hung. That's why I created the disable/enable XBMC2 plugin with the ping plugin if XBMC is found to be dead/alive respectively.

Apparently the recent version you posted seems to work fine with the Windows version of XBMC with no errors. And I believe this is due to Eventghost and XBMC being on the same computer. All types of events are shown.

Thanks again man.

Eman457.

jonib
Plugin Developer
Posts: 1244
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by jonib » Thu May 23, 2013 1:25 am

eman457 wrote:The XBMC shutdown process is instant which does not give Eventghost enough time to process the shutdown events causing the XBMC2 plugin to hung.
Just because XBMC closes fast there shouldn't be any problems for the plugin, it would just lose the connection and wait for a new one. What is the shutdown events that's making XBMC2 hang?
I just can't figure out anyway that the plugin would hang when XBMC closes.

Edit: Only one thing I can think of, would you mind uncommenting line 1535 (just remove the #) then see if you get "XBMC2: JSON timeout" in the log after you have shut down XBMC and XBMC2 gets hung. I want to see if the plugin still thinks it's connected to XBMC.
Apparently the recent version you posted seems to work fine with the Windows version of XBMC with no errors. And I believe this is due to Eventghost and XBMC being on the same computer. All types of events are shown.
There shouldn't be any difference if XBMC and EventGhost is on the same computer or not because everything is done over the network.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image

eman457
Posts: 26
Joined: Wed May 22, 2013 10:53 am

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by eman457 » Thu May 23, 2013 3:40 am

jonib wrote
There shouldn't be any difference if XBMC and EventGhost is on the same computer or not because everything is done over the network.

Ok this is what I get when I run it on the local computer
XBMC2 (c).gif
Local XBMC
Just because XBMC closes fast there shouldn't be any problems for the plugin, it would just lose the connection and wait for a new one. What is the shutdown events that's making XBMC2 hang?
I just can't figure out anyway that the plugin would hang when XBMC closes.
This one is XBMC stand alone installation with the same plugin.
XBMC2 (b).gif
Remote XBMC
Edit: Only one thing I can think of, would you mind uncommenting line 1535 (just remove the #) then see if you get "XBMC2: JSON timeout" in the log after you have shut down XBMC and XBMC2 gets hung. I want to see if the plugin still thinks it's connected to XBMC.


And this is when I have edited the file.
XBMC2 (d).png
Remote XBMC

Regards.

Eman457.

blaher
Experienced User
Posts: 467
Joined: Thu Nov 17, 2011 1:27 am

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by blaher » Thu May 23, 2013 4:32 am

It works well for me, thanks, just had to change the port to 8080 and it was away.

XBMC2: Disconnected from XBMC, not reciveing JSON-RPC notifications.

There's a typo in receiving, but otherwise it seems good for me.

jonib
Plugin Developer
Posts: 1244
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by jonib » Thu May 23, 2013 10:57 am

blaher wrote:It works well for me, thanks, just had to change the port to 8080 and it was away.
Thanks for the report. But just wait and the bugs will get ya.
XBMC2: Disconnected from XBMC, not reciveing JSON-RPC notifications.

There's a typo in receiving, but otherwise it seems good for me.
Damn typos, they keep following me, why cant they just leave me alone. :x :lol:

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image

jonib
Plugin Developer
Posts: 1244
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by jonib » Thu May 23, 2013 11:05 am

eman457 wrote:Ok this is what I get when I run it on the local computer
OK, looks good except that I'm seeing double (times five). Have to fix the thread handling.
This one is XBMC stand alone installation with the same plugin.
So the red text is when XBMC2 gets hung? this is useful to me and something I can fix (hopefully).
And this is when I have edited the file.
Thanks for testing, you can change it back as it was not relevant. I just missed testing for this problem.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image

eman457
Posts: 26
Joined: Wed May 22, 2013 10:53 am

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by eman457 » Thu May 23, 2013 11:15 am

blaher wrote:It works well for me, thanks, just had to change the port to 8080 and it was away.

XBMC2: Disconnected from XBMC, not reciveing JSON-RPC notifications.

There's a typo in receiving, but otherwise it seems good for me.

blaher, works well for me too on local XBMC.
The problem is with a remote bare metal installation media centre as you can see from the image bellow.
XBMC2 (e).png
Remote bare metal install
As you can see on start up everything is fine until you reboot or shutdown from the remote end using the iPad/iPhone app XBMC Constellation (https://itunes.apple.com/gb/app/xbmc-co ... 07301?mt=8)
The shutdown/reboot process is so fast thus causing Eventghost to error and causing the XBMC2 plugin to hang.

Regards.

Eman457.

jonib
Plugin Developer
Posts: 1244
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Post by jonib » Thu May 23, 2013 7:56 pm

eman457 wrote:The shutdown/reboot process is so fast thus causing Eventghost to error and causing the XBMC2 plugin to hang.
Try update2, it should fix and/or give more info about the problem.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image

Post Reply