Api

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • Geps
    Automated Home Guru
    • Nov 2010
    • 136

    Api

    Hi,

    I'm playing around with the API and on receipt of a IR signal I'm getting the following:

    20:14:30 < NetworkRunningState=9
    20:14:32 < Pulse=1
    20:14:33 < Lounge 1 IR Rx.On Frame received=4
    20:14:33 < Lounge 1 IR Rx.On Frame received=4
    20:14:33 < Lounge Macro.Busy=1
    20:14:33 < Lounge 1 IR Rx.Frame 4=0

    Is there any reason the IR Rx.On Frame line is repeated? It only shows up once in the communications window on Cortex so I assume it's just redundancy?

    Cheers,
  • Viv
    Automated Home Ninja
    • Dec 2004
    • 284

    #2
    A long explanation :-( ....

    The API is sending messages received from the Cortex internal communication network. That is the messages being transfered from one object to another. This is defined by the connections.

    In addition to the connections set-up by the user in the connections menus (static) their are also temporary connections made by the system (dynamic). For example if you have an intercom session, the cancel buttons on all panels have dynamic connections made to the 'All intercom object' to cancel a session. The cancel buttons are then released for another task at the end of a session.

    The Infrared receiver can be used to mimic the buttons on a panel. So you can sit in your arm chair and operated the panel and navigate menus etc. The buttons are no longer working directly how they are configured in the connections menu but all the buttons actions are steared towards a User defined Menu. The buttons are actioning their dynamic connections.

    So the bottom line is that the output of many objects will trigger their normal connections (static as set by user) and if applicable their dynamic connections (as reconfigured temporarily by the system).

    The API is tied into this interface and is seeing both static and dynamic 'pings'.
    I think it is not appropriate that the API sees the dynamic pings and we will change it in future updates.

    So the simple answer to you question is yes they are redundant.

    Viv.

    Comment

    • Geps
      Automated Home Guru
      • Nov 2010
      • 136

      #3
      Thanks Viv,

      The pings you refer to...is that the pulse line in the API?

      Cheers,

      Comment

      • achapman
        Automated Home Jr Member
        • Jan 2006
        • 43

        #4
        Hi Geps, by coincidence I've been doing the same thing too. I'm using Delphi what about you?
        I've found the API example code for Delphi didn't work with the versions I've got (Delphi 2007 and Delphi XE) and had to tweak the code slightly.

        The problem seemed to be the run-once code using a semaphore - I replaced it with code using a mutex and it works fine now.

        I've just been playing with switches and relays, haven't got on to IR yet.

        Comment

        • Viv
          Automated Home Ninja
          • Dec 2004
          • 284

          #5
          Was referring to the output of one object to another when I referred to pings.
          An update to Cortex is available version 25.2.11 which will resolve the double message problem.

          Viv

          Comment

          • Geps
            Automated Home Guru
            • Nov 2010
            • 136

            #6
            Thanks Viv

            Originally posted by achapman View Post
            Hi Geps, by coincidence I've been doing the same thing too. I'm using Delphi what about you?
            I've found the API example code for Delphi didn't work with the versions I've got (Delphi 2007 and Delphi XE) and had to tweak the code slightly.

            The problem seemed to be the run-once code using a semaphore - I replaced it with code using a mutex and it works fine now.

            I've just been playing with switches and relays, haven't got on to IR yet.
            Interesting question....I was looking to use either VB.net or C# but found that that the Visual Studio debugger was repeatedly crashing (a Google revealed others with the same problem in different software so I'm sure it's not an Idratek issue) in all but the oldest C# example. On restarting my PC it's now working so as I know VB (and C only in an embedded context) I think I will stick with VB for the moment.

            I'm trying to code up an Idranet RS232 gateway for use with some custom RGB lights - what project are you working on?

            Comment

            Working...
            X