MQTT Gateway JSON

Einklappen
X
 
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge
  • eisenkarl
    Lox Guru
    • 28.08.2015
    • 1350

    #1

    MQTT Gateway JSON

    Hallo, ich habe einen PLAATO AIRLOCK https://plaato.io/apps/help-center#hc-values
    Dieser kann alle 5 Min per Webhook eine JSON mit seinen Daten senden.

    Wenn ich das richtig verstanden habe, kann ich das JSON mit dem MQTT Gateway empfangen, wenn ich die Daten an
    http://loxberry/plugins/mqttgateway/receive.php sende.
    Leider kommen keine Daten an, was könnte das Problem sein?
  • Christian Fenzl
    Lebende Foren Legende
    • 31.08.2015
    • 11237

    #2
    Ich hab jetzt keine Screenshots gefunden, wie man bei Plaato den Webhook einrichtet.
    Einen Hinweis hab ich bei Home Assistant gefunden, „WEBHOOK (AIRLOCK ONLY)“
    das trifft wohl zu, wenn du es einstellen kannst?

    Sonst noch:
    Subscription prüfen (ggf. Mal einfach nur # abonnieren für alles)
    Vielleicht auch statt loxberry die IP, wenn das Gerät den DNS-Lookup nicht schaffen sollte.

    Ein Log auf Plaato-Seite gibt’s nicht, wo man sehen könnte, wann, wie und ob erfolgreich der Request gesendet wurde?

    lg, Christian

    Hilfe für die Menschen der Ukraine: https://www.loxforum.com/forum/proje...Cr-die-ukraine

    Kommentar

    • eisenkarl
      Lox Guru
      • 28.08.2015
      • 1350

      #3
      Hallo und Danke für deine Rückmeldung!
      Ich kann den Webhook einstellen und das habe ich auch per IP gemacht, nicht den Namen verwendet. Prinzipiell kommen die rcvr auch am Loxberry an (einfach mal die URL im Browser geöffnet), nur nicht vom Plaato ;-(
      Scheint dann wohl am Plaato zu liegen.

      Kommentar

      • Christian Fenzl
        Lebende Foren Legende
        • 31.08.2015
        • 11237

        #4
        Zeig mal einen Screenshot, wie das in Plaato aussieht.

        Es kann natürlich auch den Receiver selbst "aufhauen".
        Für jeden Aufruf (egal ob erfolgreich oder nicht) gibt es einen Log-Eintrag unter Group 'Receiver':
        Klicke auf die Grafik für eine vergrößerte Ansicht

Name: reveiver-log.PNG
Ansichten: 357
Größe: 102,6 KB
ID: 303940

        Auch wenn der Receiver warum auch immer scheitert, müsstest du bei einem Call von Plaato zumindest einen Eintrag vom Start sehen.

        Wenn du da eine Zeile siehst, ist es vielleicht ein Fehler im Receiver! In dem Fall schick mir das Log durch.

        lg, Christian

        Hilfe für die Menschen der Ukraine: https://www.loxforum.com/forum/proje...Cr-die-ukraine

        Kommentar

        • eisenkarl
          Lox Guru
          • 28.08.2015
          • 1350

          #5
          Nein, leider keinen LOG Eintrag, nur den vom Browsertest.
          Hier mal Screenshot vom Webhook Eintrag:

          Kommentar

          • Christian Fenzl
            Lebende Foren Legende
            • 31.08.2015
            • 11237

            #6
            Dann sorry, keine Idee...
            Lass den Webhook einfach mal drin, vielleicht braucht Plaato einfach ein bisschen „Bedenkzeit“.


            BTW Da stand auch sowas wie „solange der Airlock am Strom hängt und im Wifi ist“. Kann das Gerät Evt. sowohl mit Batterie als auch mit Kabel versorgt werden?
            Zuletzt geändert von Christian Fenzl; 07.05.2021, 15:46.
            Hilfe für die Menschen der Ukraine: https://www.loxforum.com/forum/proje...Cr-die-ukraine

            Kommentar

            • eisenkarl
              Lox Guru
              • 28.08.2015
              • 1350

              #7
              Christian Fenzl
              Nein, das Gerät läuft nur, wenn es am USB Ladegerät hängt.
              Ich vermute jetzt aber, dass die Daten nur von extern kommen, also vom Plaato Server. Die API ist auch nur extern erreichbar...
              Somit müsste ich den MQTT von "AUSSEN" erreichbar machen, zumindest mal ein Versuch wert.

              EDIT:
              Meine Vermutung hat gepasst, die Daten kommen von AUSSEN

              Code:
               [TABLE]
              [TR]
              [/TR]
              [TR]
              [TD][IMG2=JSON]{"data-align":"none","data-size":"full","src":"http:\/\/192.168.9.13\/admin\/plugins\/mqttgateway\/images\/icon-notfound.png"}[/IMG2]rcvr_138.68.110.107_BODY_abv[/TD]
               			[TD]0[/TD]
               			[TD]09.05. 19:43:45 [URL=http://192.168.9.13/admin/plugins/mqttgateway/index.cgi?form=topics#][IMG2=JSON]{"data-align":"none","data-size":"full","src":"http:\/\/192.168.9.13\/admin\/plugins\/mqttgateway\/images\/icon-trash.png"}[/IMG2][/URL][/TD]
               		[/TR]
              [TR]
              [TD][IMG2=JSON]{"data-align":"none","data-size":"full","src":"http:\/\/192.168.9.13\/admin\/plugins\/mqttgateway\/images\/icon-notfound.png"}[/IMG2]rcvr_138.68.110.107_BODY_batch##_volume[/TD]
               			[TD]16.8[/TD]
               			[TD]09.05. 19:43:45 [URL=http://192.168.9.13/admin/plugins/mqttgateway/index.cgi?form=topics#][IMG2=JSON]{"data-align":"none","data-size":"full","src":"http:\/\/192.168.9.13\/admin\/plugins\/mqttgateway\/images\/icon-trash.png"}[/IMG2][/URL][/TD]
               		[/TR]
              [TR]
              [TD][IMG2=JSON]{"data-align":"none","data-size":"full","src":"http:\/\/192.168.9.13\/admin\/plugins\/mqttgateway\/images\/icon-notfound.png"}[/IMG2]rcvr_138.68.110.107_BODY_bpm[/TD]
               			[TD]0[/TD]
               			[TD]09.05. 19:43:45 [URL=http://192.168.9.13/admin/plugins/mqttgateway/index.cgi?form=topics#][IMG2=JSON]{"data-align":"none","data-size":"full","src":"http:\/\/192.168.9.13\/admin\/plugins\/mqttgateway\/images\/icon-trash.png"}[/IMG2][/URL][/TD]
               		[/TR]
              [TR]
              [TD][IMG2=JSON]{"data-align":"none","data-size":"full","src":"http:\/\/192.168.9.13\/admin\/plugins\/mqttgateway\/images\/icon-notfound.png"}[/IMG2]rcvr_138.68.110.107_BODY_bubbles[/TD]
               			[TD]0[/TD]
               			[TD]09.05. 19:43:45 [URL=http://192.168.9.13/admin/plugins/mqttgateway/index.cgi?form=topics#][IMG2=JSON]{"data-align":"none","data-size":"full","src":"http:\/\/192.168.9.13\/admin\/plugins\/mqttgateway\/images\/icon-trash.png"}[/IMG2][/URL][/TD]
               		[/TR]
              [TR]
              [TD][IMG2=JSON]{"data-align":"none","data-size":"full","src":"http:\/\/192.168.9.13\/admin\/plugins\/mqttgateway\/images\/icon-notfound.png"}[/IMG2]rcvr_138.68.110.107_BODY_co2##_volume[/TD]
               			[TD]0[/TD]
               			[TD]09.05. 19:43:45 [URL=http://192.168.9.13/admin/plugins/mqttgateway/index.cgi?form=topics#][IMG2=JSON]{"data-align":"none","data-size":"full","src":"http:\/\/192.168.9.13\/admin\/plugins\/mqttgateway\/images\/icon-trash.png"}[/IMG2][/URL][/TD]
               		[/TR]
              [TR]
              [TD][IMG2=JSON]{"data-align":"none","data-size":"full","src":"http:\/\/192.168.9.13\/admin\/plugins\/mqttgateway\/images\/icon-notfound.png"}[/IMG2]rcvr_138.68.110.107_BODY_device##_id[/TD]
               			[TD]0[/TD]
               			[TD]09.05. 19:43:45 [URL=http://192.168.9.13/admin/plugins/mqttgateway/index.cgi?form=topics#][IMG2=JSON]{"data-align":"none","data-size":"full","src":"http:\/\/192.168.9.13\/admin\/plugins\/mqttgateway\/images\/icon-trash.png"}[/IMG2][/URL][/TD]
               		[/TR]
              [TR]
              [TD][IMG2=JSON]{"data-align":"none","data-size":"full","src":"http:\/\/192.168.9.13\/admin\/plugins\/mqttgateway\/images\/icon-notfound.png"}[/IMG2]rcvr_138.68.110.107_BODY_device##_name[/TD]
               			[TD]Plaato[/TD]
               			[TD]09.05. 19:43:45 [URL=http://192.168.9.13/admin/plugins/mqttgateway/index.cgi?form=topics#][IMG2=JSON]{"data-align":"none","data-size":"full","src":"http:\/\/192.168.9.13\/admin\/plugins\/mqttgateway\/images\/icon-trash.png"}[/IMG2][/URL][/TD]
               		[/TR]
              [TR]
              [TD][IMG2=JSON]{"data-align":"none","data-size":"full","src":"http:\/\/192.168.9.13\/admin\/plugins\/mqttgateway\/images\/icon-notfound.png"}[/IMG2]rcvr_138.68.110.107_BODY_og[/TD]
               			[TD]1.048[/TD]
               			[TD]09.05. 19:43:45 [URL=http://192.168.9.13/admin/plugins/mqttgateway/index.cgi?form=topics#][IMG2=JSON]{"data-align":"none","data-size":"full","src":"http:\/\/192.168.9.13\/admin\/plugins\/mqttgateway\/images\/icon-trash.png"}[/IMG2][/URL][/TD]
               		[/TR]
              [TR]
              [TD][IMG2=JSON]{"data-align":"none","data-size":"full","src":"http:\/\/192.168.9.13\/admin\/plugins\/mqttgateway\/images\/icon-notfound.png"}[/IMG2]rcvr_138.68.110.107_BODY_sg[/TD]
               			[TD]1.048[/TD]
               			[TD]09.05. 19:43:45 [URL=http://192.168.9.13/admin/plugins/mqttgateway/index.cgi?form=topics#][IMG2=JSON]{"data-align":"none","data-size":"full","src":"http:\/\/192.168.9.13\/admin\/plugins\/mqttgateway\/images\/icon-trash.png"}[/IMG2][/URL][/TD]
               		[/TR]
              [TR]
              [TD][IMG2=JSON]{"data-align":"none","data-size":"full","src":"http:\/\/192.168.9.13\/admin\/plugins\/mqttgateway\/images\/icon-notfound.png"}[/IMG2]rcvr_138.68.110.107_BODY_temp[/TD]
               			[TD]24.084911[/TD]
               			[TD]09.05. 19:43:45 [URL=http://192.168.9.13/admin/plugins/mqttgateway/index.cgi?form=topics#][IMG2=JSON]{"data-align":"none","data-size":"full","src":"http:\/\/192.168.9.13\/admin\/plugins\/mqttgateway\/images\/icon-trash.png"}[/IMG2][/URL][/TD]
               		[/TR]
              [TR]
              [TD][IMG2=JSON]{"data-align":"none","data-size":"full","src":"http:\/\/192.168.9.13\/admin\/plugins\/mqttgateway\/images\/icon-notfound.png"}[/IMG2]rcvr_138.68.110.107_BODY_temp##_unit[/TD]
               			[TD]°C[/TD]
               			[TD]09.05. 19:43:45 [URL=http://192.168.9.13/admin/plugins/mqttgateway/index.cgi?form=topics#][IMG2=JSON]{"data-align":"none","data-size":"full","src":"http:\/\/192.168.9.13\/admin\/plugins\/mqttgateway\/images\/icon-trash.png"}[/IMG2][/URL][/TD]
               		[/TR]
              [TR]
              [TD][IMG2=JSON]{"data-align":"none","data-size":"full","src":"http:\/\/192.168.9.13\/admin\/plugins\/mqttgateway\/images\/icon-notfound.png"}[/IMG2]rcvr_138.68.110.107_BODY_volume##_unit[/TD]
               			[TD]L[/TD]
               			[TD]09.05. 19:43:45 [URL=http://192.168.9.13/admin/plugins/mqttgateway/index.cgi?form=topics#][IMG2=JSON]{"data-align":"none","data-size":"full","src":"http:\/\/192.168.9.13\/admin\/plugins\/mqttgateway\/images\/icon-trash.png"}[/IMG2][/URL][/TD]
               		[/TR]
              [TR]
              [TD][IMG2=JSON]{"data-align":"none","data-size":"full","src":"http:\/\/192.168.9.13\/admin\/plugins\/mqttgateway\/images\/icon-notfound.png"}[/IMG2]rcvr_138.68.110.107_REMOTEADDR[/TD]
               			[TD]138.68.110.107[/TD]
               			[TD]09.05. 19:43:45 [URL=http://192.168.9.13/admin/plugins/mqttgateway/index.cgi?form=topics#][IMG2=JSON]{"data-align":"none","data-size":"full","src":"http:\/\/192.168.9.13\/admin\/plugins\/mqttgateway\/images\/icon-trash.png"}[/IMG2][/URL][/TD]
               		[/TR]
              [TR]
              [TD][IMG2=JSON]{"data-align":"none","data-size":"full","src":"http:\/\/192.168.9.13\/admin\/plugins\/mqttgateway\/images\/icon-notfound.png"}[/IMG2]rcvr_138.68.110.107_loxtime[/TD]
               			[TD]389821425[/TD]
               			[TD]09.05. 19:43:45 [URL=http://192.168.9.13/admin/plugins/mqttgateway/index.cgi?form=topics#][IMG2=JSON]{"data-align":"none","data-size":"full","src":"http:\/\/192.168.9.13\/admin\/plugins\/mqttgateway\/images\/icon-trash.png"}[/IMG2][/URL][/TD]
               		[/TR]
              [TR]
              [TD] [/TD]
               			[TD] [/TD]
               			[TD][URL=http://192.168.9.13/admin/plugins/mqttgateway/index.cgi?form=topics#][IMG2=JSON]{"data-align":"none","data-size":"full","src":"http:\/\/192.168.9.13\/admin\/plugins\/mqttgateway\/images\/icon-trash.png"}[/IMG2][/URL][/TD]
               		[/TR]
              [/TABLE]
              Zuletzt geändert von eisenkarl; 09.05.2021, 18:47.

              Kommentar

              • Christian Fenzl
                Lebende Foren Legende
                • 31.08.2015
                • 11237

                #8
                Sollte sich die IP regelmäßig ändern, kannst du dir das Receiver-Script kopieren und den Hostnamen/IP gegen was Statisches ersetzen.
                Grundsätzlich ist es schon ein wenig unsicher, den LB ins Web zu stellen... Das macht mir bissl Bauchweh...
                lg, Christian
                Zuletzt geändert von Christian Fenzl; 09.05.2021, 21:11.
                Hilfe für die Menschen der Ukraine: https://www.loxforum.com/forum/proje...Cr-die-ukraine

                Kommentar

                Lädt...