Ankündigung

Einklappen
Keine Ankündigung bisher.

iRTrans Infrarot Gateway und EibPC, über TCP

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

    [EibParser] iRTrans Infrarot Gateway und EibPC, über TCP

    Guten Tag!

    Wollte nur kurz einen Erfolgsbericht loswerden (wahrscheindlich kalter Kaffee für Euch). Normal poste ich ja immer nur (hausgemachte) Probleme.

    Der EibPC arbeitet super mit dem iRTrans Infrarot Gateway zusammen.

    Das iRTrans Gateway besitzt einen Flashspeicher mit den gespeicherten IR-Codes. Ueber TCP können diese dann aufgerufen werden. Somit können off-the-shelf Geräte mit IP/KNX Welt verbunden werden, allerdings ohne Feedback.

    Gruss,

    Martin

    Hier der Code:

    [highlight=epc]

    // [iRtrans control]

    iRtransPort = 21000u16
    iRtransIP = 192.168.178.222
    iRtransSendDelay = 200u64
    iRtransInit=0b01

    BOSEon_off=0b01
    BOSEcbl_sat=0b01
    BOSEvol_plus=0b01
    BOSEvol_minus=0b01

    if event ("AVreceiver [Ein/Aus]-10/2/1") and ("AVreceiver [Ein/Aus]-10/2/1" == 0b01) then BOSEon_off=1b01 endif
    if event ("AVreceiver [Ein/Aus]-10/2/1") and ("AVreceiver [Ein/Aus]-10/2/1" == 1b01) then BOSEcbl_sat=1b01 endif

    if event ("AVreceiver [Vol+/-]-10/2/10") and ("AVreceiver [Vol+/-]-10/2/10" == 1b01) then BOSEvol_plus=1b01 endif
    if event ("AVreceiver [Vol+/-]-10/2/10") and ("AVreceiver [Vol+/-]-10/2/10" == 0b01) then BOSEvol_minus=1b01 endif


    if pbutton(1,MultiMediaPageID)==1 then {
    BOSEcbl_sat=1b01
    }endif

    if pbutton(1,MultiMediaPageID)==2 then {
    BOSEon_off=1b01
    }endif

    if pbutton(1,MultiMediaPageID)==3 then {
    BOSEvol_minus=1b01
    }endif

    if pbutton(1,MultiMediaPageID)==4 then {
    BOSEvol_plus=1b01
    }endif

    if BOSEon_off then connecttcp(iRtransPort, iRtransIP) endif
    if after(BOSEon_off, iRtransSendDelay) then sendtcp(iRtransPort, iRtransIP, $Asci$); iRtransInit=1b01; endif

    if after(iRtransInit and BOSEon_off, iRtransSendDelay) then {
    sendtcp(iRtransPort, iRtransIP, $Asnd bose,on_off$);
    closetcp(iRtransPort, iRtransIP);
    BOSEon_off=0b01;
    iRtransInit=0b01
    }endif

    if BOSEcbl_sat then connecttcp(iRtransPort, iRtransIP) endif
    if after(BOSEcbl_sat, iRtransSendDelay) then sendtcp(iRtransPort, iRtransIP, $Asci$); iRtransInit=1b01; endif

    if after(iRtransInit and BOSEcbl_sat, iRtransSendDelay) then {
    sendtcp(iRtransPort, iRtransIP, $Asnd bose,cbl/sat$);
    closetcp(iRtransPort, iRtransIP);
    BOSEcbl_sat=0b01;
    iRtransInit=0b01
    }endif

    if BOSEvol_plus then connecttcp(iRtransPort, iRtransIP) endif
    if after(BOSEvol_plus, iRtransSendDelay) then sendtcp(iRtransPort, iRtransIP, $Asci$); iRtransInit=1b01; endif

    if after(iRtransInit and BOSEvol_plus, iRtransSendDelay) then {
    sendtcp(iRtransPort, iRtransIP, $Asnd bose,vol+$);
    closetcp(iRtransPort, iRtransIP);
    BOSEvol_plus=0b01;
    iRtransInit=0b01
    }endif

    if BOSEvol_minus then connecttcp(iRtransPort, iRtransIP) endif
    if after(BOSEvol_minus, iRtransSendDelay) then sendtcp(iRtransPort, iRtransIP, $Asci$); iRtransInit=1b01; endif

    if after(iRtransInit and BOSEvol_minus, iRtransSendDelay) then {
    sendtcp(iRtransPort, iRtransIP, $Asnd bose,vol-$);
    closetcp(iRtransPort, iRtransIP);
    BOSEvol_minus=0b01;
    iRtransInit=0b01
    }endif


    // [iRtrans control] end

    [/highlight]

    #2
    Zitat von kropfm Beitrag anzeigen
    Guten Tag!
    Wollte nur kurz einen Erfolgsbericht loswerden (wahrscheindlich kalter Kaffee für Euch). Normal poste ich ja immer nur (hausgemachte) Probleme.
    Super Sache , !
    offizielles Supportforum für den Enertex® EibPC: https://knx-user-forum.de/eibpc/
    Enertex Produkte kaufen

    Kommentar


      #3
      Hi Martin,

      gute Sache. Das ist noch mal auf meinem Wunschzettel wenn wieder zuviel Geld auf der Bank ist ;-)

      Gruß,
      Bernd

      Kommentar


        #4
        Klasse Martin! Danke fürs Posten.

        @Michael: ich glaube die MakroSammlung wird immer umfangreicher

        PS:
        Noch ein kleiner Tip:
        Wenn du deinen Code mit {highlight=epc} und {/highlight} einrahmst wird er besser lesbar. Die "{" / "}" müssen durch "[" / "]" ersetzt werden.

        [highlight=epc]
        // [iRtrans control]

        iRtransPort = 21000u16
        iRtransIP = 192.168.178.222
        iRtransSendDelay = 200u64
        iRtransInit=0b01
        ...
        [/highlight]

        Kommentar


          #5
          Vielen Dank Euch für die Thumbs UP, und den Tipp. Werde ich mir merken!!

          Gruss,
          Martin

          Kommentar


            #6
            Gerne!

            BTW: Du kannst deinen Post auch noch ändern...

            Kommentar


              #7
              Weil ich es so genial finde

              Hols mal wieder hoch, da ich finde das die Steuerung des iRTrans über EibPC eine absolut gelungene Kombination ist.
              Habe den iRTrans heute erhalten. Ein wenig Einarbeitung, Zwei, Drei Fragen (Danke an viceversa und kropfm) und fertig (naja so gut wie fertig) war die Fernbedienung für den TV.
              Was generell noch fehlt um die Sache wirklich zu 100% rund zu machen, sind ein paar neue Icons und die Erweiterung/Abschaffung der momentanen 31 Zeichen-Begrenzung bei der Beschriftung der Elemente.
              Angehängte Dateien

              Kommentar


                #8
                @macflei

                Könntest Du uns das Projekt für den EibPC zur Verfügung stellen ?
                Wäre klasse.

                Danke und Gruß
                Olli

                Kommentar


                  #9
                  Hi,

                  hab seit gestern auch ein IRTrans (mit DB)...
                  hab jetzt testweise mal eine .rem Datei erstellt.. diese dann auf
                  das IRTrans gespielt... wenn ich jetzt im Eibpc den oben (von kropfm)
                  geposteten Code verwende, leuchtet zwar am IRTrans die Orange
                  Leuchte am Netzwerkport (Datenempfang) aber die SendeLED bleibt
                  aus.. und es wird auch kein Befehl gesendet...

                  über den IRTrans Client "Befehl senden" funktioniert es aber..

                  hier mal mein Code, den ich verwendet habe:

                  [highlight=epc]
                  //IRTrans

                  iRtransPort = 21000u16
                  iRtransIP = 192.168.178.20
                  iRtransSendDelay = 200u64
                  iRtransInit=0b01

                  TV_Power=0b01
                  TV_Cup=0b01
                  TV_Cdown=0b01


                  if pbutton(30,Konfig2ID)==1 then {
                  TV_Power=1b01
                  }endif

                  if pbutton(29,Konfig2ID)==1 then {
                  TV_Cup=1b01
                  }endif

                  if pbutton(31,Konfig2ID)==1 then {
                  TV_Cdown=1b01
                  }endif



                  if TV_Power then connecttcp(iRtransPort, iRtransIP) endif
                  if after(TV_Power, iRtransSendDelay) then sendtcp(iRtransPort, iRtransIP, $Asci$); iRtransInit=1b01; endif

                  if after(iRtransInit and TV_Power, iRtransSendDelay) then {
                  sendtcp(iRtransPort, iRtransIP, $led_tresen,on_off$);
                  closetcp(iRtransPort, iRtransIP);
                  TV_Power=0b01;
                  iRtransInit=0b01
                  }endif

                  if TV_Cup then connecttcp(iRtransPort, iRtransIP) endif
                  if after(TV_Cup, iRtransSendDelay) then sendtcp(iRtransPort, iRtransIP, $Asci$); iRtransInit=1b01; endif

                  if after(iRtransInit and TV_Cup, iRtransSendDelay) then {
                  sendtcp(iRtransPort, iRtransIP, $led_tresen,rot$);
                  closetcp(iRtransPort, iRtransIP);
                  TV_Cup=0b01;
                  iRtransInit=0b01
                  }endif

                  if TV_Cdown then connecttcp(iRtransPort, iRtransIP) endif
                  if after(TV_Cdown, iRtransSendDelay) then sendtcp(iRtransPort, iRtransIP, $Asci$); iRtransInit=1b01; endif

                  if after(iRtransInit and TV_Cdown, iRtransSendDelay) then {
                  sendtcp(iRtransPort, iRtransIP, $led_tresen,blau$);
                  closetcp(iRtransPort, iRtransIP);
                  TV_Cdown=0b01;
                  iRtransInit=0b01
                  }endif
                  [/highlight]

                  bitte keine Rücksicht auf die Variablennamen legen.. die hab ich vorher für
                  andere Tests verwendet... werden, wenn alles funtioniert natürlich angepasst..

                  Gruß Martin
                  Die Selbsthilfegruppe "UTF-8-Probleme" trifft sich diesmal abweichend im groüen Saal.

                  Kommentar


                    #10
                    erledigt...

                    hab das "Asnd" vergessen, weil ich irgendwie angenommen hab, die
                    "Remote" würde so heißen...

                    Gruß Martin
                    Die Selbsthilfegruppe "UTF-8-Probleme" trifft sich diesmal abweichend im groüen Saal.

                    Kommentar


                      #11
                      So,

                      nachdem das jetzt sehr gut funktioniert, hab ich den Code mal
                      in ein Macro gepackt.. also wer das braucht..

                      ist sicher einfacher damit das ganze zu implementieren..

                      Info: - getriggert würd über ne Variable...
                      - bitte aus der irtrans.lib.txt das .txt entfernen..


                      Gruß Martin
                      Angehängte Dateien
                      Die Selbsthilfegruppe "UTF-8-Probleme" trifft sich diesmal abweichend im groüen Saal.

                      Kommentar


                        #12
                        Hallo Martin

                        Vielen Dank für das Makro. Das macht die Sache schon ein bisschen ordentlicher. Vielleicht hilft mir ja Dein Code das ich die Vorgehensweise bei Makros endlich verstehe.

                        Beim Drüberschauen ist mir das Fehlen von Asnd (Ascii send) auch nicht aufgefallen.

                        Wünsche Dir einen Schönen Abend.

                        Gruss,

                        Martin

                        Kommentar


                          #13
                          Hi,

                          kein Thema.. mit Macros bin ich auch noch auf Kriegsfuß... aber mit
                          Copy&Paste komm ich schon recht weit

                          Gruß Martin
                          Die Selbsthilfegruppe "UTF-8-Probleme" trifft sich diesmal abweichend im groüen Saal.

                          Kommentar


                            #14
                            Zitat von Brick Beitrag anzeigen
                            Hi,
                            kein Thema.. mit Macros bin ich auch noch auf Kriegsfuß... aber mit
                            Woran haperts denn da?
                            offizielles Supportforum für den Enertex® EibPC: https://knx-user-forum.de/eibpc/
                            Enertex Produkte kaufen

                            Kommentar

                            Lädt...
                            X