Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Error/Bug
    4. [Gelöst]ObjectId (von Wiffi-WZ-Adapter) triggert Script nicht

    NEWS

    • Neuer Blog: Fotos und Eindrücke aus Solingen

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

    • ioBroker goes Matter ... Matter Adapter in Stable

    SOLVED [Gelöst]ObjectId (von Wiffi-WZ-Adapter) triggert Script nicht

    This topic has been deleted. Only users with topic management privileges can see it.
    • paul53
      paul53 @coyote last edited by paul53

      @coyote sagte:

      die Typen eigentlich auch richtig sind.

      Nein, das sind sie nicht. Die Werte werden alle in Anführungszeichen übergeben, z.B. "regen_mm_heute": "value":"519.0". Richtig wäre "value":519.0

      coyote 1 Reply Last reply Reply Quote 0
      • paul53
        paul53 @smartboart last edited by

        @smartboart sagte:

        Welche andere Möglichkeit / Workaround gibt es dazu?

        Da ich nur einen kleinen Teil des Skripts kenne, am Beispiel Sonne:

           var sonne = toBoolean(getState('wiffi-wz.0.root.192_168_66_134.w_sonne_scheint'/*16*/).val);
        

        Bei Zahlen entsprechend

           var Sturm = parseFloat(getState('wiffi-wz.0.root.192_168_66_134.w_windstaerke).val);
        
        smartboart 2 Replies Last reply Reply Quote 0
        • smartboart
          smartboart @paul53 last edited by smartboart

          @paul53 ah gut....wierder was dazu gelernt....Danke..

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

            @paul53 ok, danke Paul. Wieder was gelernt, ich dachte dass passt so. Dann sollten wir vllt doch mal bei Eugen nachhaken, ob er das ändern möchte. Dann wäre das JSON ja so nicht korrekt

            smartboart 1 Reply Last reply Reply Quote 0
            • smartboart
              smartboart @coyote last edited by

              @coyote ja sieht so aus als hätte er in der firmware den Bock drinne...Schreibst du ihn an.. Er antwortet immer relativ schnell

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

                Ja kann ich machen, meinst du direkt über seine Page oder Homematic Forum?

                1 Reply Last reply Reply Quote 0
                • smartboart
                  smartboart @paul53 last edited by smartboart

                  @paul53 said in [Gelöst]ObjectId (von Wiffi-WZ-Adapter) triggert Script nicht:

                  Da ich nur einen kleinen Teil des Skripts kenne, am Beispiel Sonne:
                  var sonne = toBoolean(getState('wiffi-wz.0.root.192_168_66_134.w_sonne_scheint'/16/).val);

                  Bei Zahlen entsprechend
                  var Sturm = parseFloat(getState('wiffi-wz.0.root.192_168_66_134.w_windstaerke).val);

                  Wie löse ich das hier?
                  on({id:"wiffi-wz.0.root.192_168_1_52.w_windstaerke", val: 6, change: 'ne' },function(obj){

                  bzw.
                  on({id:Sturm, val: 6, change: 'ne' },function(obj){

                  ok könnte man so machen

                  on(idSturm, function(dp) {
                  var Sturm = parseFloat(getState(idSturm).val);
                  if(Sturm>=6){
                  if (logging) log ('Trigger Sturm Rollo Couch aktiv');
                  Rolladen();
                  }
                  });

                  Dann wird aber immer immer beim pollen getriggert und nicht nur einmal bei Änderung auf 6..

                  paul53 2 Replies Last reply Reply Quote 0
                  • paul53
                    paul53 @smartboart last edited by

                    @smartboart :

                    on({id:"wiffi-wz.0.root.192_168_1_52.w_windstaerke", val: 6, change: 'ne' },function(obj){

                    on("wiffi-wz.0.root.192_168_1_52.w_windstaerke",function(obj) {
                       if(parseFloat(obj.state.val) == 6) {
                       }
                    

                    Du triggerst auf Windstärke == 6 ?

                    1 Reply Last reply Reply Quote 0
                    • paul53
                      paul53 @smartboart last edited by paul53

                      @smartboart sagte:

                      nicht nur einmal bei Änderung auf 6..

                      Du möchtest die Aktion nur ausführen, wenn der Grenzwert erstmalig überschritten wird und dann darüber bleibt ? Dann so

                      on("wiffi-wz.0.root.192_168_1_52.w_windstaerke",function(obj) {
                         if(parseFloat(obj.state.val) >= 6 && parseFloat(obj.oldState.val) < 6) {
                      
                         }
                      
                      smartboart 1 Reply Last reply Reply Quote 0
                      • smartboart
                        smartboart @paul53 last edited by

                        @paul53 Danke sehr...

                        Habe jetz alle Skripte durch...Im Scriptadapter in der Sufu wiffi-wz.0.root.192_168_1_52 eingegeben und alles durchgeackert...Das war kein Spaß...

                        Danke für die tolle Hilfe..

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

                          Genau, vielen Dank @paul53 für deine Hilfe.
                          Eugen hab ich angeschrieben und der Entwickler des wiffi-wz Adapters weiß auch Bescheid über GitHub.
                          Dann hoffen wir mal das Eugen das JSON schnell fixt.

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

                            @smartboart
                            Ich habe mit Eugen geschrieben hier die Mail von gestern:

                            Ich habe mir die für mich gefühlte "unendliche" Geschichte/diskussion

                            des richtigen JSON-Formats in den vielen Mails nochmal angesehen.

                            Letzlich entstand aus den Diskussionen mit verschiedenen Usern der heute

                            gewählte Ansatz, auch die "values" als Zahlen im Stringformat

                            darzustellen. Wenn ich jetzt wieder auf die von Dir bevorzugte Lösung

                            zurückschwenke, dann bekomme ich von vielen Seiten richtig Ärger, die

                            auf Basis des aktuellen JSON-Formates ihre Auswertung

                            ausgerichtet/programmiert haben.

                            Also von meiner Seite die klare Entscheidung für das JSON-Format beim

                            WEATHERMAN :

                            Ich bleibe bei dem aktuellen Format mit den Values als String. Die

                            anderen Produkte wie PULSECOUNTER werde ich sukzessive auf dieses Format

                            umstellen.

                            Daraus ergibt sich ggf. die Notwendigkeit, die entsprechenden

                            IObroker-Adapter so anzupassen, daß aus den verschiedenen value-Strings

                            die verschiedenen Zahlenformate erzeugt werden (was aber sicher kein

                            großes technisches Problem sein wird).

                            Ich bitte um Verständnis für diese für Dich möglicherweise nicht

                            zufriedenstellende Antwort.

                            Bleibt dann nur noch die Möglichkeit es direkt im Adapter abzuändern oder eben umzuwandeln wie paul53 es geschrieben hat.

                            smartboart 1 Reply Last reply Reply Quote 0
                            • smartboart
                              smartboart @coyote last edited by smartboart

                              @coyote Vielen Dank für die Rückmeldung...

                              Ich hoffe x4tlaoguo passt den Adapter entsprechend an..

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

                                @smartboart hab das jetzt mal im Github Issue weitergegeben und x4tlaoguo will den Adapter dann Anfang nächste Woche umbauen.

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

                                Support us

                                ioBroker
                                Community Adapters
                                Donate

                                814
                                Online

                                31.8k
                                Users

                                80.0k
                                Topics

                                1.3m
                                Posts

                                datenpunkte problem script wiffi-wz
                                3
                                37
                                1669
                                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