Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Hardware
    4. Gosund SP111 mit Tasmota 13.2.0 Problem mit DP

    NEWS

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

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    Gosund SP111 mit Tasmota 13.2.0 Problem mit DP

    This topic has been deleted. Only users with topic management privileges can see it.
    • Ralla66
      Ralla66 Most Active @RalfTh last edited by

      @ralfth

      vorher noch mal Telemetrie zurücknehmen auf 30 oder so, nicht das die Daten zu schnell
      einfliegen.
      Außer Adapter neu Installieren habe ich auch keine Idee mehr 🙂

      RalfTh 1 Reply Last reply Reply Quote 0
      • RalfTh
        RalfTh @Ralla66 last edited by RalfTh

        @ralla66 So, nun mal eine Information zum aktuellen Stand.

        • Ich habe jetzt mal den Sonoff-Adapter gelöscht.
        • Alle Objekte im Objektbaum gelöscht.
        • Sonoff-Adapter in der Version 2.4.6 installiert.
        • Die Steckdosen und den Adapter auf Debug eingestellt.
        • Instanz gestartet.
        • Objekte werden angelegt
        • Im Log erscheinen die Änderungen, allerdings werden die Objekte teilweise nicht entsprechend aktualisiert.

        Das sieht mir ganz nach einem Bug im Sonoff-Adapter aus, oder ein Problem mit Abhängigleiten oder so. Ich habe keine Ahnung, wie ich weiter den Fehler verfolgen könnte.

        Ralla66 1 Reply Last reply Reply Quote 0
        • Ralla66
          Ralla66 Most Active @RalfTh last edited by

          @ralfth

          der Sonoff Adapter ist ja kein echter Mqtt Broker, wenn du die Daten benötigst mußt
          du halt den Mqtt Adapter als Broker nehmen. Dann kannst du ja die Daten mit
          NodeRed oder Blockly zerlegen.

          RalfTh 1 Reply Last reply Reply Quote 0
          • RalfTh
            RalfTh @Ralla66 last edited by

            @ralla66 Da bin ich gerade dabei. Ist halt nicht so einfach als Laie.
            Ich habe Mosquitto installiert und den Mqtt-Adapter in iobrocker als Listener eingericht.
            Bis jetzt habe ich mal 2 Geräte eingebunden, einen Shelly3EM und eine Gosund S111.

            Bei der Gosund sind die Telemetriedaten im JSON-Format und beim Shelly3EM fehlt mir der Punkt mit dem Total-Power (alle drei Phasen).
            Beides sehr aufwändig, wobei ich beim Shelly3EM ehrlich gesagt noch keine Lösung weiß.

            Ralla66 1 Reply Last reply Reply Quote 0
            • Ralla66
              Ralla66 Most Active @RalfTh last edited by Ralla66

              @ralfth

              keine Ahnung mit Shellys, kannst du die nicht im Shelly Adapter mit einbinden ?
              Selbst wenn du kein Total-Power hast rechnest du die eben im Blockly zusammen.
              Was das Tasmota Json angeht kannste viele Wege gehen, z.B
              mit Tasmota Scripting arbeiten und das aus Tasmota heraus selbst subscriben.

              RalfTh 1 Reply Last reply Reply Quote 0
              • RalfTh
                RalfTh @Ralla66 last edited by

                @ralla66 sagte in Gosund SP111 mit Tasmota 13.2.0 Problem mit DP:

                keine Ahnung mit Shellys, kannst du die nicht im Shelly Adapter mit einbinden ?
                Selbst wenn du kein Total-Power hast rechnest du die eben im Blockly zusammen

                Ich dachte, wenn ich schon was ändern muss dann versuche ich da auf einem zentralen, eigenen MQTT-Broker. Das hat auch gewisse Vorteile.

                Was das Tasmota Json angeht kannste viele Wege gehen, z.B
                mit Tasmota Scripting arbeiten und das aus Tasmota heraus selbst subscriben.

                Da muss ich mich erst einlesen. Hast du da ein Beispielskript?

                Ralla66 1 Reply Last reply Reply Quote 0
                • Ralla66
                  Ralla66 Most Active @RalfTh last edited by Ralla66

                  @ralfth

                  Beispiel Script zum LD2410 ( BWM ) :
                  Link
                  Ziel war die Bewegung zu erkennen und im Sonoffadapter DP darzustellen

                  LD2410 Pre 1.jpg

                  Hier wird der Spannungswert 0 bis 3,3 Volt am GPIO ( ADC ) erfasst.
                  Dieser wird im ESP abgelegt mit dem Wert 0 bis 1024.
                  Es wird ein Datenpunkt im Sonoff Adapter Namens Presence angelegt.
                  Dieser DP wird mit 0 oder 1 beschrieben je nach Spannungswert am ADC Pin.
                  Weitere Scripte findest du hier in den Display Beiträgen.
                  klick
                  Dort ist auch viel von uns besprochen worden.

                  >D
                  
                  
                  Timer=0
                  
                  ; Text ON oder OFF
                  
                  EA=""
                  
                  ;Wert Analog
                  
                  WA=0
                  
                  ;Presence
                  
                  PRE=0
                  
                  >BS
                  
                  +>subscribe EA, cmnd/%topic%/Presence
                  
                  >S
                  
                  Timer+=1
                  
                  if Timer>5
                  
                  print ADC 10.10 %adc(1 32)%
                  
                  if adc(1 32)>501
                  
                  then
                  
                  EA="OFF"
                  
                  PRE=0
                  
                  +>publish stat/%topic%/RESULT {"Presence":%0PRE%}
                  
                  print TEXT ON %EA%
                  
                  print Wert ON %WA%
                  
                  print Presence %PRE%
                  
                  endif
                  
                  if adc(1 32)<500
                  
                  then
                  
                  +>publish stat/%topic%/RESULT {"Presence":%0PRE%}
                  
                  EA="ON"
                  
                  PRE=1
                  
                  print TEXT OFF %EA%
                  
                  print Wert OFF %WA%
                  
                  print Presence %PRE%
                  
                  endif
                  
                  Timer=0
                  
                  >W
                  
                  LD2410 Presence{m} %EA% 
                  
                  #
                  
                  RalfTh 1 Reply Last reply Reply Quote 0
                  • RalfTh
                    RalfTh @Ralla66 last edited by

                    @ralla66 Coole Sache, vielen Dank für die Info. Habe gerade den Adapter auf 3.0.3 aktualisiert.
                    Und siehe da, es kommen wieder Daten. Allerdings gibt es einen Unterschied zwischen Influx-Aufzeichnung und dem Wert im DP des Objektes. Ein Beispiel zur Verdeutlichung:

                    Kaffeemaschine schaltet auf heizen und zieht ca. 800 Watt. DP bleibt auf 18 Watt während Influx die 800 Watt aufzeichnet.
                    Was jetzt restlos klar ist, Tasmota auf den Gosund und das Template sind nicht die Ursache.

                    Ralla66 2 Replies Last reply Reply Quote 0
                    • Ralla66
                      Ralla66 Most Active @RalfTh last edited by

                      @ralfth
                      der Sonoff Adapter ist ja kein echter Mqtt Broker

                      1 Reply Last reply Reply Quote 0
                      • Ralla66
                        Ralla66 Most Active @RalfTh last edited by Ralla66

                        @ralfth

                        testen kannste hiermit,
                        subcribe, publish der Teledaten nach Sonoff Adapter alle 10 sec,
                        einfügen deiner Daten sollte ja klar sein.
                        Schwierigkeitsgrad: Anspruchsvoll 🙂

                        Pub_Sub.jpg

                        >D
                        
                        ;a valid script must start with >D in the first line
                        
                        
                        Timer=0
                        
                        WEBQ=5
                        
                        VOL=0
                        CUR=0
                        POW=0
                        TOT=0
                        YES=0
                        TOD=0
                        APP=0
                        RAP=0
                        
                        ; Beispiel
                        
                        ;{"StatusSNS":{"Time":"2023-11-12T13:25:55","ENERGY":
                        ;{"TotalStartTime":"2023-07-01T15:59:16","Total":63.255,"Yesterday":0.056,"Today":0.075,
                        ;"Power":4,"ApparentPower":66,"ReactivePower":66,"Factor":0.07,"Voltage":235,"Current":0.283}}}
                        
                        >BS
                        
                        +>subscribe EA, cmnd/%topic%/Total
                        +>subscribe EA, cmnd/%topic%/Yesterday
                        +>subscribe EA, cmnd/%topic%/Today
                        +>subscribe EA, cmnd/%topic%/Power
                        +>subscribe EA, cmnd/%topic%/ApparentPower
                        +>subscribe EA, cmnd/%topic%/ReactivePower
                        +>subscribe EA, cmnd/%topic%/Power
                        +>subscribe EA, cmnd/%topic%/Voltage
                        +>subscribe EA, cmnd/%topic%/Current
                        
                        >S
                        
                        Timer+=1
                        
                        ;Executed every second 
                        
                        
                        if Timer>10
                        
                        then
                        =>websend [192.168.2.85] /cm?cmnd=status 10
                        
                        +>publish stat/%topic%/RESULT {"Total":%0TOT%}
                        +>publish stat/%topic%/RESULT {"Yesterday":%0YES%}
                        +>publish stat/%topic%/RESULT {"Today":%0TOD%}
                        +>publish stat/%topic%/RESULT {"ApparentPower":%0APP%}
                        +>publish stat/%topic%/RESULT {"ReactivePower":%RAP%}
                        +>publish stat/%topic%/RESULT {"Power":%0POW%}
                        +>publish stat/%topic%/RESULT {"Voltage":%0VOL%}
                        +>publish stat/%topic%/RESULT {"Current":%0CUR%}
                        
                        Timer=0
                        
                        endif
                        
                        
                        >E
                        
                        ;Executed when a Tasmota MQTT RESULT message is received
                        
                        
                        VOL=WebQuery#StatusSNS#ENERGY#Voltage
                        print Wert Volt %VOL%
                        
                        CUR=WebQuery#StatusSNS#ENERGY#Current/1000
                        print Wert Current %CUR%
                        
                        POW=WebQuery#StatusSNS#ENERGY#Power
                        print Wert Power %POW%
                        
                        TOT=WebQuery#StatusSNS#ENERGY#Total
                        print Wert Total %TOT%
                        
                        YES=WebQuery#StatusSNS#ENERGY#Yesterday
                        print Wert Yesterday %YES%
                        
                        TOD=WebQuery#StatusSNS#ENERGY#Today
                        print Wert Today %TOD%
                        
                        APP=WebQuery#StatusSNS#ENERGY#ApparentPower
                        print Wert Apparent Power %APP%
                        
                        RAP=WebQuery#StatusSNS#ENERGY#ReactivePower
                        print Wert Reaktive Power %RAP%
                        
                        
                        >W
                        
                        ;The lines in this section are displayed in the web UI main page
                        
                                  
                        Power{m} %2POW% W
                        Volt{m} %2VOL% V
                        Ampere{m} %2CUR% A
                        Total{m} %2TOT% 
                        Yesterday{m} %YES% 
                        Today{m} %2TOD% 
                        Apparent{m} %2APP% 
                        Reactive{m} %2RAP% 
                        
                        
                        
                        #
                        
                        RalfTh 2 Replies Last reply Reply Quote 0
                        • RalfTh
                          RalfTh @Ralla66 last edited by RalfTh

                          @ralla66 Wie ich sehe hast du als Modul sonoff basic verwendet und wohl auch die tasmota_DE.bin installiert. Bei mir fehlt der Button für das Skripting. Welches Binary hast du installiert?

                          Edit: Ok, habe gerade gesehen, dass diese Funktion nicht in den precompiled Binaries enthalten ist und über die Konsole gemacht werden muss. ----- Das funktioniert nicht mit "Edit Skript" bzw. "Edit script"

                          Ralla66 1 Reply Last reply Reply Quote 0
                          • Ralla66
                            Ralla66 Most Active @RalfTh last edited by Ralla66

                            @ralfth

                            hatte ich mit Tasmocompiler selbst erstellt als Generic,
                            eine eigene Test .bin wo das meiste mit drin ist.

                            #define USE_TIMERS
                            #define USE_SCRIPT
                            #define USE_SCRIPT_GLOBVARS
                            #define USE_SCRIPT_STATUS
                            #define USE_WEBSEND_RESPONSE
                            #define USE_SCRIPT_STATUS
                            #define USE_SCRIPT_FULL_JSON_PARSER
                            #define USE_SCRIPT_JSON_EXPORT
                            #define SUPPORT_MQTT_EVENT
                            #define USE_SML_M
                            #define USE_SCRIPT_WEB_DISPLAY
                            #define USE_SCRIPT_SERIAL

                            RalfTh 1 Reply Last reply Reply Quote 0
                            • RalfTh
                              RalfTh @Ralla66 last edited by

                              @ralla66 sagte in Gosund SP111 mit Tasmota 13.2.0 Problem mit DP:

                              #define USE_TIMERS
                              #define USE_SCRIPT
                              #define SUPPORT_MQTT_EVENT
                              #define USE_WEBSEND_RESPONSE

                              Das oben habe ich gefunden im aktuellen Release. Aktiviere ich USE_SCRIPT muss ich allerdings USE_RULES deaktivieren sofern ich diese Zeile richtig interpretiere:

                              #if defined(USE_RULES) && defined(USE_SCRIPT)
                                #error "Select either USE_RULES or USE_SCRIPT. They can't both be used at the same time"
                              #endif
                              

                              Die folgenden defines sind nicht mehr Bestandteil my_user_config.h

                              #define USE_SCRIPT_GLOBVARS
                              #define USE_SCRIPT_STATUS
                              #define USE_SCRIPT_STATUS
                              #define USE_SCRIPT_FULL_JSON_PARSER
                              #define USE_SCRIPT_JSON_EXPORT
                              #define USE_SCRIPT_WEB_DISPLAY
                              #define USE_SCRIPT_SERIAL
                              #define USE_SML_M

                              Jetz habe ich das mal compiliert und werde es ausprobieren und berichten.

                              Ralla66 1 Reply Last reply Reply Quote 0
                              • Ralla66
                                Ralla66 Most Active @RalfTh last edited by Ralla66

                                @ralfth

                                es geht nur Script oder Rules.
                                Versuche mal den Tasmocompiler, der Json Parser usw. wird ja gebraucht.
                                Zur Not kann man auch auf Git anstatt per my_user_config.h die define per Hand aktivieren.
                                Dann muß das // entfernt werden. Da bin ich aber nicht so tief drin.

                                Tasmocompiler
                                unter custom Parameters die define hinzufügen.

                                1 Reply Last reply Reply Quote 0
                                • RalfTh
                                  RalfTh @Ralla66 last edited by RalfTh

                                  @ralla66 sagte in Gosund SP111 mit Tasmota 13.2.0 Problem mit DP:

                                  >E
                                   
                                  ;Executed when a Tasmota MQTT RESULT message is received
                                   
                                   
                                  VOL=WebQuery#StatusSNS#ENERGY#Voltage
                                  print Wert Volt %VOL%
                                   
                                  CUR=WebQuery#StatusSNS#ENERGY#Current/1000
                                  print Wert Current %CUR%
                                   
                                  POW=WebQuery#StatusSNS#ENERGY#Power
                                  print Wert Power %POW%
                                   
                                  TOT=WebQuery#StatusSNS#ENERGY#Total
                                  print Wert Total %TOT%
                                   
                                  YES=WebQuery#StatusSNS#ENERGY#Yesterday
                                  print Wert Yesterday %YES%
                                   
                                  TOD=WebQuery#StatusSNS#ENERGY#Today
                                  print Wert Today %TOD%
                                   
                                  APP=WebQuery#StatusSNS#ENERGY#ApparentPower
                                  print Wert Apparent Power %APP%
                                   
                                  RAP=WebQuery#StatusSNS#ENERGY#ReactivePower
                                  print Wert Reaktive Power %RAP%
                                   
                                   
                                  >W
                                   
                                  ;The lines in this section are displayed in the web UI main page
                                   
                                            
                                  Power{m} %2POW% W
                                  Volt{m} %2VOL% V
                                  Ampere{m} %2CUR% A
                                  Total{m} %2TOT% 
                                  Yesterday{m} %YES% 
                                  Today{m} %2TOD% 
                                  Apparent{m} %2APP% 
                                  Reactive{m} %2RAP%
                                  

                                  Das mit der Firmware (bei mir 13.2.0.2 mit GitPod kompiliert) hat jetzt super geklappt.

                                  Ich habe dein Skript mal reinkopiert und aktiviert. Die DP's werden angelegt. Allerdings werden die definierten Variablen nicht gefüllt wie es eigentliche in "E" geschehen sollte. habe mal einen Wert anders initialisiert und dieser Wert wurde ausgegeben und nicht etwa durch das Ergebnis der Query ersetzt.

                                  Auch das was in >W ausgegeben werden soll erscheint nicht. Wenn ich etwas sehen will muss ich die Vorlage entsprechend aktivieren.

                                  Die IP habe ich an meine MQTT-Einstellung angepasst.

                                  Habe ich da was vergessen anzupassen?

                                  Ralla66 1 Reply Last reply Reply Quote 0
                                  • Ralla66
                                    Ralla66 Most Active @RalfTh last edited by Ralla66

                                    @ralfth sagte in Gosund SP111 mit Tasmota 13.2.0 Problem mit DP:

                                    Habe ich da was vergessen anzupassen?

                                    das muß an deinen Teledaten vom SP angepasst werden.

                                    08:12:14.187 MQT: tele/tasmota_26536D/SENSOR = {"Time":"2023-11-06T08:12:14","ENERGY":{"TotalStartTime":"2020-01-07T09:52:26","Total":0.890,"Yesterday":0.600,"Today":0.290,"Period":2,"Power":797,"ApparentPower":797,"ReactivePower":0,"Factor":1.00,"Voltage":223,"Current":3.569}}
                                    
                                    

                                    IP nimm die vom SP , =>websend [ deine IP] /cm?cmnd=status 10

                                    beim mir ist ja der Pfad -> #StatusSNS#ENERGY#Today
                                    bei dir ja nur #ENERGY#Today

                                    -> Auch das was in >W ausgegeben werden soll erscheint nicht
                                    Reboot gemacht ? Script aktiviert ?
                                    sonst fehlt die #define USE_SCRIPT_WEB_DISPLAY

                                    Teste mal im Browser gegen mit http:// deine IP /cm?cmnd=status 10
                                    dann sollten Daten und Pfade sichtbar sein.

                                    RalfTh 1 Reply Last reply Reply Quote 0
                                    • RalfTh
                                      RalfTh @Ralla66 last edited by RalfTh

                                      @ralla66

                                      {"StatusSNS":{"Time":"2023-11-14T12:59:46","ENERGY":{"TotalStartTime":"2020-06-30T13:38:42","Total":0.424,"Yesterday":0.007,"Today":0.093,"Power":42,"ApparentPower":42,"ReactivePower":0,"Factor":1.00,"Voltage":231,"Current":0.181}}}
                                      

                                      So sieht die Rückmeldung aus , wenn ich im Webbrowser "http://192.xxx.xxx.xxx/cm?cmnd=status 10" eingebe.

                                      Mein Script:

                                      >D
                                       
                                      ;a valid script must start with >D in the first line
                                       
                                       
                                      Timer=0
                                       
                                      WEBQ=5
                                       
                                      VOL=0
                                      CUR=0
                                      POW=0
                                      TOT=0
                                      YES=0
                                      TOD=0
                                      APP=0
                                      RAP=0
                                       
                                      ; Meins
                                       
                                      MQT: tasmota_Reserve2/cmnd = {"StatusSNS":{"Time":"2023-11-14T12:59:46","ENERGY":{"TotalStartTime":"2020-06-30T13:38:42","Total":0.424,"Yesterday":0.007,"Today":0.093,"Power":42,"ApparentPower":42,"ReactivePower":0,"Factor":1.00,"Voltage":231,"Current":0.181}}}
                                       
                                      >BS
                                       
                                      +>subscribe EA, %topic%/cmnd/Total
                                      +>subscribe EA, %topic%/cmnd/Yesterday
                                      +>subscribe EA, %topic%/cmnd/Today
                                      +>subscribe EA, %topic%/cmnd/Power
                                      +>subscribe EA, %topic%/cmnd/ApparentPower
                                      +>subscribe EA, %topic%/cmnd/ReactivePower
                                      +>subscribe EA, %topic%/cmnd/Power
                                      +>subscribe EA, %topic%/cmnd/Voltage
                                      +>subscribe EA, %topic%/cmnd/Current
                                       
                                      >S
                                       
                                      Timer+=1
                                       
                                      ;Executed every second 
                                       
                                       
                                      if Timer>10
                                       
                                      then
                                      =>websend 192.168.178:164/cm?cmnd=status 10
                                       
                                      +>publish %topic%/ENERGY_Total {%0TOT% kWh}
                                      +>publish %topic%/ENERGY_Yesterday {%0YES% kWh}
                                      +>publish %topic%/ENERGY_Today {%0TOD% kWh}
                                      +>publish %topic%/ENERGY_ApparentPower {%0APP% VA}
                                      +>publish %topic%/ENERGY_ReactivePower {%RAP% VAR}
                                      +>publish %topic%/ENERGY_Power {%0POW% W}
                                      +>publish %topic%/ENERGY_Voltage {%0VOL% V}
                                      +>publish %topic%/ENERGY_Current {%0CUR% A}
                                       
                                      Timer=0
                                       
                                      endif
                                       
                                       
                                      >E
                                       
                                      ;Executed when a Tasmota MQTT RESULT message is received
                                       
                                      VOL=WebQuery#StatusSNS#ENERGY#Voltage
                                      print Wert Volt %VOL%
                                       
                                      CUR=WebQuery#StatusSNS#ENERGY#Current/1000
                                      print Wert Current %CUR%
                                       
                                      POW=WebQuery#StatusSNS#ENERGY#Power
                                      print Wert Power %POW%
                                       
                                      TOT=WebQuery#StatusSNS#ENERGY#Total
                                      print Wert Total %TOT%
                                       
                                      YES=WebQuery#StatusSNS#ENERGY#Yesterday
                                      print Wert Yesterday %YES%
                                       
                                      TOD=WebQuery#StatusSNS#ENERGY#Today
                                      print Wert Today %TOD%
                                       
                                      APP=WebQuery#StatusSNS#ENERGY#ApparentPower
                                      print Wert Apparent Power %APP%
                                       
                                      RAP=WebQuery#StatusSNS#ENERGY#ReactivePower
                                      print Wert Reaktive Power %RAP%
                                       
                                       
                                      >W
                                       
                                      ;The lines in this section are displayed in the web UI main page
                                       
                                                
                                      Power{m} %2POW% W
                                      Volt{m} %2VOL% V
                                      Ampere{m} %2CUR% A
                                      Total{m} %2TOT% 
                                      Yesterday{m} %YES% 
                                      Today{m} %2TOD% 
                                      Apparent{m} %2APP% 
                                      Reactive{m} %2RAP% 
                                      
                                       
                                      #
                                      

                                      Hier mal ein Auszug was im MQTT-Explorer sieht:
                                      d6390e06-63a5-4ad2-86c2-e4a930f6a3bd-image.png

                                      Auffällig ist der DP tasmota_Reserve2/stat/RESULT Hier erscheint "Websend":Wrong Parameters

                                      52378906-83b0-42aa-b9ef-ce432e619895-image.png

                                      Einiges habe ich angepasst, weil ich in MQTT am Topic und Full-Topic was geändert habe. Mein Full-Topic den Eintrag %topic%/%prefix%/ damit in MQTT der Baum anders aufgebaut wird. Das habe ich beim subscribe berücksichtigt. Und das Publish habe ich direkt unter dem Topic vorgenommen.

                                      Allerdings habe ich auch schon dein Original (natürlich mit den spez. Anpassungen) ausprobiert mit dem gleichen Ergebnis. Die DP's werden nicht aktualisiert

                                      Was mache ich falsch?

                                      Ralla66 1 Reply Last reply Reply Quote 0
                                      • Ralla66
                                        Ralla66 Most Active @RalfTh last edited by Ralla66

                                        @ralfth sagte in Gosund SP111 mit Tasmota 13.2.0 Problem mit DP:

                                        weil ich in MQTT am Topic und Full-Topic was geändert habe

                                        Erst auf default lassen bis das läuft.
                                        Das mag Tasmota gar nicht.
                                        Mqtt kannst du später prüfen, das muß erst auf dem ESP laufen.

                                        ! hinter dem ; ist Text und wird im Programm nicht Berücksichtigt
                                        da fehlt was am Anfang ; MQT: tasmota_Reserve2/cmnd = {"StatusSNS":{"Time":"2023-11-14T...........................

                                        Nicht soviel auf einmal ändern , macht nur das Debuggen schwerer.

                                        Ralla66 1 Reply Last reply Reply Quote 0
                                        • Ralla66
                                          Ralla66 Most Active @Ralla66 last edited by Ralla66

                                          @ralla66

                                          Wrong Parameters kann auch vom publish sein, sowas {%0TOT% kWh}
                                          Das subscribe und publish ist auf Sonoff Adapter gemünzt, nicht für Mqtt Adapter.

                                          Nachtrag eckige Klammern !

                                          if Timer>10

                                          then
                                          =>websend [192.168.2.85] /cm?cmnd=status 10

                                          RalfTh 1 Reply Last reply Reply Quote 0
                                          • RalfTh
                                            RalfTh @Ralla66 last edited by RalfTh

                                            @ralla66 Habe jetzt dein original Script eingebunden:

                                            >D
                                             
                                            ;a valid script must start with >D in the first line
                                             
                                             
                                            Timer=0
                                             
                                            WEBQ=5
                                             
                                            VOL=0
                                            CUR=0
                                            POW=0
                                            TOT=0
                                            YES=0
                                            TOD=0
                                            APP=0
                                            RAP=0
                                             
                                            ; Meins
                                             
                                            ; MQT: tasmota_Reserve2 = {"StatusSNS":{"Time":"2023-11-14T12:59:46","ENERGY":{"TotalStartTime":"2020-06-30T13:38:42","Total":0.424,"Yesterday":0.007,"Today":0.093,"Power":42,"ApparentPower":42,"ReactivePower":0,"Factor":1.00,"Voltage":231,"Current":0.181}}}
                                             
                                            >BS
                                             
                                            +>subscribe EA, cmnd/%topic%/Total
                                            +>subscribe EA, cmnd/%topic%/Yesterday
                                            +>subscribe EA, cmnd/%topic%/Today
                                            +>subscribe EA, cmnd/%topic%/Power
                                            +>subscribe EA, cmnd/%topic%/ApparentPower
                                            +>subscribe EA, cmnd/%topic%/ReactivePower
                                            +>subscribe EA, cmnd/%topic%/Power
                                            +>subscribe EA, cmnd/%topic%/Voltage
                                            +>subscribe EA, cmnd/%topic%/Current
                                             
                                            >S
                                             
                                            Timer+=1
                                             
                                            ;Executed every second 
                                             
                                             
                                            if Timer>10
                                             
                                            then
                                            =>websend [192.168.178.164] /cm?cmnd=status 10
                                             
                                            +>publish stat/%topic%/RESULT {"Total":%0TOT%}
                                            +>publish stat/%topic%/RESULT {"Yesterday":%0YES%}
                                            +>publish stat/%topic%/RESULT {"Today":%0TOD%}
                                            +>publish stat/%topic%/RESULT {"ApparentPower":%0APP%}
                                            +>publish stat/%topic%/RESULT {"ReactivePower":%RAP%}
                                            +>publish stat/%topic%/RESULT {"Power":%0POW%}
                                            +>publish stat/%topic%/RESULT {"Voltage":%0VOL%}
                                            +>publish stat/%topic%/RESULT {"Current":%0CUR%}
                                             
                                            Timer=0
                                             
                                            endif
                                             
                                             
                                            >E
                                             
                                            ;Executed when a Tasmota MQTT RESULT message is received
                                             
                                             
                                            VOL=WebQuery#StatusSNS#ENERGY#Voltage
                                            print Wert Volt %VOL%
                                             
                                            CUR=WebQuery#StatusSNS#ENERGY#Current/1000
                                            print Wert Current %CUR%
                                             
                                            POW=WebQuery#StatusSNS#ENERGY#Power
                                            print Wert Power %POW%
                                             
                                            TOT=WebQuery#StatusSNS#ENERGY#Total
                                            print Wert Total %TOT%
                                             
                                            YES=WebQuery#StatusSNS#ENERGY#Yesterday
                                            print Wert Yesterday %YES%
                                             
                                            TOD=WebQuery#StatusSNS#ENERGY#Today
                                            print Wert Today %TOD%
                                             
                                            APP=WebQuery#StatusSNS#ENERGY#ApparentPower
                                            print Wert Apparent Power %APP%
                                             
                                            RAP=WebQuery#StatusSNS#ENERGY#ReactivePower
                                            print Wert Reaktive Power %RAP%
                                             
                                             
                                            >W
                                             
                                            ;The lines in this section are displayed in the web UI main page
                                             
                                                      
                                            Power{m} %2POW% W
                                            Volt{m} %2VOL% V
                                            Ampere{m} %2CUR% A
                                            Total{m} %2TOT% 
                                            Yesterday{m} %YES% 
                                            Today{m} %2TOD% 
                                            Apparent{m} %2APP% 
                                            Reactive{m} %2RAP% 
                                              
                                            #
                                            

                                            angepasst habe ich Zeile 21 und 45

                                            Im Log des ioBroker steht:

                                            
                                            sonoff.0
                                            2023-11-14 18:48:06.358	debug	[Reserve2] Received: stat/tasmota_Reserve2/RESULT = {"WebSend":"Connect failed"}
                                            

                                            Habe keine Ahnung woran das liegen kann.

                                            Nachtrag:
                                            3322f7f1-a10c-455d-a08c-40e4eacc65db-image.png
                                            e66ab1cf-68b5-4c50-9994-0d9f5a8a7566-image.png

                                            Ralla66 2 Replies Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            391
                                            Online

                                            31.7k
                                            Users

                                            79.8k
                                            Topics

                                            1.3m
                                            Posts

                                            4
                                            88
                                            6007
                                            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