Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. ioBroker Allgemein
    4. MQTT client: sendto erzeugt keine neuen Objekte

    NEWS

    • Wir empfehlen: Node.js 22.x

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker goes Matter ... Matter Adapter in Stable

    MQTT client: sendto erzeugt keine neuen Objekte

    This topic has been deleted. Only users with topic management privileges can see it.
    • K
      kraftcom @ticaki last edited by

      @ticaki Wie hast Du den MQTT Client konfiguriert?

      T 1 Reply Last reply Reply Quote 0
      • T
        ticaki Developer @kraftcom last edited by

        @kraftcom

        Bildschirmfoto 2023-12-30 um 18.18.40.png Bildschirmfoto 2023-12-30 um 18.18.53.png Bildschirmfoto 2023-12-30 um 18.19.06.png

        1 Reply Last reply Reply Quote 0
        • Marc Berg
          Marc Berg Most Active @kraftcom last edited by

          @kraftcom sagte in MQTT client: sendto erzeugt keine neuen Objekte:

          Habe MQTT client mit TTN Server verbunden und möchte Objekte automatisch über sendto erzeugen

          Was ist mit TTN Server gemeint?

          K 1 Reply Last reply Reply Quote 0
          • K
            kraftcom @Marc Berg last edited by

            @marc-berg TheThings Network Server für LoraWAN IOT Geräte

            Marc Berg 1 Reply Last reply Reply Quote 0
            • Marc Berg
              Marc Berg Most Active @kraftcom last edited by

              @kraftcom sagte in MQTT client: sendto erzeugt keine neuen Objekte:

              TheThings Network Server für LoraWAN IOT Geräte

              Ist dir schon klar, wie die Topics und Payloads aussehen müssen?

              K 1 Reply Last reply Reply Quote 0
              • K
                kraftcom @Marc Berg last edited by

                @marc-berg
                Ich wollte nur grundsätzlich tstetn und habe sendto wie folgt gesendet:
                sendTo('mqtt.1', 'sendMessage2Client', { topic: 'newtest/1', message: 'your message', retain: true });
                Damit sollte doch unter MQTT.1 ein Objekt newtest/1 mit Inhalt "your message" erscheinen, oder sehe ich daas falsch?

                T Marc Berg 2 Replies Last reply Reply Quote 0
                • T
                  ticaki Developer @kraftcom last edited by ticaki

                  @kraftcom

                  hier stand quark 🙂

                  hab das hier nochmal getestet und die States werden erstellt:

                  sendTo('mqtt.0', 'sendMessage2Client', {topic: 'test/test', message: '{"id":3, "src":"", "method":"Shelly.GetStatus", "params":{"id":0}}'});  
                  
                  
                  K 1 Reply Last reply Reply Quote 0
                  • Marc Berg
                    Marc Berg Most Active @kraftcom last edited by Marc Berg

                    gelöscht, nicht notwendig.

                    K 1 Reply Last reply Reply Quote 0
                    • K
                      kraftcom @ticaki last edited by

                      @ticaki
                      Bei mir rührt sich da garnichts, wenn ich deinen Aufruf für MQTT.1 verwende.

                      T 1 Reply Last reply Reply Quote 0
                      • T
                        ticaki Developer @kraftcom last edited by ticaki

                        @kraftcom

                        Installiere mal den mqtt explorer und schaue damit rein, wenn du was sendest. Sicher das du verbunden bist?

                        https://mqtt-explorer.com

                        K 1 Reply Last reply Reply Quote 0
                        • K
                          kraftcom @Marc Berg last edited by

                          @marc-berg
                          Ja, das funktioniert manuell schon.
                          Allerdings möchte ich mit sehr vielen IOT-Geräten arbeiten und muss das per Programm realisieren.
                          Da über Javascript und Blockly nicht in die MQTT-Struktur geschrieben werden kann, bleibt nur der Weg übe sendto - und genau das klappt bei mir nicht

                          T 1 Reply Last reply Reply Quote 0
                          • T
                            ticaki Developer @kraftcom last edited by ticaki

                            @kraftcom

                            Du kannst überall hin schreiben, nur sind dann alle sicherheitsfunktionen weg und bei einem Fehler zerschiesst du dir die Datenstrukur 🙂 bzw. der Admin kann den Müll dann nicht mehr anzeigen.

                            K 1 Reply Last reply Reply Quote 0
                            • K
                              kraftcom @ticaki last edited by

                              @ticaki
                              Ja, ich bin verbunden und arbeite seit ein paar Tagen darüber auch mit ein paar Heizreglern

                              1 Reply Last reply Reply Quote 0
                              • K
                                kraftcom @ticaki last edited by

                                @ticaki
                                wie geht das?
                                Habe gerade mit createState probiert in die Datenstruktur von MQTT zu schreiben - passiert aber nichts.

                                T 1 Reply Last reply Reply Quote 0
                                • T
                                  ticaki Developer @kraftcom last edited by ticaki

                                  @kraftcom

                                  setObjectmuss in der Konfig vom Javascript-Adapter erlaubt werden.

                                  Verwendung auf eigene Gefahr. Die beiden type sorgfältig anpassen und da nix ausprobieren.

                                  const dp = 'mqtt.1.test.test'
                                  const obj: any = {
                                              _id: '',
                                              type: 'state',
                                              common: {
                                                  name: 'Payload',
                                                  type: 'string',
                                                  role: 'text',
                                                  read: true,
                                                  write: true,
                                              },
                                              native:{}
                                          }
                                          extendObject(dp, obj);
                                  

                                  für javascript das :any entfernen

                                  EDIT: so jetzt fertig, war noch ein flüchtigkeitsfehler drin.

                                  K 1 Reply Last reply Reply Quote 0
                                  • K
                                    kraftcom @ticaki last edited by

                                    @ticaki
                                    Danke.
                                    Werde ich morgen bei "Tageslicht" ausprobieren

                                    T 1 Reply Last reply Reply Quote 0
                                    • T
                                      ticaki Developer @kraftcom last edited by

                                      @kraftcom

                                      Weiterführende Information zu dem obj

                                      https://github.com/ioBroker/ioBroker.docs/blob/master/docs/en/dev/objectsschema.md#objects

                                      mickym K 2 Replies Last reply Reply Quote 0
                                      • mickym
                                        mickym Most Active @ticaki last edited by mickym

                                        Man kann nicht fremde Adapterinstanzen ohne ein Präfix publizieren. Das habe ich alles schon x-mal geschrieben: https://forum.iobroker.net/post/847655 - ohne das jetzt alles wieder zu wiederholen.

                                        1 Reply Last reply Reply Quote 0
                                        • K
                                          kraftcom @ticaki last edited by

                                          @ticaki

                                          Deine Methode funktioniert - danke.
                                          Alle anderen Versuche mit sendto haben kein Ergebnis gebracht.
                                          Zumindest bin ich jetzt einen Schritt weiter in der automatisierten Konfiguration der MQTT-Clients.

                                          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

                                          894
                                          Online

                                          32.0k
                                          Users

                                          80.5k
                                          Topics

                                          1.3m
                                          Posts

                                          4
                                          21
                                          1283
                                          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