PDA

View Full Version : Trigger Actions from LUA?



dbwagner
January 14th, 2004, 11:55 AM
I'm pretty much a newbie at Girder, but I do have a lot of programming experience, so hopefully my questions aren't too embarrasingly simple.

I understand how to trigger events in LUA, but what I really want to do is avoid having to define an action+event just so I can trigger it from LUA -- I really want to just embed the action I want right in my LUA code! Is there a general mechanism for doing this, or is it up to the plug-in designer to embed functions in LUA for doing this?

The main actions I'm interested in are X10 and IR. I've looked at the documentation for X10CM11a and Slinke and can't find any indication of how to invoke their actions directly from LUA. Does anyone know how?

Thanks in advance -- Dave

Promixis
January 14th, 2004, 12:04 PM
Hi Dave,

Being a lua fanatic myself, I wish I could do everything from lua without having to trigger events. This is possible for somethings but sadly not all. If you want to serial, you can do it from lua. IR can be received in lua using the luaevents plugin. You cannot send IR from lua - I have been buggin Jon (USB UIRT) to do this ;) If you want to Serial to X10 then you are ok. This should work for the slinke as well. Download and look at the readme in the serial plugin MarkF really did any awesome job on it.

Mike

miked
January 17th, 2004, 03:06 AM
Mike C -- question for you. So do you basically use Girder as a "shell" for Lua, and write long Lua programs to do what you want done? I'm just curious as to how people are integreating long Lua programs within Girder (and vice-versa).

Promixis
January 17th, 2004, 04:37 AM
Basically yes. I am essentially using Girder as a development enviroment for lua programs. Lua is easy to learn but sophisticated to do many complex tasks. Girder provides a way to control the outside world and get information from the outside world.