Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Praktische Anwendungen (Showcase)
    4. SMA Wechselrichterdaten per SBFspot und MQTT in ioBroker

    NEWS

    • Neues Video "KI im Smart Home" - ioBroker plus n8n

    • Neues Video über Aliase, virtuelle Geräte und Kategorien

    • Wir empfehlen: Node.js 22.x

    SMA Wechselrichterdaten per SBFspot und MQTT in ioBroker

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

      Hallo Gemeinde,
      ich komme von FHEM und sah mich der Herausforderung entgegen, dass ich meine WR-Daten in ioBroker bekomme. Bei FHEM gibts dazu ein Device welches "einfach" die Daten vom WR abholt. Optisch bin ich von FHEM enttäuscht aber bei der Anbindung von Geräten gibts dort deutlich mehr. (siehe auch Anbindung von 1wire Geräten, die ich auch über MQTT an ioBroker anbinde)

      Da ich nirgends zu meinem Problem Beschreibungen gefunden habe, dachte ich, ich schreib hier mal was hin.

      Bei ioBroker musste ich den Umweg über SBFSpot gehen. Im ersten Schritt musste ich verstanden haben, dass das ioBroker Modul SBFspot nicht direkt mit dem WR spricht (das steht nämlich nirgendwo), sondern "nur" mit dem Service sbfspot bzw. der Datenbank spricht, der auf dem Host läuft!!!

      SBF-Spot läuft bei mir aktuell in der gleichen VMWare wie ioBroker aber OHNE Datenbank oder lokales Logging. Ich habe SBFspot über die Bedienungsanleitung hier installiert:
      link text

      Ihr müsst die SBFspot.cfg so konfigurieren, dass sie auch MQTT Nachrichten auswirft. Hier müsst Ihr nur die IP eintragen und könnt noch die Topics definieren die ausgeworfen werden sollen. Danach findet sich in den ioBroker-Objekten eine Datei "sbfspot_xxxxxxxx".

      Diese Datei habe ich nun in Variablen aufgelöst und dort weiterverarbeitbar gemacht.
      Dazu habe ich ein Blockly Skript gebaut. BTW auch hier habe ich lange gesucht bis ich was richtiges gefunden habe:

      <xml xmlns="https://developers.google.com/blockly/xml">
       <variables>
         <variable id="+_H{LNoHI/P_j![0[|qu">Objekte</variable>
       </variables>
       <block type="on_ext" id="`OgDjJDkS}8_u[CN7RmW" x="-62" y="-62">
         <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
         <field name="CONDITION">ne</field>
         <field name="ACK_CONDITION"></field>
         <value name="OID0">
           <shadow type="field_oid" id="ti-#+gVuN:7Yle+3^}WV">
             <field name="oid">default</field>
           </shadow>
           <block type="field_oid" id="TYQKP`9lXZNVkBSbX1zJ">
             <field name="oid">mqtt.0.sbfspot_305074960</field>
           </block>
         </value>
         <statement name="STATEMENT">
           <block type="variables_set" id="#Tka-0IJgQv1e|qLQYD^">
             <field name="VAR" id="+_H{LNoHI/P_j![0[|qu">Objekte</field>
             <value name="VALUE">
               <block type="convert_json2object" id="^7xpQ#7;gW_k{|ui[V$`">
                 <value name="VALUE">
                   <block type="on_source" id="i*Ls9NqxqBZ)K`C$58T@">
                     <field name="ATTR">state.val</field>
                   </block>
                 </value>
               </block>
             </value>
             <next>
               <block type="update" id="0Wgwh3rT}kiq={.8+lky">
                 <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                 <field name="OID">0_userdata.0.Berechnungen.Solar.SMA.EToday</field>
                 <field name="WITH_DELAY">FALSE</field>
                 <value name="VALUE">
                   <block type="get_attr" id="N-x|so}d!srb2Gu[G[rh">
                     <value name="PATH">
                       <shadow type="text" id="kh8CXN}Zq+NwesHHCv-H">
                         <field name="TEXT">EToday</field>
                       </shadow>
                     </value>
                     <value name="OBJECT">
                       <block type="on_source" id="-^)!!Jl2ie||[S1[X|,)">
                         <field name="ATTR">state.val</field>
                       </block>
                     </value>
                   </block>
                 </value>
                 <next>
                   <block type="update" id="C,!krwB~wDh19-K!||4E">
                     <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                     <field name="OID">0_userdata.0.Berechnungen.Solar.SMA.ETotal</field>
                     <field name="WITH_DELAY">FALSE</field>
                     <value name="VALUE">
                       <block type="get_attr" id="K%RDIwt(bu9yo.s4loo!">
                         <value name="PATH">
                           <shadow type="text" id="F.6/~pwYjh#}n+pTlg?1">
                             <field name="TEXT">ETotal</field>
                           </shadow>
                         </value>
                         <value name="OBJECT">
                           <block type="on_source" id="Jn1-Y?{LGmg%NpYV1Y9H">
                             <field name="ATTR">state.val</field>
                           </block>
                         </value>
                       </block>
                     </value>
                     <next>
                       <block type="update" id="w3W0|)e~jt=@52Nd*}Uy">
                         <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                         <field name="OID">0_userdata.0.Berechnungen.Solar.SMA.IDC1</field>
                         <field name="WITH_DELAY">FALSE</field>
                         <value name="VALUE">
                           <block type="get_attr" id="ETG#5cx/r^V3]1m}?7G$">
                             <value name="PATH">
                               <shadow type="text" id="0]hLAG/fLpdefU|b|oad">
                                 <field name="TEXT">IDC1</field>
                               </shadow>
                             </value>
                             <value name="OBJECT">
                               <block type="on_source" id="{0i]!v!7L$pGvSPstE5(">
                                 <field name="ATTR">state.val</field>
                               </block>
                             </value>
                           </block>
                         </value>
                         <next>
                           <block type="update" id="jO}7^OHUrO6WQ]Q{|u/m">
                             <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                             <field name="OID">0_userdata.0.Berechnungen.Solar.SMA.IDC2</field>
                             <field name="WITH_DELAY">FALSE</field>
                             <value name="VALUE">
                               <block type="get_attr" id="v_0n.C%?g0p`w@48lykX">
                                 <value name="PATH">
                                   <shadow type="text" id="lu~X9@cfs2YEA6XL8:CX">
                                     <field name="TEXT">IDC2</field>
                                   </shadow>
                                 </value>
                                 <value name="OBJECT">
                                   <block type="on_source" id="zK*Z9b]5gY70KqF[q)B6">
                                     <field name="ATTR">state.val</field>
                                   </block>
                                 </value>
                               </block>
                             </value>
                             <next>
                               <block type="update" id="C@#2)c!=Z=)gnNPG`uEJ">
                                 <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                 <field name="OID">0_userdata.0.Berechnungen.Solar.SMA.InvGridRelay</field>
                                 <field name="WITH_DELAY">FALSE</field>
                                 <value name="VALUE">
                                   <block type="get_attr" id="Z6NB3DDquDZ5:)3Du(QZ">
                                     <value name="PATH">
                                       <shadow type="text" id="q(!5c4n=ukbFF~:V.Q35">
                                         <field name="TEXT">InvGridRelay</field>
                                       </shadow>
                                     </value>
                                     <value name="OBJECT">
                                       <block type="on_source" id="c;NVfL8cxZbtF6ai|-GR">
                                         <field name="ATTR">state.val</field>
                                       </block>
                                     </value>
                                   </block>
                                 </value>
                                 <next>
                                   <block type="update" id="/4jJ4,EWaI_2|,yRSA5^">
                                     <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                     <field name="OID">0_userdata.0.Berechnungen.Solar.SMA. InvName</field>
                                     <field name="WITH_DELAY">FALSE</field>
                                     <value name="VALUE">
                                       <block type="get_attr" id="1zB34/(PZ7YYoGo[C}nn">
                                         <value name="PATH">
                                           <shadow type="text" id="3]cZKp`jLo^0B#cClf7v">
                                             <field name="TEXT">InvName</field>
                                           </shadow>
                                         </value>
                                         <value name="OBJECT">
                                           <block type="on_source" id="-;R%kfsZk[rj}O}YK],%">
                                             <field name="ATTR">state.val</field>
                                           </block>
                                         </value>
                                       </block>
                                     </value>
                                     <next>
                                       <block type="update" id="^HVw:tr]?L8$kF2s9l~a">
                                         <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                         <field name="OID">0_userdata.0.Berechnungen.Solar.SMA.InvSerial</field>
                                         <field name="WITH_DELAY">FALSE</field>
                                         <value name="VALUE">
                                           <block type="get_attr" id="_G:zcsp=^-3%C0`*k[=9">
                                             <value name="PATH">
                                               <shadow type="text" id="4`D+G@A7SBxla+jJ+s}p">
                                                 <field name="TEXT">InvSerial</field>
                                               </shadow>
                                             </value>
                                             <value name="OBJECT">
                                               <block type="on_source" id=")yF[`.h-yJTe|i$*bnVj">
                                                 <field name="ATTR">state.val</field>
                                               </block>
                                             </value>
                                           </block>
                                         </value>
                                         <next>
                                           <block type="update" id="Bp4FC:H5PD#kRy*^;9A~">
                                             <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                             <field name="OID">0_userdata.0.Berechnungen.Solar.SMA.InvStatus</field>
                                             <field name="WITH_DELAY">FALSE</field>
                                             <value name="VALUE">
                                               <block type="get_attr" id="vRozu.Lyfv]`DqtLD,(t">
                                                 <value name="PATH">
                                                   <shadow type="text" id="p8]gBNzA1}Cg+IZM{k9r">
                                                     <field name="TEXT">InvStatus</field>
                                                   </shadow>
                                                 </value>
                                                 <value name="OBJECT">
                                                   <block type="on_source" id="L*[ez6md,59ii2hAT]}2">
                                                     <field name="ATTR">state.val</field>
                                                   </block>
                                                 </value>
                                               </block>
                                             </value>
                                             <next>
                                               <block type="update" id="3iR3;3e)rJF.~sX`pKQe">
                                                 <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                 <field name="OID">0_userdata.0.Berechnungen.Solar.SMA.InvTemperature</field>
                                                 <field name="WITH_DELAY">FALSE</field>
                                                 <value name="VALUE">
                                                   <block type="get_attr" id="w#2.69hB{6E7b.-Sl$4d">
                                                     <value name="PATH">
                                                       <shadow type="text" id="n)HD0LI*8fh|_5Et!vfh">
                                                         <field name="TEXT">InvTemperature</field>
                                                       </shadow>
                                                     </value>
                                                     <value name="OBJECT">
                                                       <block type="on_source" id="s6)h`AjJO0_#1V{/[Y19">
                                                         <field name="ATTR">state.val</field>
                                                       </block>
                                                     </value>
                                                   </block>
                                                 </value>
                                                 <next>
                                                   <block type="update" id="@-!5:)T*U/.JBs6*^f7;">
                                                     <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                     <field name="OID">0_userdata.0.Berechnungen.Solar.SMA.InvTime</field>
                                                     <field name="WITH_DELAY">FALSE</field>
                                                     <value name="VALUE">
                                                       <block type="get_attr" id="5ZWhwk2/jBPsiUlL/E3n">
                                                         <value name="PATH">
                                                           <shadow type="text" id="OHj4=M]@:9K5Q?;4e1:r">
                                                             <field name="TEXT">InvTime</field>
                                                           </shadow>
                                                         </value>
                                                         <value name="OBJECT">
                                                           <block type="on_source" id="whj)v)CFY/D6IFri]^MX">
                                                             <field name="ATTR">state.val</field>
                                                           </block>
                                                         </value>
                                                       </block>
                                                     </value>
                                                     <next>
                                                       <block type="update" id="qiv1.]8wLHONBL7|*%])">
                                                         <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                         <field name="OID">0_userdata.0.Berechnungen.Solar.SMA.PACTot</field>
                                                         <field name="WITH_DELAY">FALSE</field>
                                                         <value name="VALUE">
                                                           <block type="get_attr" id="QiNK@b8LhL_Go1dbPz5+">
                                                             <value name="PATH">
                                                               <shadow type="text" id="Kt.k$ob$xCAE{(t0u,%2">
                                                                 <field name="TEXT">PACTot</field>
                                                               </shadow>
                                                             </value>
                                                             <value name="OBJECT">
                                                               <block type="on_source" id="^pWj,cdu+|Bc=gosT`nq">
                                                                 <field name="ATTR">state.val</field>
                                                               </block>
                                                             </value>
                                                           </block>
                                                         </value>
                                                         <next>
                                                           <block type="update" id="8P$qq%6i9Z.,9{%^@JbF">
                                                             <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                             <field name="OID">0_userdata.0.Berechnungen.Solar.SMA.PDC1</field>
                                                             <field name="WITH_DELAY">FALSE</field>
                                                             <value name="VALUE">
                                                               <block type="get_attr" id="pqwFu(^y6@6|Yx!$M9)A">
                                                                 <value name="PATH">
                                                                   <shadow type="text" id=")5N2WF7fcOqoM*PByt{0">
                                                                     <field name="TEXT">PDC1</field>
                                                                   </shadow>
                                                                 </value>
                                                                 <value name="OBJECT">
                                                                   <block type="on_source" id="R)mcCh|Au;VSyoQ[f,v5">
                                                                     <field name="ATTR">state.val</field>
                                                                   </block>
                                                                 </value>
                                                               </block>
                                                             </value>
                                                             <next>
                                                               <block type="update" id="im{/nvF}5AbhHgRKUv-)">
                                                                 <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                 <field name="OID">0_userdata.0.Berechnungen.Solar.SMA.PDC2</field>
                                                                 <field name="WITH_DELAY">FALSE</field>
                                                                 <value name="VALUE">
                                                                   <block type="get_attr" id="|mj~8PIvu^%JO(g^ziV?">
                                                                     <value name="PATH">
                                                                       <shadow type="text" id="{gJkk{3OW})q_m)kQ]2T">
                                                                         <field name="TEXT">PDC2</field>
                                                                       </shadow>
                                                                     </value>
                                                                     <value name="OBJECT">
                                                                       <block type="on_source" id="qcK(Xfih#Tlvc[/GSkGf">
                                                                         <field name="ATTR">state.val</field>
                                                                       </block>
                                                                     </value>
                                                                   </block>
                                                                 </value>
                                                                 <next>
                                                                   <block type="update" id="~aPo*L0=hd04yrfoLSsP">
                                                                     <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                     <field name="OID">0_userdata.0.Berechnungen.Solar.SMA.SunRise</field>
                                                                     <field name="WITH_DELAY">FALSE</field>
                                                                     <value name="VALUE">
                                                                       <block type="get_attr" id="MfJQ7B,a?yR,(:X9T[~9">
                                                                         <value name="PATH">
                                                                           <shadow type="text" id="[RCIObN#S7m/+XM$MR%M">
                                                                             <field name="TEXT">SunRise</field>
                                                                           </shadow>
                                                                         </value>
                                                                         <value name="OBJECT">
                                                                           <block type="on_source" id="1|VLIzv-*F1sa2.#}q[g">
                                                                             <field name="ATTR">state.val</field>
                                                                           </block>
                                                                         </value>
                                                                       </block>
                                                                     </value>
                                                                     <next>
                                                                       <block type="update" id="@oJNSH?w{s/IsyEB[`2M">
                                                                         <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                         <field name="OID">0_userdata.0.Berechnungen.Solar.SMA.SunSet</field>
                                                                         <field name="WITH_DELAY">FALSE</field>
                                                                         <value name="VALUE">
                                                                           <block type="get_attr" id="E@3J]A,2QDxBr4Atlw][">
                                                                             <value name="PATH">
                                                                               <shadow type="text" id=":YvmeH![Wi0%V;)1L-$g">
                                                                                 <field name="TEXT">SunSet</field>
                                                                               </shadow>
                                                                             </value>
                                                                             <value name="OBJECT">
                                                                               <block type="on_source" id="*pV4Tfa~tG6gMPrcQ(@a">
                                                                                 <field name="ATTR">state.val</field>
                                                                               </block>
                                                                             </value>
                                                                           </block>
                                                                         </value>
                                                                         <next>
                                                                           <block type="update" id="7.Yr]AqGoHTcIj$gxqF_">
                                                                             <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                             <field name="OID">0_userdata.0.Berechnungen.Solar.SMA.Timestamp</field>
                                                                             <field name="WITH_DELAY">FALSE</field>
                                                                             <value name="VALUE">
                                                                               <block type="get_attr" id="3mP-WUghkz*@$Tl#Cyd=">
                                                                                 <value name="PATH">
                                                                                   <shadow type="text" id="$(Z-kv1BB6,4?8{b|sqf">
                                                                                     <field name="TEXT">Timestamp</field>
                                                                                   </shadow>
                                                                                 </value>
                                                                                 <value name="OBJECT">
                                                                                   <block type="on_source" id="[oZ8+5[Sgtc:QpaKJ==c">
                                                                                     <field name="ATTR">state.val</field>
                                                                                   </block>
                                                                                 </value>
                                                                               </block>
                                                                             </value>
                                                                             <next>
                                                                               <block type="update" id="xZ[fx-uMDhg1|H~T;1%Q">
                                                                                 <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                                 <field name="OID">0_userdata.0.Berechnungen.Solar.SMA.UDC1</field>
                                                                                 <field name="WITH_DELAY">FALSE</field>
                                                                                 <value name="VALUE">
                                                                                   <block type="get_attr" id="=/lSVeMU[:;z/Gl7n=n@">
                                                                                     <value name="PATH">
                                                                                       <shadow type="text" id="]X8I;7@%R3w;7n9m9R7E">
                                                                                         <field name="TEXT">UDC1</field>
                                                                                       </shadow>
                                                                                     </value>
                                                                                     <value name="OBJECT">
                                                                                       <block type="on_source" id="BP~Fmi;BZIH:q-{ZZ_g`">
                                                                                         <field name="ATTR">state.val</field>
                                                                                       </block>
                                                                                     </value>
                                                                                   </block>
                                                                                 </value>
                                                                                 <next>
                                                                                   <block type="update" id="^+VE]b3CqW8@]X~W1F!a">
                                                                                     <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                                     <field name="OID">0_userdata.0.Berechnungen.Solar.SMA.UDC2</field>
                                                                                     <field name="WITH_DELAY">FALSE</field>
                                                                                     <value name="VALUE">
                                                                                       <block type="get_attr" id="uPY}u8c$rE(@SUqRqbl}">
                                                                                         <value name="PATH">
                                                                                           <shadow type="text" id="Y[.rqk;I?e^{KF57flW:">
                                                                                             <field name="TEXT">UDC2</field>
                                                                                           </shadow>
                                                                                         </value>
                                                                                         <value name="OBJECT">
                                                                                           <block type="on_source" id="HoFxJf(lvqt..._IP#^f">
                                                                                             <field name="ATTR">state.val</field>
                                                                                           </block>
                                                                                         </value>
                                                                                       </block>
                                                                                     </value>
                                                                                   </block>
                                                                                 </next>
                                                                               </block>
                                                                             </next>
                                                                           </block>
                                                                         </next>
                                                                       </block>
                                                                     </next>
                                                                   </block>
                                                                 </next>
                                                               </block>
                                                             </next>
                                                           </block>
                                                         </next>
                                                       </block>
                                                     </next>
                                                   </block>
                                                 </next>
                                               </block>
                                             </next>
                                           </block>
                                         </next>
                                       </block>
                                     </next>
                                   </block>
                                 </next>
                               </block>
                             </next>
                           </block>
                         </next>
                       </block>
                     </next>
                   </block>
                 </next>
               </block>
             </next>
           </block>
         </statement>
       </block>Viel Spass damit
      </xml>
      

      hier noch als Bild:

      dfa87d28-ea6b-4263-b40e-a271c43c3102-image.png

      1 Reply Last reply Reply Quote 0
      • First post
        Last post

      Support us

      ioBroker
      Community Adapters
      Donate

      981
      Online

      32.1k
      Users

      80.7k
      Topics

      1.3m
      Posts

      1
      1
      1322
      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