Ankündigung

Einklappen
Keine Ankündigung bisher.

Problem with duplicate GA

Einklappen
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

    Problem with duplicate GA

    Hello everyone.
    I have a simple routing function. Each received GA is forwarded to my PC via TCP.

    Part of code:
    [highlight=epc] if event(readknx(adr,info)) and TCP_ConnectionState == 0 then {
    sendtcp(Name_Port, 192.168.1.78,convert(adr,$$)+$=$+convert(info,$$)) ;
    }endif [/highlight]
    Everythings goes well but i've a strange behaviour when i query a GA (via ETS for example)
    If i query for read GA 2/4/2, for example, in the Eibstudio console everythings goes fine:

    % 2013-11-30 21:23:51 | Sender: 1.1.49 | GA: "Wh AC Essential BUS-2/4/9" | Value: 428.86 | Type: 32-Bit Floating Point | Write
    % 2013-11-30 21:23:55 | Sender: 15.15.0 | GA: "Wh Consumo TOTALE-2/4/2" | Value: ?% | Type: ?% | Read
    % 2013-11-30 21:23:55 | Sender: 1.1.49 | GA: "Wh Consumo TOTALE-2/4/2" | Value: 714.3 | Type: 32-Bit Floating Point | Reply


    ...but...

    The readknx function is triggered twice (with the GA received before the queried GA, then with the replied GA)

    For example, in the case above, i have:
    2/4/9=428.86
    2/4/2=714.3


    instead of only the
    2/4/2=714.3

    I need your help because i cannot figure out why this happens.

    #2
    Zitat von TheMax74 Beitrag anzeigen
    The readknx function is triggered twice (with the GA received before the queried GA, then with the replied GA)
    For example, in the case above, i have:
    2/4/9=428.86
    2/4/2=714.3
    That seems absolutely correct or I donot understand your post.
    offizielles Supportforum für den Enertex® EibPC: https://knx-user-forum.de/eibpc/
    Enertex Produkte kaufen

    Kommentar


      #3
      Yes it's a bit hard to explain, sorry.
      I receive telegrams as follow:

      ...
      ...
      ...
      2/4/9=428.86 <---- last ga from bus
      here i click READ on ETS on Ga 2/4/2
      2/4/9=428.86 <--- this is not from bus
      2/4/2=714.3 <---- this is the correct reply to the read

      Seems that the last arrived GA frum bus, is sent again after i ckick READ on ETS.
      The duplicated ga came not from bus and may vary, depending on what ga was sent from bus just before the click on the READ button.
      i hope it's more clear now.

      Kommentar


        #4
        Zitat von TheMax74 Beitrag anzeigen
        The duplicated ga came not from bus and may vary, depending on what ga was sent from bus just before the click on the READ button.
        i hope it's more clear now.
        Ah, I see. I think, the problem comes from the readknx: As an read on the bus contains no data, the readknx-Function just fills the last data into the arguments.
        You should try
        if eventwrite(readknx) ...
        or
        if eventwrite(readknx) or eventresponse(readknx) ...
        offizielles Supportforum für den Enertex® EibPC: https://knx-user-forum.de/eibpc/
        Enertex Produkte kaufen

        Kommentar


          #5
          Zitat von enertegus Beitrag anzeigen
          if eventwrite(readknx) ...
          No success. The GA 2/4/9 is duplicated and the response to the READ 2/4/2 is not trapped by the eventwrite

          Zitat von enertegus Beitrag anzeigen
          if eventwrite(readknx) or eventresponse(readknx) ...
          Same as readknx.

          Is there a reason to re-transmit the last readknx buffer if the telegram has no data?
          As i can see, the Eibstudio messages console can distinguish between "write", "read" and "reply" telegrams. Is there a way to do this, maybe with readrawknx ?

          Kommentar


            #6
            Zitat von TheMax74 Beitrag anzeigen
            No success. The GA 2/4/9 is duplicated and the response to the READ 2/4/2 is not trapped by the eventwrite
            I made a simple example:

            [highlight=epc]
            adr=0u16
            info=$$
            if event(readknx(adr,info)) and adr!=getaddress("TextDebug-0/2/100") then {
            write("TextDebug-0/2/100",convert(adr,$$c14));
            write("TextDebug-0/2/100",convert(info,$$c14));
            }endif
            [/highlight]

            I have e.g.
            Code:
            13-12-01 13:04:05 | Sender: 1.1.43 | GA: "BrennerTemperatur-3/3/2" | Wert: 54.0 | Typ: 16-Bit-Fliesskommazahl |  Schreiben
            % 2013-12-01 13:04:05 | Sender: EibPC | GA: "TextDebug-0/2/100" | Wert: 6914 | Typ: Text |  Schreiben
            % 2013-12-01 13:04:05 | Sender: EibPC | GA: "TextDebug-0/2/100" | Wert: 54.00 | Typ: Text |  Schreiben
            [B]% 2013-12-01 13:04:08 | Sender: 15.15.11 | GA: "RkBadTemp-3/2/13" | Wert: ?%  | Typ: ?%  |  Lesen
            % 2013-12-01 13:04:08 | Sender: 1.1.33 | GA: "RkBadTemp-3/2/13" | Wert: 20.3 | Typ: 16-Bit-Fliesskommazahl |  Antworten
            % 2013-12-01 13:04:08 | Sender: EibPC | GA: "TextDebug-0/2/100" | Wert: 6669 | Typ: Text |  Schreiben
            % 2013-12-01 13:04:08 | Sender: EibPC | GA: "TextDebug-0/2/100" | Wert: 20.30 | Typ: Text |  Schreiben[/B]
            % 2013-12-01 13:04:17 | Sender: 1.1.43 | GA: "WarmwasserIstWert-3/3/10" | Wert: 52.0 | Typ: 16-Bit-Fliesskommazahl |  Schreiben
            This is correct, I think.
            Hm, which FW do you use? Here I only have the actual beta Software.
            offizielles Supportforum für den Enertex® EibPC: https://knx-user-forum.de/eibpc/
            Enertex Produkte kaufen

            Kommentar


              #7
              My firmware is the latest stable.

              Thanks for your help. I've been modified my code as follows

              [highlight=epc]
              if event(readknx(adr,info)) and TCP_ConnectionState == 0 and adr!=getaddress('0/0/0'c14) then {
              sendtcp(Name_Port, 192.168.1.78,convert(adr,$$)+$=$+convert(info,$$)) ;
              // Send a value to a dummy GA to replace readknx buffer after a READ
              // GA Dummy!
              write('0/0/0'b01,AUS)

              }endif [/highlight]

              This seems to work but the traffic on the bus is doubled.
              It was wonder if you can fix the readknx function.
              Where can i download your beta?

              Kommentar


                #8
                Zitat von TheMax74 Beitrag anzeigen
                Where can i download your beta?
                The next update is only for free, if you bought the EibPC after 1.1.2013. If you have bought before, it will cost 98 Euro.
                offizielles Supportforum für den Enertex® EibPC: https://knx-user-forum.de/eibpc/
                Enertex Produkte kaufen

                Kommentar


                  #9
                  Ok, thanks for your kindly support, it's very great!

                  Kommentar


                    #10
                    Zitat von TheMax74 Beitrag anzeigen
                    This seems to work but the traffic on the bus is doubled.
                    Why doubled? Do you mean because of the write?
                    In my system, an read-event does not trigger any output.
                    If this is the case, an possible solution is to write the dummy only, after a read.
                    if eventread() then write(dummy...) endif
                    offizielles Supportforum für den Enertex® EibPC: https://knx-user-forum.de/eibpc/
                    Enertex Produkte kaufen

                    Kommentar


                      #11
                      Good idea.
                      But unfortunately doesn't work.
                      Sometimes "event" is trapped before "eventread" = before the write of the dummy GA

                      Kommentar

                      Lädt...
                      X