PDA

View Full Version : Get States from MCE to trigger action



cjean
October 11th, 2007, 03:00 PM
Hi gents,

We would like to see with you gents if its possible to have a plug-in for MCE to get the state of the interface (Live TV, DVD, Radio, etc...) The purpose would be to trigger action based on where we are in the interface. For example, when I'm playing Live TV, I would like to send to my receiver to switch to movie surround mode, when I'm playing music, I would like it to be in Stereo 7 channels.

This would require that Girder monitor MCE state change to get the info from Media Status Aggregation Service (MSAS). The task is similar to displaying MCE info on a VFD but in this case, we trigger action based on the status.

There is a thread already started on that subject but I think it is more appropriate to put it here since it need development.

http://www.promixis.com/forums/showthread.php?t=17236

I donít know if my request is clear enough but if not, feel free to ask questions. We are not asking you do do all the work but if you can help us with a good start then we will be able to finish the work.

Best regards,

Charles

Rob H
October 11th, 2007, 07:16 PM
I've had a brief look at the VB source (VB is not my favourite language) and I couldn't see anything obvious in there that couldn't be done in Lua and luacom.

Some formal documentation of MSAS would help.

cjean
October 11th, 2007, 08:39 PM
I've had a brief look at the VB source (VB is not my favourite language) and I couldn't see anything obvious in there that couldn't be done in Lua and luacom.

Some formal documentation of MSAS would help.

Thanks for your reply Rob,

What would you need then? Unfortunatly, I have no programming skills in VB or anything like that maybe I could help in MSDOS:grin:

What kind of info on MSAS would help you? There is a post already floating on a similar project but since the guy didn't have any skills in LUA he made his own program to talk with Girder. The info he provided is valuable, IMO.

Here is the link were you can download the work he did.

http://www.promixis.com/forums/showthread.php?t=17236

Let me know Rob if anything I can do to help you.

Thanks

Charles

cjean
October 11th, 2007, 08:43 PM
Hi Rob,

Sorry, I forgot this one...

Downloadable SDK for Media Center. http://www.microsoft.com/downloads/details.aspx?FamilyId=33839D15-FD6E-46BE-A3B3-EEB7A62D1B20&displaylang=en

Thanks

Charles

cjean
October 11th, 2007, 09:55 PM
Hi Rob,

Here is the MS link on MSAS. http://msdn2.microsoft.com/en-us/library/bb189477.aspx

Thank you,

Charles

Rob H
October 12th, 2007, 07:06 AM
Not sure that I'll have any time to look at this at the moment (getting ready to move house in a couple of weeks), but perhaps someone else will step up?

cjean
October 12th, 2007, 07:57 AM
Thanks Rob,

I understand your situation! Hapy move.

Anyone else wants to work on this project? I'm ready to pay what is worth for the developement.

Anyone?

Regards to all,

Charles

Tieske8
December 30th, 2007, 10:12 AM
Gave it a try over the weekend but I'm not into COM.

The SDK lists 2 objects;
1) MSAS (the MCE COM server that provides the information)
2) MediaState (the COM sink that is used to get the info from MSAS)

Question 1) MediaState is the preferred option to be used, but it is a .NET managed assembly. So I'm wondering, can I use that one at all from LuaCOM?

Question 2) Can someone provide me some sample code on how to create either of the objects, or access to them or whatever I need to have to get the events and properties?

Once I get that going, I think I can manage to do the remainder myself in Lua.

Any help would be greatly appreciated.

jin
March 1st, 2008, 10:53 PM
Hi, cjean.

I'm using MCE2005 with Girder4 and MCE-Spy with VFD very well. Before using MCE-Spy, my MCE2005 machine had several errors (missing recordings and not going standby mode) and I didn't use VFD (sasem on air).

Thanks to MCE-Spy, my machine didn't miss any recordings and go standby mode after recording very well and I could use VFD correctly for the first time. MCE-Spy is very useful for me, it's great.

Recently I got second TV card. And I programmed girder to apply the second TV card. But MCE-Spy didn't work correctly. For instance, the 1st recording starts it returns 'MSAS.SessionStart.Recording' and the 2nd recording starts it returns 'MSAS.SessionEnd.Recording' and 'MSAS.SessionStart.Recording' sequenly thou the 1st recording doesn't stop yet. And the 1st recording stops it returns 'MSAS.Error', the 2nd recording stops it returns 'MSAS.SessionEnd.Recording' correctly.

I eagerly hope that I use MCE-Spy normally with 2 TV cards.
I want you to fix that problem and to hear your idea about it.
Please send me e-mail.
Thanks and Regards.

jin
msjinhk@gmail.com

I found to get authority to post the form. ;-)

Tieske8
March 2nd, 2008, 01:21 PM
Hi Jin,

I don't use the recording info myself, so that's probably why I never noticed anything. I'm very busy at the moment so it might take me a while to look into it. When I have a moment to spare I'll give it a try to reproduce the behaviour you described.

Tieske

jin
March 2nd, 2008, 08:08 PM
Thanks, Tieske8.

R U the developer of MCE-Spy? I didn't recognize it, sorry.

One more thing about MCE-Spy is followed.

When WMC doesn't exists(not opened or closed) and start scheduled recording, it returns nothing(I guess, maybe it returns 'MSAS.Error').
And when WMC doesn't and stop scheduled recording, it returns 'MSAS.SessionEnd.Recording' .

Thank and Sorry again, Tieske.

jin
msjinhk@gmail.com

Tieske8
March 12th, 2008, 06:02 AM
Hi Jin,

regarding your first issue; when 2 recording sessions start, the 2nd start will sent a SessionEnd for the first one eventhough it is still recording.
I have been able to reproduce it, but unfortunately this is an issue in the underlying Microsoft dll's and hence not something I can fix. Sorry for not eing able to help you out.

What about the second item in your previous post; I don't understand your problem could you explain it once more.

thx.

jin
March 13th, 2008, 10:00 AM
Hi, Tieske.

The 2nd issue is not separted from 1st issue.
Ok, I talk it down to you.

Recording Start 1st program --- 'MSAS.SessionStart.Recording'
Recording Start 2nd program --- 'MSAS.SessionEnd.Recording',
'MSAS.SessionStart.Recording'
Recording Stop 1st program --- 'MSAS.Error.True'
'MSAS.Error.False'
Recording Stop 2nd program --- 'MSAS.SessionEnd.Recording'
'MSAS.Error.True'
'MSAS.Error.False'

'MSAS.Error.True' and 'MSAS.Error.False' might be revers.
That's all.

Thanks, a lot.

Tieske8
March 14th, 2008, 06:47 AM
Jin,

I didn't get the MSAS.Error.True/False in my test.

Be aware that these statements do not indicate that an error occured. If MSAS.Error.True occurs, it means that the small dialog box in the bottom right hand corner is visible in MCE. (eg. viewing conflict; "Can MCE change the channel? Yes No")

Eventhough it is called "Error" it only means the dialog is visible. Even if it is not an error but just some generic message or question.

regards,
Tieske

jin
March 15th, 2008, 05:29 AM
Tieske.

I didn't see any dialog box in the sequence of the previous mentioned issue.
I only can see the dialog box when I change the channel while recording 2 channels.

Anyway I fully understood what you said. It might be the problem of MCE2005.

Thanks and Regards.

blk
January 10th, 2009, 10:04 AM
Hi,

I need to be abel to know in a two tuner setup in mce whitch tuner/receiver is the active one. You know when recording from one and playing back on another. This will allow me to use hdmi hdtv from my two ip stb switced via my yamaha z9. As you know the mce can not record other than max s-vhs quality. This is ok but i want to be able to view live in HD.

Also does it work in girder 3.3?

Tieske8
January 11th, 2009, 09:21 AM
Actually I never used 3.3. But it uses the com object to forward the MCE events to Girder. You'll have to look up whether that functionality was avaialble in 3.3.

As for the tuners; I dunno whether it shows which recorder.

Regarding your problem; can you have girder disable/enable a device in device manager? so you can configure it to enable the HDTV tuner only when you're watching live tv, MCE will presumably use the other for recording stuff.

regards,
Tieske

Tieske8
January 11th, 2009, 02:30 PM
Hi blk,

just tested recording a session, see screenshot, these are the events caught and forwarded to Girder.

Basically nothing in there to identify the tuner used...

regards,
Tieske

Tieske8
May 17th, 2010, 09:35 AM
Today I moved the downloads, as I'm unable to get them updated on the promixis site.

You can find them here: http://www.thijsschreijer.nl/blog/?page_id=211