Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
Support for XBMC2 plugin (formerly XBMCRepeat)
Re: Support for XBMC2 plugin (formerly XBMCRepeat)
How do I translate this: xbmc.VideoLibrary.RemoveMovie(movieid=1234) into XBMC2 form.
I know the first part is eg.plugins.XBMC2.JSONRPC(u'VideoLibrary.RemoveMovie', ????), but how do I encode the "movieid=1234" part?
I know the first part is eg.plugins.XBMC2.JSONRPC(u'VideoLibrary.RemoveMovie', ????), but how do I encode the "movieid=1234" part?
Re: Support for XBMC2 plugin (formerly XBMCRepeat)
egbaud wrote:How do I translate this: xbmc.VideoLibrary.RemoveMovie(movieid=1234) into XBMC2 form.
I know the first part is eg.plugins.XBMC2.JSONRPC(u'VideoLibrary.RemoveMovie', ????), but how do I encode the "movieid=1234" part?
Code: Select all
eg.plugins.XBMC2.JSONRPC(u'VideoLibrary.RemoveMovie', [1234] )Code: Select all
eg.plugins.XBMC2.JSONRPC(u'VideoLibrary.RemoveMovie', {"movieid": 1234} )jonib
Re: Support for XBMC2 plugin (formerly XBMCRepeat)
Thank you! Worked perfectly.
Re: Support for XBMC2 plugin (formerly XBMCRepeat)
Hello. Can someone help me with a python script. I want to send clear signals for play pause (not toggle). If an Event comes for Pause a script should be executed. And if an Event comes for Play another script should be executed.
Someone wrote this as an example:
def getVideoPlaying():
videoPlaying = 0
activePlayer = eg.plugins.XBMC2.JSONRPC(u'Player.GetActivePlayers', u'', False)
if activePlayer:
if activePlayer[0]["type"] == "video":
mediaSpeed = eg.plugins.XBMC2.JSONRPC(u'Player.GetProperties', u'1,["speed"]', False)["speed"]
if mediaSpeed > 0:
videoPlaying = 1
return videoPlaying
I need something like this (for Pause):
def getVideoPlaying():
videoPlaying = 0
activePlayer = eg.plugins.XBMC2.JSONRPC(u'Player.GetActivePlayers', u'', False)
if activePlayer:
if activePlayer[0]["type"] == "video":
mediaSpeed = eg.plugins.XBMC2.JSONRPC(u'Player.GetProperties', u'1,["speed"]', False)["speed"]
if mediaSpeed > 1:
eg.plugins.XBMC2.JSONRPC(u'Player.PlayPause.....
Here is an Json Example:
{"jsonrpc": "2.0", "method": "Player.PlayPause", "params": { "playerid": 0 }, "id": 1}
Can someone help me with the right format for the script, please. And can anyone tell me if this could work?
Someone wrote this as an example:
def getVideoPlaying():
videoPlaying = 0
activePlayer = eg.plugins.XBMC2.JSONRPC(u'Player.GetActivePlayers', u'', False)
if activePlayer:
if activePlayer[0]["type"] == "video":
mediaSpeed = eg.plugins.XBMC2.JSONRPC(u'Player.GetProperties', u'1,["speed"]', False)["speed"]
if mediaSpeed > 0:
videoPlaying = 1
return videoPlaying
I need something like this (for Pause):
def getVideoPlaying():
videoPlaying = 0
activePlayer = eg.plugins.XBMC2.JSONRPC(u'Player.GetActivePlayers', u'', False)
if activePlayer:
if activePlayer[0]["type"] == "video":
mediaSpeed = eg.plugins.XBMC2.JSONRPC(u'Player.GetProperties', u'1,["speed"]', False)["speed"]
if mediaSpeed > 1:
eg.plugins.XBMC2.JSONRPC(u'Player.PlayPause.....
Here is an Json Example:
{"jsonrpc": "2.0", "method": "Player.PlayPause", "params": { "playerid": 0 }, "id": 1}
Can someone help me with the right format for the script, please. And can anyone tell me if this could work?
Re: Support for XBMC2 plugin (formerly XBMCRepeat)
MaxMan23 wrote:Hello. Can someone help me with a python script. I want to send clear signals for play pause (not toggle). If an Event comes for Pause a script should be executed. And if an Event comes for Play another script should be executed."Play" will only start playback and resume playback if paused, "Pause" will pause and resume playback if paused but not start.Code: Select all
Can someone help me with the right format for the script, please. And can anyone tell me if this could work?[/quote]I would start with these actions: [code]XBMC2->Actions->Media playing->Play XBMC2->Actions->Media playing->Pause
As "Pause" works as a semi toggle, try this for a pure pause, something must be playing for it to work:jonibCode: Select all
{"jsonrpc": "2.0", "method": "Player.PlayPause", "params": {"playerid": 1, "play": False}, "id": 1}
Re: Support for XBMC2 plugin (formerly XBMCRepeat)
If i press Pause two times, playback should not start again."Pause" will pause and resume playback if paused but not start.
Can you help me with the right format:
eg.plugins.XBMC2.JSONRPC(u'Player.PlayPause
Re: Support for XBMC2 plugin (formerly XBMCRepeat)
Put this in a "Python script" action:MaxMan23 wrote:Can you help me with the right format:
Code: Select all
activePlayer = eg.plugins.XBMC2.JSONRPC(u'Player.GetActivePlayers', u'', False)
if activePlayer:
eg.plugins.XBMC2.JSONRPC(u'Player.PlayPause', u'{0},False'.format(activePlayer[0]['playerid']), False)
Re: Support for XBMC2 plugin (formerly XBMCRepeat)
Thank you for your work. I stopped using this xbmc plugin some years ago because of compatibility problems. I'll try your code ASAP.jonib wrote:Plugin updated to 0.6.35, get it on Github, only the
Re: Support for XBMC2 plugin (formerly XBMCRepeat)
Hi,
I am very new to EG. Im trying to launch Kodi on my 'Always On' Windows 10 Enterprise x64 laptop, using the 'Wake on LAN' feature on Official Kodi Remote on my Iphone.
I tried using Broadcaster and XBMC Event Receiver aswell, and configured the UDP port to 9, but I recieve the following error:
Please help, and guide me on what I could do to achieve what I am trying to do.
Thanks in advance.
I am very new to EG. Im trying to launch Kodi on my 'Always On' Windows 10 Enterprise x64 laptop, using the 'Wake on LAN' feature on Official Kodi Remote on my Iphone.
I tried using Broadcaster and XBMC Event Receiver aswell, and configured the UDP port to 9, but I recieve the following error:
Code: Select all
error: uncaptured python exception, closing channel <eg.CorePluginModule.XBMCEventReceiver.Server connected :9 at 0x4a1ccb0> (<type 'exceptions.UnicodeDecodeError'>:'utf8' codec can't decode byte 0xff in position 0: unexpected code byte [asyncore.pyc|read|76] [asyncore.pyc|handle_read_event|414] [C:\Program Files (x86)\EventGhost\plugins\XBMCEventReceiver\__init__.py|handle_read|110] [encodings\utf_8.pyc|decode|16])Thanks in advance.
Re: Support for XBMC2 plugin (formerly XBMCRepeat)
There is no "Wake on LAN" specific functionality in the XBMC2 plugin and I don't support the Official Kodi remote or IPhone so can't help with any of it.enobhsiw wrote:Hi,
I am very new to EG. Im trying to launch Kodi on my 'Always On' Windows 10 Enterprise x64 laptop, using the 'Wake on LAN' feature on Official Kodi Remote on my Iphone.
I tried using Broadcaster and XBMC Event Receiver aswell, and configured the UDP port to 9, but I recieve the following error:Please help, and guide me on what I could do to achieve what I am trying to do.Code: Select all
error: uncaptured python exception, closing channel <eg.CorePluginModule.XBMCEventReceiver.Server connected :9 at 0x4a1ccb0> (<type 'exceptions.UnicodeDecodeError'>:'utf8' codec can't decode byte 0xff in position 0: unexpected code byte [asyncore.pyc|read|76] [asyncore.pyc|handle_read_event|414] [C:\Program Files (x86)\EventGhost\plugins\XBMCEventReceiver\__init__.py|handle_read|110] [encodings\utf_8.pyc|decode|16])
Thanks in advance.
Also I don't support the "XBMC Event Receiver" plugin (Support for it is here), I do support the XBMC broadcast events in the XBMC2 plugin but it probably is NOT supported in the version of Kodi/XBMC you are using.
I see that kgschlosser pointed you here, So start by removing the "XBMC Event Receiver" plugin and if you are using a very old version of XBMC (11 or older) activate broadcast events in the XBMC2 options. But I don't think WakeOnLAN is related to this.
So what is not working except for the error you are receiving?
jonib
Re: Support for XBMC2 plugin (formerly XBMCRepeat)
Hi Jonib,jonib wrote: There is no "Wake on LAN" specific functionality in the XBMC2 plugin and I don't support the Official Kodi remote or IPhone so can't help with any of it.
Also I don't support the "XBMC Event Receiver" plugin (Support for it is here), I do support the XBMC broadcast events in the XBMC2 plugin but it probably is NOT supported in the version of Kodi/XBMC you are using.
I see that kgschlosser pointed you here, So start by removing the "XBMC Event Receiver" plugin and if you are using a very old version of XBMC (11 or older) activate broadcast events in the XBMC2 options. But I don't think WakeOnLAN is related to this.
So what is not working except for the error you are receiving?
jonib
I am using the Kodi Kryptop 17.4 version. So far I stopped with the launching of the application(Kodi) using the 'Wake on LAN' feature of the remote of the app.
Will ask for help for the rest if I run into any trouble.
Thanks for the help
Re: Support for XBMC2 plugin (formerly XBMCRepeat)
Goodenobhsiw wrote:Will ask for help for the rest if I run into any trouble.
Thanks to you I finally looked into using WakeOnLan for my HTPC, and got it working when in sleep mode. Now I can have it go to sleep and be able to wake it up when I need to do some testing when I'm developing the XBMC2 plugin, cool
jonib
Re: Support for XBMC2 plugin (formerly XBMCRepeat)
I've had this working before but it's been a while since the last time I had to reconfigure it on a fresh install of Kodi but I cannot get any events to show up on the event log on the left side of EG. Particularly I want to be able to detect when Kodi is playing or pausing a video. I downloaded the latest version of EG. I believe I set up the connections correctly. It does not spit out any errors upon initializing or anything like that.
Any ideas?
Any ideas?
Re: Support for XBMC2 plugin (formerly XBMCRepeat)
To get events from Kodi/XBMC you need to activate "JSON-RPC notifications" in the XBMC2 plugins settings.
You also need to activate some stuff in Kodi settings, "Services->UPnP->Allow control of Kodi via UPnP" needs to be activated so the XBMC2 plugin detects when Kodi is starting.
You might need to activate "Services->Remote control->Allow programs on other systems to control Kodi".
What do you get when pressing the "Test" button in the XBMC2 config?
edit: Also what version EventGhost/XBMC2 plugin/Kodi are you using?
jonib
xbmc2 jsonrpc TypeError: __call__() takes at most 4 arguments (5 given)
I have been using version 0.4.r1700 for years with no problems, but wanted to get mqtt going and thought I would upgrade eventghost. I installed 0.5.0-rc4, big mistake I had errors everywhere so I uninstalled it and went to version 0.4.1.r1710 and that is when the errors below started. I then decided to go back to my org version 0.4.1.r1700, but the errors still continue.
Error in Action: "XBMC2: JSONRPC: Input.ExecuteAction: Live TV"
Traceback (most recent call last) (1700):
File "E:\Root\Program Files (x86)\EventGhost\eg\Classes\ActionBase.py", line 170, in CallWrapper
return self(*args)
TypeError: __call__() takes at most 4 arguments (5 given)
If I try to edit the action EG freezes solid. I am at my wits end with this one. I searched google, but couldn't find really anything that helped much. Any insight will be helpful.
Error in Action: "XBMC2: JSONRPC: Input.ExecuteAction: Live TV"
Traceback (most recent call last) (1700):
File "E:\Root\Program Files (x86)\EventGhost\eg\Classes\ActionBase.py", line 170, in CallWrapper
return self(*args)
TypeError: __call__() takes at most 4 arguments (5 given)
If I try to edit the action EG freezes solid. I am at my wits end with this one. I searched google, but couldn't find really anything that helped much. Any insight will be helpful.
