Page 80 of 94

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Posted: Wed Mar 02, 2016 11:24 am
by Phil
If I try to add the JSONRPC Action I get this

11:22:53 XBMC2: Error opening: jsonrpc.dat
11:22:53 Traceback (most recent call last) (1722):
11:22:53 File "C:\Program Files (x86)\EventGhost\eg\Classes\TaskletDialog.py", line 59, in ProcessingTask
11:22:53 self.Configure(*args, **kwargs)
11:22:53 File "C:\Program Files (x86)\EventGhost\eg\Classes\ConfigDialog.py", line 165, in Configure
11:22:53 treeItem.Configure(*args)
11:22:53 File "C:\Program Files (x86)\EventGhost\eg\Classes\ActionItem.py", line 101, in Configure
11:22:53 return self.executable.Configure(*args)
11:22:53 File "C:\Program Files (x86)\EventGhost\plugins\XBMCRepeat\__init__.py", line 1328, in Configure
11:22:53 UpdateMethods()
11:22:53 File "C:\Program Files (x86)\EventGhost\plugins\XBMCRepeat\__init__.py", line 1251, in UpdateMethods
11:22:53 if responce['result']['version'] > 2:
11:22:53 KeyError: 'result'
11:22:53 Traceback (most recent call last) (1722):
11:22:53 File "wx\_core.pyc", line 14669, in <lambda>
11:22:53 File "C:\Program Files (x86)\EventGhost\eg\Core.py", line 197, in Notify
11:22:53 listener(value)
11:22:53 File "C:\Program Files (x86)\EventGhost\eg\Classes\MainFrame\TreeCtrl.py", line 844, in OnNodeSelected
11:22:53 path = node.GetPath()
11:22:53 File "C:\Program Files (x86)\EventGhost\eg\Classes\TreeItem.py", line 377, in GetPath
11:22:53 path.append(parent.childs.index(item))
11:22:53 AttributeError: 'NoneType' object has no attribute 'childs'


which presumably I need to be able to configure to update?

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Posted: Wed Mar 02, 2016 11:58 am
by jonib
Phil wrote:which presumably I need to be able to configure to update?
Damn, there seems to be something different in OpenELEC how JSONRPC works as it don't seem to support some basic methods like what version it is using. I'll have to wait with diagnosing this until I make a bigger change in the plugin.

What does work for you? Is the problem only notifications and JSONRPC?

I'll concentrate on detecting/connecting on Android for now, as your problem seem very different and I need to focus on one problem at the time.

jonib

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Posted: Wed Mar 02, 2016 12:04 pm
by Phil
All I'm trying to do at the moment is get that something is playing/ paused/ stopped to adjust the lighting accordingly. As far as I can tell I can send commands to openelec but its not something I really use so couldnt be 100% sure.


It's not worked reliably for the few previous versions of openelec so waiting some more is not a big issue! It just seems really weird that it works if eventghost is restarted for a few times then gives up.

It might be good to start a new thread for a big upgade of the plugin, this one is a nightmare for trying to find if others have had the same problems!

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Posted: Wed Mar 02, 2016 12:22 pm
by jonib
Phil wrote:It's not worked reliably for the few previous versions of openelec so waiting some more is not a big issue!
So it used to work when you used older OpenELEC versions?
It just seems really weird that it works if eventghost is restarted for a few times then gives up.
So it works sometimes, could you try to add the JSONRPC action when its working?
It might be good to start a new thread for a big upgade of the plugin, this one is a nightmare for trying to find if others have had the same problems!
If I do a bigger release I'll think about it, I have thought how to improve the thread but haven't been able to decide whats best.

jonib

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Posted: Wed Mar 02, 2016 12:25 pm
by tjabas
So here┬┤s the new log:

13:22:45 XBMC2: Disconnected from XBMC, not receiving JSON-RPC notifications. (appears after killing kodi)
13:22:46 JSON-RPC connect error:
13:22:46 Traceback (most recent call last):
13:22:46 File "C:\Program\EventGhost\plugins\XBMCRepeat\__init__.py", line 1984, in WaitForXBMC
13:22:46 sock.setsockopt(socket.IPPROTO_IP, socket.IP_ADD_MEMBERSHIP, mreq)
13:22:46 File "<string>", line 1, in setsockopt
13:22:46 error: [Errno 10022] Ett ogiltigt argument angavs


thanks.

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Posted: Wed Mar 02, 2016 12:31 pm
by Phil
It might be good to start a new thread for a big upgade of the plugin, this one is a nightmare for trying to find if others have had the same problems!
If I do a bigger release I'll think about it, I have thought how to improve the thread but haven't been able to decide whats best.

jonib
Its a shame that child boards aren't used on this forum for the 'bigger' plugins.
But thats off topic for here (further junkng up the thread sorry!)

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Posted: Wed Mar 02, 2016 12:45 pm
by jonib
tjabas wrote:So here┬┤s the new log:
Thanks, I have done some testing on my android and I'm going to rebuild the notification and SSDP/UPnP (Kodi detection) code as its horrible. That hopefully makes it work better or at worst should make it easier to debug problems.

So it will most likely take a couple of days before I post a new test build, Thanks for the help in debugging.

jonib

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Posted: Thu Mar 03, 2016 2:11 pm
by Phil
Hi,
for when you get around to it, ive had chance for a bit more of a play and found this happens when the profile logs off

14:05:01 XBMC2: connection error:
14:05:01 Traceback (most recent call last):
14:05:01 File "C:\Program Files (x86)\EventGhost\plugins\XBMCRepeat\__init__.py", line 2068, in JSONRPCNotifications
14:05:01 s.connect((self.pluginConfig['XBMC']['ip'], self.pluginConfig['JSONRPC']['port']))
14:05:01 File "<string>", line 1, in connect
14:05:01 error: [Errno 10061] No connection could be made because the target machine actively refused it
14:05:01 XBMC2: Not able to connect to XBMC, will use SSDP to detect when XBMC is available.

14:05:01 XBMC2: SSDP is on
14:05:01 XBMC2: SSDP: Wait for event.
14:05:09 System.UnIdle
14:05:11 XBMC2: SSDP: Wait for event: Timeout.
14:05:11 XBMC2: SSDP: Wait for event.
14:05:21 XBMC2: SSDP: Wait for event: Timeout.
14:05:21 XBMC2: SSDP: Wait for event.
14:05:31 XBMC2: SSDP: Wait for event: Timeout.
14:05:31 XBMC2: SSDP: Wait for event.
14:05:41 XBMC2: SSDP: Wait for event: Timeout.
14:05:41 XBMC2: SSDP: Wait for event.
14:05:51 XBMC2: SSDP: Wait for event: Timeout.
14:05:51 XBMC2: SSDP: Wait for event.

The SSDP never detects anything it seems.
Hope this helps.

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Posted: Thu Mar 03, 2016 2:28 pm
by jonib
Phil wrote:for when you get around to it, ive had chance for a bit more of a play and found this happens when the profile logs off
When you are not logged in Kodi many of the network stuff gets disabled, as I don't switch profiles I haven't looked at that. But I'll keep that in mind with the new version.
The SSDP never detects anything it seems.
That error is normal in debugging mode as it can't connect to Kodi, it starts the SSDP detection, of course the idea is to detect Kodi when available again.
While working on the new code I think the SSDP detection was working (mostly) fine but there is something funky when trying to connect to Kodi after it finds it, as in Kodi refuses the connection, don't know why yet, but my idea at the moment is I need to reset the network code somehow as restarting EventGhost fixes it but not just the plugin.

jonib

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Posted: Fri Mar 04, 2016 10:57 am
by tjabas
really looking forward to the new verison :)

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Posted: Wed Mar 09, 2016 11:13 pm
by jonib
tjabas wrote:really looking forward to the new verison :)
Well here it is.

So this is a test version with new SSDP detection code, so that EventGhost can detect when Kodi/XBMC starts and connect to it and get events.

So it appears that when XBMC was renamed to Kodi, about the same time the SSDP/UPnP code got changed and my code stopped working fully.

For the last week I have been trying to make the detection code stable and work always, but it just seems to work sometimes, so I basically would like to know if this new code is better, then I can work more on it, but now I've had enough. :evil:

So anybody using events from Kodi/XBMC or wants it detected over the network please test and report back, and if there are problems activate the debug option and post the EventGhost log.

jonib

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Posted: Thu Mar 10, 2016 6:27 am
by tjabas
Cant wait for the working Day to end, Im really looking Forward to test it later today.

Thank alot :)

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Posted: Thu Mar 10, 2016 12:49 pm
by Phil
Excellent work!
It appear to be much more reliable with the system is back on after a log off, reboot etc

I did initially get some josn errors when I first activated it, but once Kodi was running these have stopped (unfortunately they are no longer on my log or I would let you see).

I'll see how it goes over the next week or so but it certainly looks better on initial texting.

thanks for your hard work.

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Posted: Thu Mar 10, 2016 1:59 pm
by DarkCinema
Hi. I am getting an error. Using you latest change:

14:56:26 XBMC2: Error opening: actions.dat

What does it mean?

Re: Support for XBMC2 plugin (formerly XBMCRepeat)

Posted: Thu Mar 10, 2016 4:12 pm
by tjabas
sorry to say, but eventghost cant detect any events from kodi, here┬┤s the log:

17:08:34 JSON-RPC connect error:
17:08:34 Traceback (most recent call last):
17:08:34 File "C:\Program\EventGhost\plugins\XBMCRepeat\__init__.py", line 1947, in SSDPInit
17:08:34 sock.setsockopt(socket.IPPROTO_IP, socket.IP_ADD_MEMBERSHIP, mreq)
17:08:34 File "<string>", line 1, in setsockopt
17:08:34 error: [Errno 10022] Ett ogiltigt argument angavs
17:08:34 Exception in thread Thread-1035:
17:08:34 Traceback (most recent call last):
17:08:34 File "threading.pyc", line 532, in __bootstrap_inner
17:08:34 File "threading.pyc", line 484, in run
17:08:34 File "C:\Program\EventGhost\plugins\XBMCRepeat\__init__.py", line 2087, in JSONRPCNotifications
17:08:34 Socket = SSDPInit(SSDP_IP, SSDP_PORT)
17:08:34 File "C:\Program\EventGhost\plugins\XBMCRepeat\__init__.py", line 1947, in SSDPInit
17:08:34 sock.setsockopt(socket.IPPROTO_IP, socket.IP_ADD_MEMBERSHIP, mreq)
17:08:34 File "<string>", line 1, in setsockopt
17:08:34 error: [Errno 10022] Ett ogiltigt argument angavs
17:08:34



i get an connection notification in kodi when i start the plugin in eventghost, but that┬┤s all.