New Plugin - XBMCState - Xbmc addon

Will be more complicate, like i say, the vera alert send a url to the app with the message that you want, it will be more simple for me to add this function in the xbmc addon, could you tell me what app you are using on your phone. Did the author of the plugin have also made a app for the android? It’s not that i want (to each there on) all i want is to be simple and save time, with python code, it is very easy.

I think I may have found the issue for me…I am using the VIDEO IS STARTING event of XBMCState to trigger the notification and it seems that the IDLETIME variable does not get updated until after this event is triggered.

You are right about that, in the script addon, video start is sent before video title.

Is this possible to modify?

Just open the default.py and check to inverse the procedure, let me know

Or did you try to put a little delay on the trigger to give time to xbmcstate to update the title?

Could you please clarify what you mean here?

In the xbmc addon, you have a file name default.py, this is were all the function is, just open it with a text editor and inverse the 2 function for the video start and the title. Did you try to trigger it after the video start manually to be sure that it’s your problem?

Yes that’s exactly what I did

And did it work?

Sorry yes it worked perfectly
I have been trying to modify the default.py file but every time o receive a script error

More simple will be to use the countdown plugin, video start trigger countdown, adjust the time and create a trigger with when countdown is complete. Cause even if you change the order, not sure if the vera will be fast enough to deal with that.

Could the order be reversed and a small delay added to the python script?(I don’t use the count down plug in)

Hi guys,

Firstly, thanks for this plugin, just what I was after :slight_smile:

Secondly, I literally just got my Vera yesterday so I’m still working things out (and I’m reading through a lot of stuff on here so I don’t have to ask too many annoying questions, but I do have to ask one :D):

So, what I want to do is set this up to Pause XBMC when an incoming call comes through my Fritz.box router. There’s a Fritz addin, and I’ve installed that along with this XBMC addin (which is working fine).

I just need a little guidance to have to set this up. Here’s what I’ve done so far:

I’ve created a new scene and named it Pause on Call
In the scene I’ve added an Incoming Call trigger from the Fritz addin

Here’s where I’m not 100% sure how to trigger a pause of XBMC when a call comes in. Right now I’ve gone to the advanced section and (I’ve attached an image), but I’ve no idea if that’s correct. Maybe I need to add some Luup code to tell it to pause?

Anyway, I’ll keep reading but figured I’d post here while I do that.

Thanks!!

Thus plugin is for use the other way round at the current version ie it is used for triggering vera scenes when xbmc changes state…you can’t control xbmc with this plugin

Right, that explains why I can’t get it working then :smiley: This would require a totally new plugin (or xbmc addon) would it?

Or just send a jsonRPC request to your XBMC :

{"jsonrpc":"2.0","method":"Player.PlayPause","params":{"playerid":1},"id":1}

Using a luup code, it would be :

luup.inet.wget("http://" .. XBMC_IP .. "/jsonrpc?request={%22jsonrpc%22:%222.0%22,%22method%22:%22Player.PlayPause%22,%22params%22:{%22playerid%22:1},%22id%22:1}")

[quote=“Shaigan, post:157, topic:174337”]Or just send a jsonRPC request to your XBMC :

{"jsonrpc":"2.0","method":"Player.PlayPause","params":{"playerid":1},"id":1}

Using a luup code, it would be :

luup.inet.wget("http://" .. XBMC_IP .. "/jsonrpc?request={%22jsonrpc%22:%222.0%22,%22method%22:%22Player.PlayPause%22,%22params%22:{%22playerid%22:1},%22id%22:1}")

Ok, cool. Sorry to be dense, but where abouts do I put that in the scene? (Sorry, still learning)

You should copy/paste this code in the luup section of your scene. You need to change the part " … XBMC_IP … " by the ip adress and the port of your XBMC computer (192.168.xxx.yyy:zzzz)

Ahhh, I was missing the port. That works! Brilliant, thanks :smiley: Now I just need to work out how to get it to resume when the call hangs up, but I’ll see if I can work that out :wink:

Thanks!

EDIT: Got it. How exciting :smiley: