New Plugin - XBMCState - Xbmc addon

Hi Mic,

I’m hoping you can help me adjust the settings in your default.py file to slightly alter the functionality of your plugin. I’m using Vox Commando to control my entire house, media center etc by voice. What I need is a way to lower the system volume input when a video is playing to 0% so the video doesn’t accidently trigger Vox and turn on my washing machine or something. I’ve set up Eventghost to receive HTTP inputs as simple commands, so if I put in the URL “127.0.0.1?msg&HI” Eventghost reads that as an HTTP command received. From there its easy to set up Eventghost to trigger multiple events.

So my question is what would I need to change about your addon so instead of reporting to my Vera it reports to Eventghost at the local URL with a simple series of different text strings?

I’m really new to python programming so please forgive me if I’m using incorrect terminology. Trying to figure this all out as I go.

Why not just use the Eventghost XBMC plugin?

Great app!
Thank you for your work!
XBMC 12.3 Frodo - Raspberry Pi - OpenELEC - works great!
XBMC 13.0 Gotham - Raspberry Pi - OpenELEC - works great!

Be sure to specify the ip address and unit number XBMC!

Hi,

I am having an issue here, when I press play or pause the state does not change. I am using XBMC Gotham.

I was able to install the XBMC plugin to my vera and I have also enabled micasaverde file on xbmc. I’ve added Vera’s IP address on xbmc and added the device state number on xbmc, on vera (MiOS) under XBMC advanced tab I added vera’s IP address.

Computer: up
Player: – (this will not update when movie is paused of played)
Xbmc: –

What am I doing wrong? I’m thinking it has to do with the IP address I entered on XBMC advanced tab on micasaverde.

Can someone shed some light on this?

Thanks.

^^^ discard post. I figured out the problem.

Sent from my Nexus 5 using Tapatalk

Hi,
I finally got this working and it works fantastically on my openelec 4.
What I do want to find out is, if there a way this plugin can distinguish between playing a tv show and a movie?
I want to have different scene for TV sShows and movies.
any ideas would be awesome

Thanks

Chris

The problem is that there is no indication in xbmc to know if it Tv show or movie, the only thing that could maybe do the trick is some code in the micasaverde to detect if you where in the movie menu or the Tv show menu then you could trigger the right thing, like a virtual switch that change when menu change.

Hi Mic

Thanks for that,

I only issues is that I am using Plex plugin on XBMC and that is under Videos and not Movies or TVShows… :slight_smile:
Well I just have to do a bit more digging and playing…

Chris

Hi Mic,

I believe that it is possible. In https://github.com/pilluli/service.xbmc.callbacks/blob/master/default.py there is a playing_type function which checks if the media type is a movie or an episode. It would be great if we could get this in the plugin.

Hello,
I’m new in Lua and Vera Lite but I would like to use this plugin to play or stop music on XBMC.

I installed XBMC on my android phone, XBMC plugin is configured correctly, it show on my vera XBMCState all details.

Now I saw on this post that I can stop music by lua code:
luup.inet.wget(“http://192.168.0.101:8080/jsonrpc?request={“jsonrpc”:“2.0”,“method”:“Player.PlayPause”,“params”:{“playerid”:1},“id”:1}”)

192.168.0.101 - this is IP my phone with XBMC.

If XBMC play music and I run scene it can’t stop :frowning: I don’t know why?

Can I make also play music on my phone for example at 7AM by lua code?

Thank you.

[quote=“krystianl, post:290, topic:174337”]Hello,
I’m new in Lua and Vera Lite but I would like to use this plugin to play or stop music on XBMC.

I installed XBMC on my android phone, XBMC plugin is configured correctly, it show on my vera XBMCState all details.

Now I saw on this post that I can stop music by lua code:
luup.inet.wget(“http://192.168.0.101:8080/jsonrpc?request={“jsonrpc”:“2.0”,“method”:“Player.PlayPause”,“params”:{“playerid”:1},“id”:1}”)

192.168.0.101 - this is IP my phone with XBMC.

If XBMC play music and I run scene it can’t stop :frowning: I don’t know why?

Can I make also play music on my phone for example at 7AM by lua code?

Thank you.[/quote]

Can supply power to the electrical outlet.

luup.call_action("urn:upnp-org:serviceId:SwitchPower1","SetTarget",{ newTargetValue="1" },4) -- HTPC socket

On XBMC configure (in the settings of the cover) to start play at startup Internet radio or your collection (Settings → Appearance → Skin → Settings: [url=http://wiki.xbmc.org/index.php?title=Confluence]http://wiki.xbmc.org/index.php?title=Confluence[/url]).

I’m having trouble getting the ‘Computer’ state to be anything other than ‘down’.
The IP under the XBMCstate plugin is correct, as is the MAC.

I can ping my IP manually in a CMD window just fine.

Any ideas? Cheers.

Edit: It seems to have corrected itself now…

Love the plugin, i am able to make it work perfectly with video starting/stopping and pausing/resuming.

The only thing i can seem to figure out is how to get the dimming, basically the second i hit start it goes from 100% to 30% instantly. Same for when i pause the movie, it goes from 30% to 70% instantly

Is there an easy way to do this?

Is there a way to setup a notification to tell me what movie is currently playing? I see that the vera ui shows it if I look at the status… would love to see a notification as well.

[quote=“johnes”]Is there a way to setup a notification to tell me what movie is currently playing? I see that the vera ui shows it if I look at the status… would love to see a notification as well.[/quote]I tried to get this working a while ago with Vera alerts but im not proficient enough to make the changes required to get it working reliably as I used video being played as a trigger and the name of the video variable in Vera alerts but it seem s the video play triggers happens before the name of the current video is updated to the variable

Rbf351 instead of having the scene activate immediately, have it delay a bit. I think I have mine set for 5 or 10 seconds.

I’ve just upgraded to UI7 and since then the plugin hasn’t worked. This is what the UI7 tells me but everything is set as it should be. XBMCState : IP Address is required in Device’s Advanced Settings!
I have tried removing and installing the plugin again, both in XBMC and vera.

Any help will be greatly appreciated.

rbf351, I don’t think that_kid’s suggestion will help. It will just cause your quick dim change to happen later. I don’t think there is any way to change the speed of your devices’ dimming. I think that is specific to each device.

I suppose something you could possibly try is to have a few delays and set some incremental dim levels that are a couple seconds apart.

-Nate Kinkead

@natekinkead

Oh I thought the command was firing too quickly upon movie start. I didn’t realize he wanted to change the dimming speed itself. In that case I have no idea how or if that’s possible

Great Plug-in. It is very cool.

I’m using XBMC for live tv as well, but I can see the plug-in returns video_start, Video_resume etc.

Is it posible to add tv_start etc. to the plug-in So I can have different scenes triggered if it is a video or live tv.

Regards dalhoj