Page 1 of 5 123 ... LastLast
Results 1 to 10 of 50

Thread: Arcam AVP700 serial control question

  1. #1
    Join Date
    Jun 2005
    Location
    Beverly Hills, CA
    Posts
    479

    Default Arcam AVP700 serial control question

    OK Promixis team, I'm ready to take the gloves off and see if I can make real first use of G4 by serial controlling my Arcam AVP700. I recently picked it up from my business partner (who is an authorized dealer) and I have to say it sounds equally as sweet for movies and sounds better for music than my Theta CasaNova. A heck of a pre-pro for $2k retail, I highly recommend it. It even has balanced outputs.
    Anyway, I digress... (I'm such a kid when I get new toys...)

    Attached is the handbook for the AVP700. On page 35 it explains the serial format and specs out the commands. Should this work fine through G4?
    I'm reading the docs on how to do this in G4, but I am a long ways off- anyone care to help or provide a similar lua / gml that i can mod?

    If I can get this done i'll definitely post the files up on the site with an example ccf

    -Kurt
    Attached Files Attached Files

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

    Default

    Doesn't look too difficult - if Mike doesn't beat me to it later on today I'll post a simple serial device to get you going.
    --Rob

  3. #3
    Join Date
    Jun 2005
    Location
    Beverly Hills, CA
    Posts
    479

    Default

    That would be awesome- Thanks!

    -Kurt

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

    Default

    Quote Originally Posted by rah99
    Doesn't look too difficult - if Mike doesn't beat me to it later on today I'll post a simple serial device to get you going.
    Maybe in the moring... still hung over from bday party last night :P

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

    Default

    Okay - here's an example serial device which has functions defined for Mute, Unmute and AskMuteStatus.

    It should be fairly straighforward to add the rest. If you need some help with handling responses let me know.
    Attached Files Attached Files
    --Rob

  6. #6
    Join Date
    Jun 2005
    Location
    Beverly Hills, CA
    Posts
    479

    Default

    Awesome Rob, this is just what I needed. Many thanks!
    I added a bunch of settings to the lua so I think I have the hang of it. (attached)

    Now for some thick-headed questions...

    I know to drop this lua into G4, - Do I need to set up a gml file as well, or will I call on this directly from NR?

    How do I set up views for the responses from the arcam in NR? for instance, I'd like to have it display live status of volume, mute, surround mode, input- you know, the usual...

    Do I need to add anything else in these below sections of the lua? you have commented to 'add stuff here' but i'm not sure what to add, if neccessary:

    Initialize = function(self)
    if serial.Classes.Simple.Initialize(self) then
    -- add your own initializations here <--?
    self.Status = 'Initialized'
    return true
    end
    end,

    ReceiveResponse = function(self, data, code)
    if math.band(code, serial.RXCHAR) then
    -- add code here to process the data parameter <--?
    end
    serial.Classes.Simple.ReceiveResponse(self, data, code) -- must call the parent's ReceiveResponse
    end,
    Attached Files Attached Files

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

    Default

    Now there's a lot of questions!

    You'll need to add some code to ReceiveResponse() certainly.

    The responses always start with "AV_"

    So you'll start with code something like this :-
    Code:
    local _, _, replyCode, answerCode, p1, p2 = string.find&#40;data, 'AV_&#40;.&#41;&#40;.&#41;&#40;.&#41;&#40;.&#41;'&#41;
    From then on you need to analyse the responses - you can either do this using a series of
    Code:
    if replyCode == '*' then
    elseif replyCode == '.' then
    ...
    end
    or, you could set up a table indexed on the replyCode each entry of which would be a function that takes parameters answerCode, p1 and p2.
    My preference would be for the second of these.
    --Rob

  8. #8
    Join Date
    Jun 2005
    Location
    Beverly Hills, CA
    Posts
    479

    Default

    ok, that makes sense, but im still lost as what to do- Realize, I'm not a programmer at all- Can you write 1 example of each one so I know where to start? If i have a clear example i'm sure I can figure it out from there...

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

    Default

    Okay, let's stick with the if then elseif chain as it's a bit easier to follow.

    Source selection for example

    assume that we have a table declared earlier as follows :-
    Code:
    local sources = &#123;
       &#91;'0'&#93; = 'DVD',
       &#91;'1'&#93; = 'SAT',
       &#91;'2'&#93; = 'AV',
       &#91;'3'&#93; = 'AUX',
       &#91;'4'&#93; = 'VCR',
       &#91;'5'&#93; = 'CD',
       &#91;'6'&#93; = 'FM',
       &#91;'7'&#93; = 'AM',
       &#91;'8'&#93; = 'DVDA' ,
       &#91;';'&#93; = 'TAPE',
    &#125;
    Then we have this code in ReceiveResponse :-
    Code:
    if replyCode == '1' then -- Source selection
       if answerCode == 'P' then -- command was okay
          local zone = p1
          local source = p2
          NetRemote.SetVariable&#40;'Arcam.Zone'..zone..'.Source', sources&#91;source&#93;&#41;
       else
          -- report the error somehow e.g. using gir.LogMessage&#40;&#41;
       end
    end
    Now, in this version I've put the calls to NetRemote.SetVariable in the code directly, but I wouldn't really recommend that approach.

    It's better to use trigger a Girder event using e.g.

    Code:
    gir.TriggerEvent&#40;'Arcam.Source', ArcamDeviceId, zone, source&#41;
    where ArcamDeviceId is a device id in the 10000+ range which you can claim in this thread - http://www.promixis.com/phpBB2/viewtopic.php?t=12510
    That way you can do far more with the information than just send it on to NetRemote e.g. if someone switches the preamp to DVD mode manual or using the preamp's remote you could ensure that the DVD player is switched on too (assuming you have a discrete code for it or serial control).
    --Rob

  10. #10
    Join Date
    Jun 2005
    Location
    Beverly Hills, CA
    Posts
    479

    Default

    Thanks for the extra time Rob- Man i'm so freaking green with this, it's pathetic. It is going to take me a while to wrap my brain around it b/c I'm just not familiar enough yet with the concepts of how everything inter-relates between G and NR.

    The treescript DUI approach looks interesting, if I claim say 10033 for Arcam AVP700, that would be cool if it makes things easier, b/c I'm hoping that once this is done it will be something I can upload for anyone to use.- But I obviously don't have a clue how to set this up to call on it from NR. Are there any finished examples of other devices that use what you are describing, that I can take a look at? So far, that has been the easiest way for me to learn.

    [edit]- I reserved 10032 - Arcam AV Receiver. Mike added it to the registry. Now how do I use it?

    Apologies for the 200 questions- I hope this gets easier.. :-?

    -Kurt

Page 1 of 5 123 ... LastLast

Posting Permissions

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