Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. ioBroker Allgemein
    4. KNX adapter?

    NEWS

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker@Smart Living Forum Solingen, 14.06. - Agenda added

    • ioBroker goes Matter ... Matter Adapter in Stable

    KNX adapter?

    This topic has been deleted. Only users with topic management privileges can see it.
    • ruhigundrelaxed
      ruhigundrelaxed last edited by

      So! Auf meinem Pi3 läufts….

      Ein kleines Vorwort:

      Da ich schon lange (ca. 3 Jahre) aus dem Thema Pi + eibd raus war, habe ich natürlich einiges an Entwicklung verschlafen.

      Damals war die Combi: Arm + eibd schon kein Spass. Aus diesem Grund, und aufgrund der Tatsache, das Martin schon länger nix an eibd getan hat, gibts ne Gruppe die das geforkt hat. Es heisst nun knxd...

      Als erste musst du eibd wieder entfernen. (remove any traces of the old eibd installation from /usr/local)

      Dann gehst du wie folgt vor (als nicht root user):

      1.) Abhängigkeiten installieren:

      sudo apt-get install git-core build-essential
      sudo apt-get install debhelper
      sudo apt-get install cdbs
      sudo apt-get install autoconf automake libtool
      sudo apt-get install  libsystemd-dev
      sudo apt-get install  libsystemd-daemon-dev
      sudo apt-get install dh-systemd
      
      

      Dann bauen wir uns ein debian Paket für pthsem und installieren es:

      wget https://www.auto.tuwien.ac.at/~mkoegler/pth/pthsem_2.0.8.tar.gz
      tar xzf pthsem_2.0.8.tar.gz
      cd pthsem-2.0.8
      sudo dpkg-buildpackage -b -uc
      cd ..
      sudo dpkg -i libpthsem*.deb
      
      

      Das gleiche machen wir für knxd:

      git clone https://github.com/knxd/knxd.git
      cd knxd
      dpkg-buildpackage -b -uc
      cd ..
      sudo dpkg -i knxd_*.deb knxd-tools_*.deb
      
      

      Dann konfigurieren wir den Daemon:

      Die Datei /etc/default/knxd editieren:

      START_KNXD=NO -> START_KNXD=YES
      DAEMON_ARGS="-u /tmp/eib -u /var/run/knx -i -b ip:" -> DAEMON_ARGS="-u /tmp/eib -u /var/run/knx -i -b ip:192.168.1.106"
      
      

      Die Datei /etc/knxd.conf editieren:

      -> KNXD_OPTS="-u /tmp/eib -i -DTRS -b ipt:192.168.1.106"
      
      

      Den Daemon starten:

      sudo /etc/init.d/knxd start
      
      

      Ausprobieren:

      knxtool groupsocketlisten ip:127.0.0.1
      
      

      Schalter drücken….

      Wenn alles geklappt hast, wird der daemon sauber über systemd gestartet und ist somit auch nach einem reboot verfügbar. Ferner hast du dann auch die debian Pakete, die du sichern kannst. Sollte eine Neuinstallation nötig sein kannst du einfach die Pakete installieren und von o.g. Schritten bleibt nur:

      sudo dpkg -i libpthsem*.deb, sudo dpkg -i knxd_.deb knxd-tools_.deb sowie der konfigurations Part über...

      Wenn alle Stricke reissen, dann bekommst du halt die Pakete von mir... 298_knxd_pthsem.zip

      Gruß

      1 Reply Last reply Reply Quote 0
      • L
        LJTom last edited by

        Hi Hat alles gepasst aber wenn ich den letzten befehl eingebe kommt:

        Unknown URL prefix, need 'local:' or 'ip:'

        Open failed: Invalid argument

        1 Reply Last reply Reply Quote 0
        • ruhigundrelaxed
          ruhigundrelaxed last edited by

          Poste bitte mal deine geänderten zeilen aus der:

          /etc/default/knxd

          Und

          /etc/knxd.conf

          Gruß

          Oder meinst du diesen befehl:

          knxtool groupsocketlisten ip:127.0.0.1

          Hast du mal geschaut ob der Adapter nicht schon funktioniert? Hab mal in die sourcen geschaut. Der Fehler wird geworfen wenn die ersten 3 zeichen des arguments nicht ip: sind bzw die ersten 6 nicht local: ! Strange…

          1 Reply Last reply Reply Quote 0
          • L
            LJTom last edited by

            Hi!!

            Also folgendes: Der Dienst läuft.

            Habe jetzt

             /usr/local/bin/groupsocketlisten ip:127.0.0.1
            
            

            eingegeben und jetzt gehts.

            Das ist ja schon mal suuper.

            Aber wenn ich jetzt einen Schalter betätige bekomme ich nichts angezeigt.

            Wenn ich in der Visu einen Klick au den selben Schalter mache zeigt er mir das an:

            Write from 0.0.1 to 1/0/0: 01

            Write from 0.0.1 to 1/0/0: 00

            Write from 0.0.1 to 1/0/0: 01

            Write from 0.0.1 to 1/0/0: 00

            Was ist ist das Write from?

            Sollte das mein KNX Interface sein? das Hat die Addresse 1/1/2

            To … is mir klar das ist mein Schaltaktorkanal für mein Bürolicht.

            1 Reply Last reply Reply Quote 0
            • ruhigundrelaxed
              ruhigundrelaxed last edited by

              Erstmal: Hurra! Der Dienst läuft.

              Allerdings hast du noch die client binarys von "eibd".
              > /usr/local/bin/groupsocketlisten ip:127.0.0.1
              Die neuen binary bündelt das alles. Daher:

              knxtool groupsocketlisten ip:127.0.0.1
              
              

              aber das nur n.b.

              Weil das Ergebnis ist wunderbar!

              Write from 0.0.1 to 1/0/0: 01
              Write from 0.0.1 to 1/0/0: 00
              Write from 0.0.1 to 1/0/0: 01
              Write from 0.0.1 to 1/0/0: 00
              
              

              1.) 0.0.1 ist die "Hardwareadresse" von knxd. (Nicht zu verwechseln mit deinem Backend (knx/ip)über das getunnelt wird)

              Die lässt sich per Parameter einstellen:

              --eibaddr=0.0.1
              
              

              Wobei 0.0.1 der default ist, wenn man nix angibt.

              Du schreibst also per visu (du meinst iobroker.vis??) "an" und "aus" an die ga 1/0/0 (die ga 1/0/0 sollte dann in ets mit dem schaltaktor kanal bestückt sein)

              Es sollte klicken und deine Bürolampe geht an.

              Sieht doch alles gut aus, was funktioniert denn nicht?

              Gruß

              1 Reply Last reply Reply Quote 0
              • L
                LJTom last edited by

                Hallo!

                Eben das die Bürolampe nicht angeht. Das ist das Probelm.

                Aber ich bekomme auch keine meldung auf meinen PI wenn ich im Haus eine Taste drücke.

                Wenn ich in der IO Viso die Bürolampe einschalten will schreibt er mir den Befehl ins Terminal aber nix passiert.

                Also hat knxd noch immer keine Verbindung zu meinem Interface, schätze ich einmal.

                Das noch das binary von eibd verwendet wird ist ein problem?

                Denn wenn ich nur:

                knxtool groupsocketlisten ip:127.0.0.1
                
                

                eingebe bekomme ich diesen fehler:

                Unknown URL prefix, need 'local:' or 'ip:'
                Open failed: Invalid argument
                
                
                1 Reply Last reply Reply Quote 0
                • ruhigundrelaxed
                  ruhigundrelaxed last edited by

                  > Also hat knxd noch immer keine Verbindung zu meinem Interface, schätze ich einmal.
                  Ich auch.

                  Wenn ich dieses Problem hatte war fast immer ets offen und hat das knx/ip blockiert.

                  Kannst du das ausschließen? Also ets zumachen und dann "/etc/init.d/knxd restart".

                  Ansonsten bitte mal die von dir geänderten Zeilen der beiden konfig files posten. was hattest du für ein knx/ip gateway? Hersteller, typ?

                  Die Tatsache, dass du die eibd binaries noch hast könnte bedeuten, dass der Schritt:
                  > Als erste musst du eibd wieder entfernen. (remove any traces of the old eibd installation from /usr/local)
                  nicht komplett war…

                  Die binaries selber sind unkritisch, zumal sie ja zu funktionieren scheinen. Aber evt. existieren noch andere Reste die stören...

                  Aber check erstmal das mit "ets offen" und dann poste die config zeilen und wir sehen weiter...

                  Gruß

                  1 Reply Last reply Reply Quote 0
                  • L
                    LJTom last edited by

                    Also:

                    1. ETS kann ich komplett ausschließen-> das läuft eigentlich auf einer anderen Maschine welche vom Netzwerk getrennt und heruntergefahren ist.

                    2. die knxd datei:

                    # Defaults for knxd initscript
                    # sourced by /etc/init.d/knxd
                    # installed at /etc/default/knxd by the maintainer scripts
                    
                    ########################################################################
                    # This file is ignored when using systemd: edit /etc/knxd.conf instead #
                    ########################################################################
                    
                    # start knxd when /etc/init.d/knxd start is run
                    # by default knxd does NOT start. set to YES to enable
                    START_KNXD=YES 
                    
                    # Additional options that are passed to the Daemon.
                    #
                    # sane default: route between local KNX clients and multicast
                    DAEMON_ARGS="-u /tmp/eib -u /var/run/knx -i -b ip:192.168.1.106"
                    
                    # Run `knxd --help` to get a complete list of available options and drivers.
                    
                    # If you have KNX hardware on a serial port or USB, add the appropriate
                    # "-b TYPE:…" option. In this case, you probably want to set up a multicast
                    # server, not a client (i.e. use "-D -T -R -S", not "-b ip:").
                    # DO NOT use both.
                    # 
                    # If your KNX hardware is a KNX/IP gateway that doesn't do multicast,
                    # use "-b ipt:192.168.1.2" (or its DNS name) to talk to it.
                    #
                    # KNX MUST NOT have more than one path between any two devices. Thus,
                    # you need to make sure that the KNX/IP gateway does not route multicast
                    # before you use both "-S" and "-b ipt:".
                    
                    # The default bus address of knxd is 0.0.1\. If that's in use in your KNX
                    # network (or if you run more than one knxd on your network), set a
                    # different address (-e 15.0.99).
                    
                    
                    1. knxd.conf:
                    # configuration for knxd.service
                    KNXD_OPTS="-u /tmp/eib -i -DTRS -b ip:192.168.1.106"
                    
                    # The default options are "-u /tmp/eib -b ip:"
                    # which tell knxd to route between all of
                    #  /tmp/eib (legacy socket (-u))
                    #  multicast client (-b ip:).
                    # The knxd.socket file also tells knxd to listen to
                    #  /run/eib (socket activation via systemd)
                    #  TCP port 6720 (socket activation via systemd)
                    
                    # *** DO NOT use "-u" / "-u /run/knx" or "-i" / "-i 6720" here.
                    # Systemd already does that on behalf of knxd, via 'knx.socket'.
                    
                    # If you have KNX hardware on a serial port or USB, add the appropriate
                    # "-b TYPE:…" option. In this case, you probably want to set up a multicast
                    # server, not a client (i.e. use "-D -T -R -S", not "-b ip:").
                    # DO NOT use both.
                    # 
                    # If your KNX hardware is a KNX/IP gateway that doesn't do multicast,
                    # use "-b ipt:192.168.1.2" (or its DNS name) to talk to it.
                    #
                    # KNX MUST NOT have more than one path between any two devices. Thus,
                    # you need to make sure that the KNX/IP gateway does not route multicast
                    # before you use both "-S" and "-b ipt:".
                    
                    # The default bus address of knxd is 0.0.1\. If that's in use in your KNX
                    # network (or if you run more than one knxd on your network), set a
                    # different address (-e 15.0.99).
                    
                    # Run `knxd --help` to get a complete list of available options and drivers.
                    
                    ## DO NOT use the following options:
                    ## -i           -- /lib/systemd/system/knxd.socket does this for us
                    ## -u /run/knx  -- likewise
                    ## -d           -- /lib/systemd/system/knxd.service expects knxd to run in the foreground
                    
                    ###############################################################################
                    # This file is ignored when NOT using systemd: edit /etc/default/knxd instead #
                    ###############################################################################
                    
                    

                    So 4)

                    Wenn ich knxd neustarte mit

                    /etc/init.d/knxd restart
                    
                    

                    bekomme ich im Terminal die Fehlermeldung:

                    root@raspberrypi:~# /etc/init.d/knxd restart
                    [....] Restarting knxd (via systemctl): knxd.serviceJob for knxd.service failed. See 'systemctl status knxd.service' and 'journalctl -xn' for details.
                     failed!
                    
                    

                    Wenn ich dann "systemctl status knxd.service" aufrufe bekomme ich das:

                    root@raspberrypi:~# systemctl status knxd.service
                    ● knxd.service - KNX Daemon
                       Loaded: loaded (/lib/systemd/system/knxd.service; enabled)
                       Active: activating (auto-restart) (Result: exit-code) since Sa 2016-08-20 12:00:41 CEST; 6s ago
                      Process: 1209 ExecStart=/usr/bin/knxd $KNXD_OPTS (code=exited, status=1/FAILURE)
                     Main PID: 1209 (code=exited, status=1/FAILURE)
                    
                    Aug 20 12:00:41 raspberrypi systemd[1]: Failed to start KNX Daemon.
                    Aug 20 12:00:41 raspberrypi systemd[1]: Unit knxd.service entered failed state.
                    Hint: Some lines were ellipsized, use -l to show in full.
                    
                    

                    So jetzt glaube ich hätte ich mal alle meldungen durch!! Hoffe das Hilft.

                    Danke für deine bemühungen!! :!:

                    Achja mein Interface ist ein Weinzierl KNX/IP 730

                    1 Reply Last reply Reply Quote 0
                    • ruhigundrelaxed
                      ruhigundrelaxed last edited by

                      > Danke für deine bemühungen!! :!:

                      Dafür gibts doch den "Danke" button. 😉

                      Die gute Nachricht vorweg: Dein KNX/IP ist baugleiche mit meinem. Also kann es daran nicht liegen…

                      Was mir allerdings auffällt ist: In der Datei knxd.conf hast du: ip:192.168.1.106 stehen. Mach da mal ein ipt:192.168.1.106 draus.

                      Dannach ein "/etc/init.d/knxd restart" und schauen ob der daemon hoch kommt.

                      Gruß

                      1 Reply Last reply Reply Quote 0
                      • L
                        LJTom last edited by

                        HI!

                        Nein leider :

                        root@raspberrypi:~# systemctl status knxd.service
                        ● knxd.service - KNX Daemon
                           Loaded: loaded (/lib/systemd/system/knxd.service; enabled)
                           Active: activating (auto-restart) (Result: exit-code) since Sa 2016-08-20 12:25:31 CEST; 7s ago
                          Process: 2297 ExecStart=/usr/bin/knxd $KNXD_OPTS (code=exited, status=1/FAILURE)
                         Main PID: 2297 (code=exited, status=1/FAILURE)
                        
                        Aug 20 12:25:31 raspberrypi systemd[1]: knxd.service: main process exited, c...E
                        Aug 20 12:25:31 raspberrypi systemd[1]: Failed to start KNX Daemon.
                        Aug 20 12:25:31 raspberrypi systemd[1]: Unit knxd.service entered failed state.
                        Hint: Some lines were ellipsized, use -l to show in full.
                        
                        
                        1 Reply Last reply Reply Quote 0
                        • ruhigundrelaxed
                          ruhigundrelaxed last edited by

                          Hmmm… was passiert denn wenn du:

                          sudo /usr/bin/knxd --eibaddr=0.0.230 -u /tmp/eib -u /var/run/knx -i -DTRS -b ipt:192.168.1.106
                          

                          abfeuerst?

                          1 Reply Last reply Reply Quote 0
                          • L
                            LJTom last edited by

                            Da passiert:

                            E00000013: OpenInetSocket 6720: bind: Address already in use
                            initialisation of the knxd inet protocol failed: Address already in use
                            
                            
                            1 Reply Last reply Reply Quote 0
                            • ruhigundrelaxed
                              ruhigundrelaxed last edited by

                              Aha!

                              Was sagt:````
                              sudo netstat -tulpen|grep 6720

                              1 Reply Last reply Reply Quote 0
                              • L
                                LJTom last edited by

                                Das meint:

                                tcp6       0      0 :::6720                 :::*                    LISTEN      0          7512        1/init
                                
                                
                                1 Reply Last reply Reply Quote 0
                                • ruhigundrelaxed
                                  ruhigundrelaxed last edited by

                                  sudo ps aux |grep eibd
                                  

                                  und

                                  sudo ps aux |grep knxd
                                  
                                  1 Reply Last reply Reply Quote 0
                                  • L
                                    LJTom last edited by

                                    root      1060  0.2  3.1 125832 29520 ?        Sl   11:57   0:05 io.eibd.0      
                                    root      2650  0.0  0.1   4300  1840 pts/0    S+   12:41   0:00 grep eibd
                                    
                                    
                                    root      2662  0.0  0.1   4296  1812 pts/0    S+   12:41   0:00 grep knxd
                                    
                                    
                                    1 Reply Last reply Reply Quote 0
                                    • ruhigundrelaxed
                                      ruhigundrelaxed last edited by

                                      Ich bin verwirrt….

                                      Warum ist den der socket offen?

                                      Was sagt:

                                      systemctl -all list-sockets |grep 6720
                                      
                                      1 Reply Last reply Reply Quote 0
                                      • L
                                        LJTom last edited by

                                        Der sagt:

                                        [::]:6720                       knxd.socket                     knxd.service
                                        
                                        
                                        1 Reply Last reply Reply Quote 0
                                        • ruhigundrelaxed
                                          ruhigundrelaxed last edited by

                                          Aber trotzdem sagt systemd das der Dienst nicht startet…

                                          Machmal:

                                          > systemctl stop knxd

                                          dannach nochmal schauen ob der socket zu ist:

                                          systemctl -all list-sockets |grep 6720

                                          1 Reply Last reply Reply Quote 0
                                          • L
                                            LJTom last edited by

                                            Jetzt schauts so aus:

                                            root@raspberrypi:~# systemctl stop knxd
                                            Warning: Stopping knxd.service, but it can still be activated by:
                                              knxd.socket
                                            root@raspberrypi:~# systemctl -all list-sockets |grep 6720
                                            [::]:6720                       knxd.socket                     knxd.service
                                            
                                            
                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate
                                            FAQ Cloud / IOT
                                            HowTo: Node.js-Update
                                            HowTo: Backup/Restore
                                            Downloads
                                            BLOG

                                            708
                                            Online

                                            31.9k
                                            Users

                                            80.1k
                                            Topics

                                            1.3m
                                            Posts

                                            7
                                            93
                                            14362
                                            Loading More Posts
                                            • Oldest to Newest
                                            • Newest to Oldest
                                            • Most Votes
                                            Reply
                                            • Reply as topic
                                            Log in to reply
                                            Community
                                            Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
                                            The ioBroker Community 2014-2023
                                            logo