Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: converting from 3 to 4

  1. #1
    Join Date
    Nov 2004
    Location
    East Sussex
    Posts
    47

    Default converting from 3 to 4

    Having problems converting a gml from Girder 3 to Girder 4

    below is some code which was written by Mark F and converted to Girder 4 by Mike it allows info from my Meridian proccessor (volume, Source etc.) to be displayed on Netremote.

    Initialize = function (self)

    self.Serial:RxClear()

    gir.LogMessage(self.Name, 'Port opened',3)
    self.Status = "Port opened"

    return serial.Classes.Queued.Initialize (self)

    end,


    ReceiveResponse = function ( self, data, code )

    if data then -- we received something

    -- define local variable for parsed data
    local fields={}
    -- parse the data (based on white space) into the fields table
    string.gsub(data, "(%w+)", function (w) table.insert(fields, w) end)

    if (sourceNames[fields[1]] ~= nil) then
    gir.TriggerEvent(self.GlobalName.." Source", 18, fields[1], fields[2])
    else
    gir.TriggerEvent(self.GlobalName.." Other", 18, fields[1], fields[2])
    end

    self:UpdateStatus (data)
    end

    if math.band (code,serial.INCOMPLETERESPONSETIMEOUT) > 0 and data then
    code = serial.zerobits (code,serial.INCOMPLETERESPONSETIMEOUT) --clear this flag
    end

    if math.band (code, serial.NORESPONSETIMEOUT) > 0 then -- no response to command
    end

    serial.Classes.Queued.ReceiveResponse (self,data,code)

    end,

    }
    )

    serial.AddDevice (device)


    This works fine but I am having problems sending this info from Girder to Netremote

    I used
    NetRemote.SendLabel("MeridianDSP",pld1) and
    NetRemote.SendLabel("MeridianVolume",pld2,pld1)

    in Girder 3 but it does not seem to work in Girder 4....... What do I need to change

    Thanks
    ROY MARRIOTT

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

    Default

    What's the problem - and where is this code located?
    --Rob

  3. #3
    Join Date
    Nov 2004
    Location
    East Sussex
    Posts
    47

    Default

    I control a Meridian proccessor with Netremote and Girder.....I had it working with Girder 3 but I am having trouble converting it to Girder 4.......

    A serial command was sent to the Meridian from Girder and the Meridian would send back info. to Girder.... this Girder event would trigger an action that would send that data to My (Dell Axim) running Netremote...i.e. displaying the change in source, volume, DSP setting etc.....

    The sending to and receiving data from the Meridian appears to be working, but I am unable to send the data to Netremote....

    I used an action with this script attached...

    NetRemote.SendLabel("MeridianVolume",pld2,pld1)

    Is this still used by Girder 4 or is there another way to send the data to Netremote....

    or is it a matter of changing the syntax....

    as a note my programming skills are zero.... and most of what I achieved before was with the kind help of people on this forum and a lot of trial and error ( a lot of error)

    thanks
    ROY MARRIOTT

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

    Default

    NetRemote.SendLabel should still work, although the recommended form is NetRemote.SetVariable

    Just to check, you do have NetRemote support enabled don't you?

    File|Settings - you should see NetRemote in the Automation section at the bottom left. Make sure that it's enabled
    --Rob

  5. #5
    Join Date
    Nov 2004
    Location
    East Sussex
    Posts
    47

    Default

    yes it is enabled..... it is controlling the Meridian....i.e. it increases the volume.

    When I test the action I get syntax error....with the statement below in interactive Lua console. (I think I may have mentioned this in another thred)

    "Volume Changed too old: read version 4.0; expected at least 5.0"
    ROY MARRIOTT

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

    Default

    Actually that's no guarantee that the feedback part is enabled.

    As I think I said in the other thread, you need to edit the volume changed action and save it so that it gets recompiled for Lua 5
    --Rob

  7. #7
    Join Date
    Nov 2004
    Location
    East Sussex
    Posts
    47

    Default

    Sorry I am not really sure what you mean........


    Hold on a second I think I might...........................
    ROY MARRIOTT

  8. #8
    Join Date
    Nov 2004
    Location
    East Sussex
    Posts
    47

    Default

    Yes............

    got it working again. Although it momenterally displays the code which was sent to the Meridian i.e. VP for Volume + and VM for Volume -. This is replaced by the actual volume. Is there somthing in the Meridian Serial plug in that was written for Girder 4 that is different than the one written for Girder 3

    Also My equipment is in a seperate under stairs cupboard and now with a PC in there as well, the temperature is getting a little hot......If I wanted to move the PC to a remote location what sort of equipment could I use to connect the PC to the Meridian (Wireless or not)

    thanks for all the help
    ROY MARRIOTT

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

    Default

    How far away?

  10. #10
    Join Date
    Nov 2004
    Location
    East Sussex
    Posts
    47

    Default

    ideally three rooms away.....one wall more than the wireless router is from the Meridian at the moment....
    ROY MARRIOTT

Posting Permissions

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