Ok I need some help being a total LUA newbie.
I will describe a small example of what I do to demonstrate.
Right now for my 5 zone audio equipment using Slink-e, hsGirder and Homeseer setup I set a variable in Netremote when I select the zone to control. For instance when I hit the 'Den' button I use:
NRBasic Set variable to value (TA.Value2,2)
then on my main play screen when I hit the volume up button I use
Girder Send Event to Girder (nrMCJ.volup.{TA.Value2})
This gets sent to the hsGirder plugin for Homeseer which essentially runs a script called nrMCJ (based on the first section of the payload) where the payload gets parsed out. The second part of the payload is used in a case statement and executes the 'volup' case. The third part of the payload selects which receiver to send the IR command to:
nrMCJ script (abbreviated)
Function NetRemoteIn(parms)
dim hsg, hParm, Plist
dim dd
dim ZoneAtIP, ZoneAtIPCurrent, icon1, icon2, icon3
hParm = split(parms,"~") ' split up the input parameter string
nrIPAddr = hParm(0) ' The IP address of the NetRemote client
nrName = hParm(1) ' NetBios name, not guaranteed, of the NetRemote client
nrEvent = hParm(2) ' The Event name passed
nrPayload = hParm(3) ' The Payload as passed by NetRemote client
Set hsg = hs.Plugin("hsGirder") ' get addressability to the plugin
' hs.writelog "nrEvent? =", nrEvent
' hs.writelog "nrPayload? =", nrPayload
plist = split(nrEvent,".") ' event is period '.' delimited
imagepath = ".\data\hsGirder\"
select case lcase(plist(1))
case "volup"
Select Case lcase(plist(2))
Case 1
for xx=1 to 10
hs.sendir "Sony80ES,vol+"
next
Case 2
hs.sendir "technics,v_up"
Case 3
hs.sendir "technics_2,v_up"
Case 4
hs.sendir "technics_3,v_up"
Case 5
hs.sendir "technics_4,v_up"
End Select
case else
hs.writelog "nrMCJ","Invalid command received: " & nrevent
end select
end function
So I need to duplicate this basic function for Girder 5. Trouble is I have no idea where to start. I understand VBS basics but am not familiar enough with G5 or LUA to tackle this. Can anyone give me some ideas as to where to start.
I plan on using SteveV's SLinkEx - IR TX/RX plugin.
Any help would be appreciated (remember I am a total newbie for LUA and Girder)
Thanks
John


Reply With Quote

