New Plugin - XBMCState - Xbmc addon

Here in attachement the update to put some custom xbmc windows id. Let me know if it work, I try it with the addons setting widows and it was working. Just adjust the setting in the custom windows id and check your vera if event_1 and event_2 is sent. For sure for now xbmcstate don’t have trigger for it but if with your feedback it a good add, will also update the micasaverde for the trigger.

Let me know.

Addons window works for me, but not favourites:
http://wiki.xbmc.org/index.php?title=Window_IDs it’s 10134 apparently.

Cheers, looks like a good, flexible feature.

Thanks Mic, it’s all working nicely now. I meant to express my appreciation in my previous post, so double appreciations here!

Nice to see that it working.

@Conchordian
It also happen to me, it seems that not all windows id is triggered in xbmc. Will check it out but if xbmc does not trigger it, it will be dificult. For sure some other one should work.

Yeah, probably an XBMC error by the looks. The plugin pops up to say it’s running when that option is set too. Cool.

Thanks for the testing i apreciate.

I think it works! :stuck_out_tongue:
How do I check with Luup code for event_1 on a particular script in verde?. Also mic; I wish to trigger for live TV etc. This (not tried yet!!) would seem that many different Window_ID’s might be required e.g:

WINDOW_PVR
WINDOW_DIALOG_PVR_GUIDE

etc, etc, etc.

It makes it tricky with only 2 custom events. Not sure how you could easily/sensibly add more!. Perhaps the XBMCState reads for a simple xml that lists the Window_ID’s it is interested in???

Great stuff though; thanks!

Fool me! :o
When doing live tv; XBMCState returns it as video_on!!!

So it works!!! ;D
Still can’t get my Luup code to recognise the custom events though.

I know mic; the next big thing was Verde controlling XBMC. But couldn’t that be simpler than we think??
Can’t XBMC simply ‘acknowledge’ and act on an http request for a command/key press?? (only because it’s quite easy on verde I assume XBMC can do this)??

Cheers

Don’t have time today but will add the trigger for the 2 custom events. The next big thing for me will be to control vera from xbmc, there so much option to control xbmc from mobile and tablette so i don’t think that the vera to xbmc control will be that much needed. And if you need it to contrioll some simple function you could just use the wget function and create a scene with the function that you want.

Let me know if you have some idea in mind to put in the plugin

Hey mic,

Well it all seems to work. Basically if on XBMC commander I select live tv, video or music my tv turns on and playback commences.
I have setup a http command to verde via commander to turn off the tv when I am done.
The only issue is when idle my xbmc setup uses about 11% cpu time; which is fine.
When playing live tv it’s 70%. The problem is once you’ve finished watching tv; simply selecting ‘tv off’ in commander leaves the xbmc pc still streaming live tv and hence 70% cpu usage.
Ideally I want to somehow send a ‘stop’ to xvmc ; so it resorts to the standard screen and streaming stops; back at 11% cpu then. And then turn the TV off.
No idea how to control xbmc but assume it’s similar to how verde is controlled via http.
So I guess I am saying is it possible to have perhaps verde ‘trigger’ a script on the xbmc pc? . I have no idea if this is the best or even correct method. Obviously then the script could do anything to control xbmc.

Hope thats ‘a bit’ clear ! :wink:

Hmmmm,
This isn’t as trivial as I thought. I assumed you could script and control XBMC but you can’t not without actually being ‘in’ XBMC i.e. a plug in!!
So I guess Mic as you are 99% of the way there. It would be nice for Verde XBMCState to be able to ‘send’ a command to XBMC. This could be (I guess) any of the default commands like ‘show weather’ or ‘display shutdown menu’ ; equally to be able to control key commands i.e. ‘play’ , ‘pause’, ‘stop’ etc.
Would of thought XBMC would of had a nice easy way to have control under python script or something; but guess not! :cry:

I noticed last night that if the movie has been paused for a while, the Vera doesn’t seem to get triggered when the movie resumes… almost like it’s gone to sleep.

But once it’s been resumed, (or woken up?), I can pause/resume just fine and the lights come on/off. Could it be the screensaver interfering? Mine is set to ‘none’ & 3 minutes.

Thanks.

Will check that. And let you know. Thanks

;D
Ok!; for anyone else interested then this did what I wanted:

luup.inet.wget(“http://192.168.0.202:8080/jsonrpc?request={“jsonrpc”:“2.0”,“method”:“Player.Stop”,“params”:{“playerid”:1},“id”:1}”)

Yeah; I know it’s simple! ; but when you are learning it’s tricky!!!

Good for you, i know what you meens, sometime easy thing come with headache.

Thanks for this plugin, this is exactly what I was looking for. I just got my veralite this week and i’ve been combing the forums looking for cool things to do and this one was close to the top of the list.

@Mic thanks for an awesome plug-in! Exactly what I wanted and needed!

I have two other XBMC’s in the house, can the plugin be expanded to allow two or more XBMC’s to create triggers on the Vera? Example: if I play a video in one room I want the lights to dim in that room. If someone is watching XBMC in another room at the same time and they play a video in that room, I want the lights to dim in that room.

Just create another device with xbmc and put the different id to your xbmc setup, you will have the abilitty to have to independed setup and control each room individual.

Seem to be having problems upgrading.

I uninstalled the XBMCState add-in in XBMC. I deleted the folder under addon data. I uninstalled the XBMCState add-in in Vera.

I then installed the latest version from here: MiOS Apps

And installed the latest version of the XBMC add-on from the first page of this thread.

I have configured the IP and the device # etc but in Vera its not picking up the player state ?

I have NOT installed the day / night plug-in for Vera, I didnt want to use that and was going to use the luup code is night.

Thanks

EDIT: Sorry my bad I put the wrong IP address in for Vera, its working now I think.

One issue which is a skin problem in Aeon MQ4 you cannot enter the IP address with the remote control, had to switch back to Confluence skin to be able to do it.

EDIT2: The de-bouncing appears to be working OK! I had to set it to 2 secs and have tested whilst playing music videos now the lights remain dimmed in between music videos ending and the next one starting!

Any other future plans for the development of this add-on ?