Skip to content
  • Home
  • Recent
  • Tags
  • 0 Unread 0
  • Categories
  • Unreplied
  • Popular
  • GitHub
  • Docu
  • Hilfe
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
ioBroker Logo

Community Forum

donate donate
  1. ioBroker Community Home
  2. Deutsch
  3. Skripten / Logik
  4. Funktion zum auslesen der Leistungsdaten SMA WEBBOX

NEWS

  • Monatsrückblick Januar/Februar 2026 ist online!
    BluefoxB
    Bluefox
    18
    1
    681

  • Jahresrückblick 2025 – unser neuer Blogbeitrag ist online! ✨
    BluefoxB
    Bluefox
    18
    1
    5.7k

  • Neuer Blogbeitrag: Monatsrückblick - Dezember 2025 🎄
    BluefoxB
    Bluefox
    13
    1
    1.5k

Funktion zum auslesen der Leistungsdaten SMA WEBBOX

Scheduled Pinned Locked Moved Skripten / Logik
14 Posts 5 Posters 3.8k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    nobody
    wrote on last edited by
    #5

    Hallo,

    Eine kleine Änderung ist notwendig:

    msg.payload=msg.payload.result.overview [1].value;

    return msg;

    Gesendet von meinem SM-G900F mit Tapatalk

    1 Reply Last reply
    0
    • paul53P Offline
      paul53P Offline
      paul53
      wrote on last edited by
      #6

      @nobody:

      msg.payload=msg.payload.result.overview [1].value;

      return msg; `
      Das sollte identisch zu meinem ersten Vorschlag sein.

      Bitte verzichtet auf Chat-Nachrichten, denn die Handhabung ist grauenhaft !
      Produktiv: RPi 2 mit S.USV, HM-MOD-RPI und SLC-USB-Stick mit root fs

      1 Reply Last reply
      0
      • N Offline
        N Offline
        nobody
        wrote on last edited by
        #7

        Praktisch ja, rein formell nein. Zu einem korrekten Message Objekt gehören per Definition mindestens die Attribute payload und topic, auch wenn diese leer sind.

        Gesendet von meinem SM-G900F mit Tapatalk

        1 Reply Last reply
        0
        • paul53P Offline
          paul53P Offline
          paul53
          wrote on last edited by
          #8

          @nobody:

          Zu einem korrekten Message Objekt gehören per Definition mindestens die Attribute payload und topic, auch wenn diese leer sind. `
          Danke für die Information.

          Bitte verzichtet auf Chat-Nachrichten, denn die Handhabung ist grauenhaft !
          Produktiv: RPi 2 mit S.USV, HM-MOD-RPI und SLC-USB-Stick mit root fs

          1 Reply Last reply
          0
          • W Offline
            W Offline
            wobo
            wrote on last edited by
            #9

            Hat super funktioniert

            hier die Lösung

            msg1 = {};

            msg1.payload = msg.payload.result.overview[0].value + " " + msg.payload.result.overview[0].unit;

            msg2 = {};

            msg2.payload = msg.payload.result.overview[1].value + " " + msg.payload.result.overview[1].unit;

            msg3 = {};

            msg3.payload = msg.payload.result.overview[2].value + " " + msg.payload.result.overview[2].unit ;

            return [msg1,msg2,msg3];

            mir ist noch unklar wie die Funktion aussehen müsste wenn der folgende String abgefragt wird.

            {"result":{"devices":[{"channels":[{"meta":"Ipv","name":"DC Strom Eingang","unit":"A","value":"0"},{"meta":"Upv-Ist","name":"DC Spannung Eingang","unit":"V","value":"0"},{"meta":"WindVel m/s","name":"Windgeschwindigkeit","unit":"m/s","value":"2.4"},{"meta":"TmpAmb C","name":"Au\u00DFentemperatur","unit":"\u00B0C","value":"20.3"},{"meta":"IntSolIrr","name":"Einstrahlung","unit":"W/m^2","value":"75"},{"meta":"Fac","name":"Netzfrequenz","unit":"Hz","value":"0"},{"meta":"Iac-Ist","name":"Netzstrom","unit":"A","value":"0"},{"meta":"Pac","name":"Leistung","unit":"W","value":"0"},{"meta":"Riso","name":"Isolationswiderstand","unit":"Ohm","value":"0"},{"meta":"TmpMdul C","name":"Modultemperatur","unit":"\u00B0C","value":"22.3"},{"meta":"h-On","name":"Einspeisezeit","unit":"h","value":"0"},{"meta":"h-Total","name":"Betriebszeit","unit":"h","value":"0"},{"meta":"E-Total","name":"Gesamtertrag","unit":"kWh","value":"0"},{"meta":"Netz-Ein","name":"Anzahl Netzzuschaltungen","value":"0"}],"key":"0088:0000725b"}]},"format":"JSON","proc":"GetProcessData","version":"1.0","id":"1"}

            1 Reply Last reply
            0
            • N Offline
              N Offline
              nobody
              wrote on last edited by
              #10

              Gib das json objekt doch mal hier in das Formular ein:

              http://jsonprettyprint.com

              Dann wird es richtig formatiert und man sieht die Ebenen und Arrays für den Zugriff auf die Attribute.

              Gesendet von meinem SM-G900F mit Tapatalk

              1 Reply Last reply
              0
              • W Offline
                W Offline
                wobo
                wrote on last edited by
                #11

                Danke für den Tip.

                es sind 2 Arrays wie fragt man die dann ab ? Ich würde dann gerne die Modultemperatur auslesen.

                {

                "result": {

                "devices": [

                {

                "channels": [

                {

                "meta": "Ipv",

                "name": "DC Strom Eingang",

                "unit": "A",

                "value": "0"

                },

                {

                "meta": "Upv-Ist",

                "name": "DC Spannung Eingang",

                "unit": "V",

                "value": "0"

                },

                {

                "meta": "WindVel m/s",

                "name": "Windgeschwindigkeit",

                "unit": "m/s",

                "value": "2.4"

                },

                {

                "meta": "TmpAmb C",

                "name": "Au\u00dfentemperatur",

                "unit": "\u00b0C",

                "value": "20.3"

                },

                {

                "meta": "IntSolIrr",

                "name": "Einstrahlung",

                "unit": "W/m^2",

                "value": "75"

                },

                {

                "meta": "Fac",

                "name": "Netzfrequenz",

                "unit": "Hz",

                "value": "0"

                },

                {

                "meta": "Iac-Ist",

                "name": "Netzstrom",

                "unit": "A",

                "value": "0"

                },

                {

                "meta": "Pac",

                "name": "Leistung",

                "unit": "W",

                "value": "0"

                },

                {

                "meta": "Riso",

                "name": "Isolationswiderstand",

                "unit": "Ohm",

                "value": "0"

                },

                {

                "meta": "TmpMdul C",

                "name": "Modultemperatur",

                "unit": "\u00b0C",

                "value": "22.3"

                },

                {

                "meta": "h-On",

                "name": "Einspeisezeit",

                "unit": "h",

                "value": "0"

                },

                {

                "meta": "h-Total",

                "name": "Betriebszeit",

                "unit": "h",

                "value": "0"

                },

                {

                "meta": "E-Total",

                "name": "Gesamtertrag",

                "unit": "kWh",

                "value": "0"

                },

                {

                "meta": "Netz-Ein",

                "name": "Anzahl Netzzuschaltungen",

                "value": "0"

                }

                ],

                "key": "0088:0000725b"

                }

                ]

                },

                "format": "JSON",

                "proc": "GetProcessData",

                "version": "1.0",

                "id": "1"

                }

                1 Reply Last reply
                0
                • N Offline
                  N Offline
                  nobody
                  wrote on last edited by
                  #12

                  Einfach durchhangeln. Z. B.

                  msg.payload.result.devices[0].channels [0].value

                  Wenn nur die Werte und Einheiten interessant sind, bleibt das erste Array konstant auf 0. Die Anzahl der Einträge im zweiten Array bekommt man mit msg.payload.result.devices[0].channels.length.

                  Jetzt kommt es drauf an, was mit den Werten passieren soll.

                  Gesendet von meinem GT-N8000 mit Tapatalk

                  1 Reply Last reply
                  0
                  • J Offline
                    J Offline
                    jamesmalvi
                    wrote on last edited by
                    #13

                    @nobody:

                    Gib das json objekt doch mal hier in das Formular ein:

                    http://jsonprettyprint.com

                    Dann wird es richtig formatiert und man sieht die Ebenen und Arrays für den Zugriff auf die Attribute.

                    Gesendet von meinem SM-G900F mit Tapatalk `

                    Ich benutze https://jsonformatter.org/json-pretty-print und https://codebeautify.org/jsonviewer

                    1 Reply Last reply
                    0
                    • boeserkornB Offline
                      boeserkornB Offline
                      boeserkorn
                      wrote on last edited by
                      #14

                      @wobo

                      hast du es gelöst… ich bekomme leider noch nicht mal eine Rückmeldung von der Webbox, wäre schön wenn du mir da helfen könntest.

                      Danke

                      @wobo:

                      Danke für den Tip.

                      es sind 2 Arrays wie fragt man die dann ab ? Ich würde dann gerne die Modultemperatur auslesen.

                      {

                      "result": {

                      "devices": [

                      {

                      "channels": [

                      {

                      "meta": "Ipv",

                      "name": "DC Strom Eingang",

                      "unit": "A",

                      "value": "0"

                      },

                      {

                      "meta": "Upv-Ist",

                      "name": "DC Spannung Eingang",

                      "unit": "V",

                      "value": "0"

                      },

                      {

                      "meta": "WindVel m/s",

                      "name": "Windgeschwindigkeit",

                      "unit": "m/s",

                      "value": "2.4"

                      },

                      {

                      "meta": "TmpAmb C",

                      "name": "Au\u00dfentemperatur",

                      "unit": "\u00b0C",

                      "value": "20.3"

                      },

                      {

                      "meta": "IntSolIrr",

                      "name": "Einstrahlung",

                      "unit": "W/m^2",

                      "value": "75"

                      },

                      {

                      "meta": "Fac",

                      "name": "Netzfrequenz",

                      "unit": "Hz",

                      "value": "0"

                      },

                      {

                      "meta": "Iac-Ist",

                      "name": "Netzstrom",

                      "unit": "A",

                      "value": "0"

                      },

                      {

                      "meta": "Pac",

                      "name": "Leistung",

                      "unit": "W",

                      "value": "0"

                      },

                      {

                      "meta": "Riso",

                      "name": "Isolationswiderstand",

                      "unit": "Ohm",

                      "value": "0"

                      },

                      {

                      "meta": "TmpMdul C",

                      "name": "Modultemperatur",

                      "unit": "\u00b0C",

                      "value": "22.3"

                      },

                      {

                      "meta": "h-On",

                      "name": "Einspeisezeit",

                      "unit": "h",

                      "value": "0"

                      },

                      {

                      "meta": "h-Total",

                      "name": "Betriebszeit",

                      "unit": "h",

                      "value": "0"

                      },

                      {

                      "meta": "E-Total",

                      "name": "Gesamtertrag",

                      "unit": "kWh",

                      "value": "0"

                      },

                      {

                      "meta": "Netz-Ein",

                      "name": "Anzahl Netzzuschaltungen",

                      "value": "0"

                      }

                      ],

                      "key": "0088:0000725b"

                      }

                      ]

                      },

                      "format": "JSON",

                      "proc": "GetProcessData",

                      "version": "1.0",

                      "id": "1"

                      } `

                      1 Reply Last reply
                      0

                      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                      With your input, this post could be even better 💗

                      Register Login
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      Support us

                      ioBroker
                      Community Adapters
                      Donate

                      261

                      Online

                      32.7k

                      Users

                      82.6k

                      Topics

                      1.3m

                      Posts
                      Community
                      Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen | Einwilligungseinstellungen
                      ioBroker Community 2014-2025
                      logo
                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Home
                      • Recent
                      • Tags
                      • Unread 0
                      • Categories
                      • Unreplied
                      • Popular
                      • GitHub
                      • Docu
                      • Hilfe