Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. ioBroker Allgemein
    4. TCP/IP Befehl über iobroker

    NEWS

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

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    TCP/IP Befehl über iobroker

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

      Hallo zusammen,

      ich habe ein LAN-Relais und möchte dieses über iobroker ansteuern.

      Gemäß der Beschreibung (siehe nachstehender Link) kann ich über TCP / IP Befehle die einzelnen Ports schalten:

      https://www.robot-electronics.co.uk/htm/eth_rly16tech1.htm

      Meine Frage:
      Wie sieht der Befehl denn in iobroker (Blockly) aus?
      Ich nehme an, dass ich unter dem Baustein "Aktionen" in dem Feld "exec" einen Befehl eintragen muss. Vielleicht kann mir jemand helfen.

      Herzlichen Dank !

      Gruß, Jörg

      1 Reply Last reply Reply Quote 0
      • A
        alf4711 last edited by

        Als Ergänzung hier die Erläuterung von der Homepage:

        TCP/IP Commands![Bild Text](Bild Link)
        The ETH-RLY16 can also be controlled using a simple command set sent over TCP/IP on port 17494 (0x4456).
        Most commands are only a single byte and if applicable the ETH-RLY16 will automatically send its response. The only exception to this being the "Set relay states" command which requires an additional desired states byte to be sent immediately after the command byte.

        8bd55c05-58cc-4529-a1ba-1a01f4f1917a-image.png

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

          Zu Blockly habe ich jetzt keine Info.

          Aber mit JavaScript könnte es so aussehen:

          var net = require('net');
          
          function sendMessage(host, port, message) {
            var client = net.connect({host: host, port: port}, function () {
              // 'connect' listener
              console.log('connected to LAN-Relais!');
              client.write(message);
            });
          
            client.on('data', function (data) {
              console.log(data.toString());
              client.end();
            });
          
            client.on('end', function () {
              console.log('disconnected from LAN-Relais');
            });
          
            client.on('error', function (error) {
              console.error('error: ' + error);
              client.end();
            });
          }
          
          sendMessage('192.168.1.10', 17494, '\x5A\r\n');  // ask for version
          sendMessage('192.168.1.10', 17494, '\x65\r\n');  // turn relay 1 on
          
          1 Reply Last reply Reply Quote 0
          • A
            alf4711 last edited by

            Dank Stabilostick !
            Wenn ich das in JavaScript einfüge und unten die IP-Adresse ändere tut sich nix...
            Muss ich oben bei "host: host, port: Port" irgendetwas vorgeben?

            Danke für die Zeit und Mühe.
            Bin absoluter Laie was das ganz angeht... 😞

            Stabilostick 1 Reply Last reply Reply Quote 0
            • A
              alf4711 last edited by

              javascript.0 script.js.AAA-Testphase.Test_Port_1: error: Error: connect ETIMEDOUT 192.168.178.xx:17494

              1 Reply Last reply Reply Quote 0
              • Stabilostick
                Stabilostick @alf4711 last edited by

                @alf4711

                Du musst im sendMessage unten die richtige IP Deines LAN-Relais eingeben (da wo 192.xxxx steht).

                1 Reply Last reply Reply Quote 0
                • A
                  alf4711 last edited by

                  ja, das habe ich. Die IP ist korrekt auch der Port ist offen.
                  Ich komme auch auf die Oberfläche der Karte, wo ich manuell einen Port öffnen kann.

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

                    Schon einmal unter Windows probiert, den Port anzusprechen?

                    telnet 192.168.178.xx 17494
                    

                    Was passiert da?

                    sigi234 1 Reply Last reply Reply Quote 0
                    • sigi234
                      sigi234 Forum Testing Most Active @Stabilostick last edited by

                      @Stabilostick

                      Vielleicht Firewall oder Virenscanner?

                      1 Reply Last reply Reply Quote 0
                      • A
                        alf4711 last edited by

                        c56e6f90-53e9-40c7-ae2e-19e2b2442c4e-image.png

                        1 Reply Last reply Reply Quote 0
                        • A
                          alf4711 last edited by

                          bekommt keine Verbindung.
                          Habe den Port 17494 als http tcp freigeschaltet:

                          cecea5e1-7145-4baa-9e80-5410b6dfe3e3-image.png

                          oder muss das ein anderer sein?

                          Stabilostick 1 Reply Last reply Reply Quote 0
                          • Stabilostick
                            Stabilostick @alf4711 last edited by Stabilostick

                            @alf4711

                            Ähm, welche Firewall ist das? Bei Windows ist normalerweise alles Ausgehende frei.

                            Bei der Rückmeldung ist entweder die IP falsch oder der Port unter der IP ist nicht freigeschaltet.

                            sigi234 1 Reply Last reply Reply Quote 0
                            • sigi234
                              sigi234 Forum Testing Most Active @Stabilostick last edited by

                              @Stabilostick sagte in TCP/IP Befehl über iobroker:

                              @alf4711

                              Ähm, welche Firewall ist das? Bei Windows ist normalerweise alles Ausgehende frei.

                              Bei der Rückmeldung ist entweder die IP falsch oder der Port unter der IP ist nicht freigeschaltet.

                              Schaut nach FritzBox aus........

                              1 Reply Last reply Reply Quote 0
                              • A
                                alf4711 last edited by

                                Firewall ist ausgeschaltet.
                                Ip-Adresse ist aber richtig.
                                in Fritz Box ist auch Port 17494 korrekt als TCP drin.

                                mmhhhhh

                                Stabilostick 1 Reply Last reply Reply Quote 0
                                • Stabilostick
                                  Stabilostick @alf4711 last edited by

                                  @alf4711
                                  Wenn Du IN Deinem Netzwerk von Gerät zu Gerät kommunizierst, dann hat die Firewall in der Fritzbox damit exakt NICHTS mit zu tun.

                                  1 Reply Last reply Reply Quote 0
                                  • A
                                    alf4711 last edited by

                                    3d6448d7-d88b-45ce-8cfc-8465e8f31cc5-image.png

                                    Stabilostick Homoran 2 Replies Last reply Reply Quote 0
                                    • Stabilostick
                                      Stabilostick @alf4711 last edited by Stabilostick

                                      @alf4711

                                      Ja und? Willst Du wirklich, dass das Relais aus dem Internet für jeden erreichbar ist? Da machst Du nämlich damit.

                                      1 Reply Last reply Reply Quote 0
                                      • Homoran
                                        Homoran Global Moderator Administrators @alf4711 last edited by Homoran

                                        @alf4711
                                        Damit kann jetzt jeder aus dem Internet über den port auf dein Gerät zugreifen

                                        1 Reply Last reply Reply Quote 0
                                        • A
                                          alf4711 last edited by

                                          nein natürlich nicht.
                                          was könnte ich denn noch probieren?

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

                                            Wie sieht das Programm aus, mit dem Du testest? Ist das der "Relay Module Test"?

                                            Natürlich nicht.

                                            Lösch diese Regel in der FB. Und alle Regeln, die Du für ioBroker usw. eingerichtet hast, wenn das Gerät nicht aus dme Internet erreichbar sein soll.

                                            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

                                            928
                                            Online

                                            31.6k
                                            Users

                                            79.6k
                                            Topics

                                            1.3m
                                            Posts

                                            lan tcp ip steuerung
                                            5
                                            36
                                            2936
                                            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