PDA

View Full Version : Can I pass a value from Girder to LUA



cb56
May 16th, 2008, 03:42 AM
I want to be able to call a LUA script from a Girder Action and pass a value to the script.
Can this be done?

Thanks.

blubberhoofd
May 16th, 2008, 03:10 PM
yes.

trigger the script using a girder event with payload.

that's the short answer, but you might want to elaborate on what you're trying to do ;)

cb56
May 16th, 2008, 10:51 PM
Many thanks Blubber. That worked!

FYI, I'm using MCEspy (actually I've modified the source code) to send volume change info from Media Centre to Girder.
Every time the volume is changed in Media Center my LUA script now gets a number between 0 and 50.

Now I need to convert the number into the appropriate "MV" command for my Denon AV receiver and send it via the serial port.

Next question:
How do I access the serial plugin from LUA?

Chris.

blubberhoofd
May 17th, 2008, 06:44 PM
have a look at 'help\getting started' from the main girder menu and search for 'serial library'

you might also want to search this forum for posts by other Denon owners.

cjean
June 16th, 2008, 05:15 PM
Many thanks Blubber. That worked!

FYI, I'm using MCEspy (actually I've modified the source code) to send volume change info from Media Centre to Girder.
Every time the volume is changed in Media Center my LUA script now gets a number between 0 and 50.

Now I need to convert the number into the appropriate "MV" command for my Denon AV receiver and send it via the serial port.

Next question:
How do I access the serial plugin from LUA?

Chris.

Chris,

You are a GENIOUS! You can't imagine for how long I'm looking into this thing. Not beign a programmer my self, I was stuck in the mud.

Do you mind to share your procedure & files?

Thanks

cb56
June 16th, 2008, 06:22 PM
Hello cjean,

Happy to share with you.
Are you using MCEspy?
Do you also have a Denon?

cjean
June 16th, 2008, 10:08 PM
Hello cjean,

Happy to share with you.
Are you using MCEspy?
Do you also have a Denon?


Hi cb56,

No I'm not using MCESpy because I found the instructions not very clear and also I couldn't figure how to pick-up the data from MCESpy and input them into Girder.

Yes, I'm a proud owner of a Denon 2308CI

I could see in your previous post that you modified it to make it work, specifically for volume control.

I posted a long time ago a long thread asking that feature... finally its here!

On top of that, when I'm going into RADIO within MCE 2005, I would like to ask Girder to send a command to switch the receiver to tuner mode, and if I quit, come back to my normal input (SPDIF). I don't know if its feasible but if not, I can deal without it.


see thread here

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

Thanks a lot!

Charles

cb56
June 17th, 2008, 08:55 AM
Here is my MCElistener (based on the MCE-spy VB source code) plus the GML code to make it work.
Hopefully you will find it straight forward enough.

I really only wrote this for myself (so it's very specific to my needs) but if you find it useful, let me know.
I have only tested on Vista MCE but it should hopefully work the same on MCE 2005.

This will map the MCE mute and volume changes to Denon commands. There is also a "raw" mode for anyone out there who wants to use this but doesn't have a Denon.

Your RADIO example is simple enough to accomodate.

Please see attached readme.


Chris...

cjean
June 17th, 2008, 09:10 AM
Hi Chris,

WOW, WOW WOW ! Wonderful work. The help file is great and intuitive.


Thanks again!

Best regards,

Charles