Results 1 to 4 of 4

Thread: Help needed for G5 migration off Homeseer

  1. #1
    Join Date
    Apr 2004
    Location
    Dearborn, MI
    Posts
    1,963

    Default Help needed for G5 migration off Homeseer

    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

  2. #2
    Join Date
    Dec 2001
    Posts
    11,560

    Default

    Hi John,

    On G5, would you copy and paste the log output so I can see exactly what the event looks like?

    Lua is different from VBS but the concepts are really similar. So transitioning will not be too hard. www.lua.org is a great place to start. And just ask here

    There is no case statement in lua.

    Once you show the output here, I will help you parse the event, and then we can work on sending the IR output to the right place.

  3. #3
    Join Date
    May 2004
    Location
    Cardigan, UK
    Posts
    9,278

    Default

    Quote Originally Posted by Mike C View Post
    There is no case statement in lua.
    But you can of course fake one using tables
    --Rob

  4. #4
    Join Date
    Apr 2004
    Location
    Dearborn, MI
    Posts
    1,963

    Default

    Everything is migrated over to G5 now... Homeseer has been shutdown. The Slink-e plugin is working great. Its very quick and stable.

    John

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •