Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Off Topic
    4. Aussentemperatur Wetterstation WS980Wifi in iobroker

    NEWS

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

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    Aussentemperatur Wetterstation WS980Wifi in iobroker

    This topic has been deleted. Only users with topic management privileges can see it.
    • Pascal Bay
      Pascal Bay last edited by

      17868374-d728-418b-8b7b-55bdc3213d60-image.png Hallo Zusammen ich konnte die WS980WIfi einbinden und alle Variablen sind vorhanden. Bei der Aussentemperatur gibt es aber einen Fehler. Die Variabel zeigt, wenn die Aussenteperatur unter 0 ist einen um 6552 ° zu hohe Temperatur an. Vgl. Bilder im Anhang. Bei Werten über 0° ist dies nicht der Fall. Kann mit jemand helfen? Vielen Dank schon im Voraus Liebe Grüsse Pascal

      Bildschirmfoto 2025-01-14 um 15.59.56.jpeg Bildschirmfoto 2025-01-14 um 16.00.46.jpg

      Homoran 1 Reply Last reply Reply Quote 0
      • Homoran
        Homoran Global Moderator Administrators @Pascal Bay last edited by

        @pascal-bay sagte in Aussentemperatur Wetterstation WS980Wifi in iobroker:

        ich konnte die WS980WIfi einbinden

        wo und wie?
        das sieht nach einer CCU aus,

        @pascal-bay sagte in Aussentemperatur Wetterstation WS980Wifi in iobroker:

        Vgl. Bilder im Anhang

        und was ist das für ein Bild im Vorspann?

        Pascal Bay 2 Replies Last reply Reply Quote 0
        • Pascal Bay
          Pascal Bay @Homoran last edited by

          @homoran Vielen Dank!

          Es läuft über RaspberryMatic sozusagen CCU2 Emulation. Ich habe folgendes Script verwedet.

          Voraussetzungen:

          • Wetterstation WS980WiFi (im Heimnetzwerk eingebunden)
          • CuxD installiert
          • Zugriff auf CCU / Raspberry per ssh, am kompfortabelsten mit SCP (WinSCP)

          Installation:

          • per SCP im Ordner /usr/local/addons einen Ordner /weather anlegen (Rechte auf 777 setzen)
          • dahin dann folgende 3 Dateien aus dem entpackten Archiv kopieren: weather.tcl, weatherini.tcl und weather.hexin (Rechte für jede Datei auf 777 setzen)
          • das Script script_create_var.sh einmalig ausführen (zB. neues Programm erzeugen, das Script ausführt - kann dann wieder gelöscht werden) - legt nur automatisch alle Variablen an
          • ein CuxD-Gerät System mit Funktion Timer anlegen (Icon egal, habe aber Wetterstation genommen)
          • Bei Geräteeinstellungen "TIMER_PRESET 60", "REPEAT angehakt", "CMD_EXE tclsh /usr/local/addons/weather/weather.tcl", "EXEC_FUNC system()", "EXEC_TIMEOUT 1"

          Script_Create_Var.sh

          Homoran paul53 2 Replies Last reply Reply Quote 0
          • Pascal Bay
            Pascal Bay @Homoran last edited by

            @homoran Die Variable ist durch das Script generiert worden und befindet sich auf der CCU2 Oberfläche unter Variablen.

            mcm1957 1 Reply Last reply Reply Quote 0
            • Homoran
              Homoran Global Moderator Administrators @Pascal Bay last edited by

              @pascal-bay sagte in Aussentemperatur Wetterstation WS980Wifi in iobroker:

              Es läuft über RaspberryMatic sozusagen CCU2 Emulation.

              und was kann der arme ioBroker denn jetzt dafür?
              Der falsche Wert steht doch bereits in der CCU.

              iobroker übernimmt sie korrekt.

              der Fehler muss in der CuxD Integration liegen.

              1 Reply Last reply Reply Quote 0
              • mcm1957
                mcm1957 @Pascal Bay last edited by

                @pascal-bay said in Aussentemperatur Wetterstation WS980Wifi in iobroker:

                @homoran Die Variable ist durch das Script generiert worden und befindet sich auf der CCU2 Oberfläche unter Variablen.

                Ohne jetzt CCU oder rasperrymatic zu kennen:
                Der Fehler deutet stark darauf hin, dass eine Variable als UNSIGNED Zahl angelegt wurde und mit einerm SIGNED Wert befüllt wird. Die Variable für die Temperatur sollte wohl jedenfalls SIGNED sein.

                Pascal Bay 1 Reply Last reply Reply Quote 1
                • Pascal Bay
                  Pascal Bay @mcm1957 last edited by

                  @mcm1957 Vielen Dank, kann mir jemand helfen wo ich bei der CCU2 Variable auf SIGNED Variable wechseln kann? Danke

                  Homoran 1 Reply Last reply Reply Quote 0
                  • Homoran
                    Homoran Global Moderator Administrators @Pascal Bay last edited by Homoran

                    @pascal-bay ich denke mal dass das eigentlich mit der Angabe negativer Werte von min passieren sollte.
                    Etwas anderes passendes als "Zahl" bei Typ gibt es IMHO nicht.

                    Aber meine Vermutung ist, dass deine CuxD Anbindung da schief läuft.

                    Pascal Bay 1 Reply Last reply Reply Quote 0
                    • Pascal Bay
                      Pascal Bay @Homoran last edited by

                      @homoran Danke, ich gehe auch davon aus. Der Wert in der Wetterstation stimmt. (Eigene App) Ich denke auch, da ist etwas falsch in CuxD sobald der wert negativ wird. Wo kann ich das sehen? Bildschirmfoto 2025-01-14 um 17.13.15.jpg

                      P paul53 2 Replies Last reply Reply Quote 0
                      • P
                        peterfido @Pascal Bay last edited by

                        @pascal-bay Wer fragt denn die Wetterstation ab? Da ist statt eines INT ein WORD oder U_INT genutzt worden.

                        1 Reply Last reply Reply Quote 1
                        • paul53
                          paul53 @Pascal Bay last edited by paul53

                          @pascal-bay sagte: etwas falsch in CuxD

                          Der Fehler liegt wohl eher in der Datei weather.tcl, denn sie wird von CUxD ausgeführt.

                          P 1 Reply Last reply Reply Quote 1
                          • P
                            peterfido @paul53 last edited by

                            @paul53 Die habe ich auch schon gesucht.

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

                              @pascal-bay sagte: /usr/local/addons/weather/weather.tcl

                              Wenn die Zeile vor "return $zahl" bei dir fehlt, dann füge sie ein.

                              # - liest ein Word vom Binärstring liefert Zahl von -32768 bis 32768
                              proc getw {idx} {
                                 global global_binout
                                 set sb [string index $global_binout $idx]
                                 scan $sb %c asciih
                                 set idx [expr $idx + 1]
                                 set sb [string index $global_binout $idx]  
                                 scan $sb %c asciil
                                 set zahl [expr $asciil + { $asciih * 256}]
                                 if {$zahl > 32767} then {set zahl ~[expr 65535 - $zahl]}
                                 return $zahl
                              } 
                              
                              Pascal Bay 1 Reply Last reply Reply Quote 0
                              • Pascal Bay
                                Pascal Bay @paul53 last edited by

                                @paul53 said in Aussentemperatur Wetterstation WS980Wifi in iobroker:

                                if {$zahl > 32767} then {set zahl ~[expr 65535 - $zahl]}

                                Vielen Dank! Bei mir sieht das so aus? Ein Tip, was ich ändern kann? Danke!

                                Bildschirmfoto 2025-01-14 um 20.02.26.jpg

                                Homoran paul53 2 Replies Last reply Reply Quote 0
                                • Homoran
                                  Homoran Global Moderator Administrators @Pascal Bay last edited by Homoran

                                  @pascal-bay sagte in Aussentemperatur Wetterstation WS980Wifi in iobroker:

                                  Ein Tip, was ich ändern kann?

                                  @paul53 sagte in Aussentemperatur Wetterstation WS980Wifi in iobroker:

                                  Wenn die Zeile vor "return $zahl" bei dir fehlt, dann füge sie ein.

                                  das ist

                                  if {$zahl > 32767} then {set zahl ~[expr 65535 - $zahl]}
                                  
                                  1 Reply Last reply Reply Quote 0
                                  • paul53
                                    paul53 @Pascal Bay last edited by paul53

                                    @pascal-bay sagte: Bei mir sieht das so aus?

                                    Das ist die falsche Prozedur. Die richtige ist getw{idx}.

                                    EDIT: Woher ist deine "weather.tcl"? Die TCL-Datei aus "weatherV2b.zip" sieht anders aus. Anfang:

                                    #!/bin/tclsh
                                    
                                    load tclrega.so
                                    
                                    # - hier nur die IP Addresse anpassen
                                      set debug_mode 0
                                      set wait_between_status_requests 1
                                      set connection_timeout 500
                                      set wait_between_retries 200
                                      set status_retries 5
                                      set command_retries 10
                                      set matchport_host 192.168.0.129 
                                      set matchport_port 45000
                                    
                                    
                                    
                                    # - liest ein Byte vom Binärstring - liefert Zahl von 0 - 255
                                    proc getb {idx} {
                                       global global_binout
                                       set sb [string index $global_binout $idx]
                                       scan $sb %c ascii
                                       return $ascii
                                    }
                                    # - liest ein Word vom Binärstring liefert Zahl von -32768 bis 32768
                                    proc getw {idx} {
                                       global global_binout
                                       set sb [string index $global_binout $idx]
                                       scan $sb %c asciih
                                       set idx [expr $idx + 1]
                                       set sb [string index $global_binout $idx]  
                                       scan $sb %c asciil
                                       set zahl [expr $asciil + { $asciih * 256}]
                                       if {$zahl > 32767} then {set zahl ~[expr 65535 - $zahl]}
                                       return $zahl
                                    } 
                                    # - liest ein Longword vom Binärstring und liefert Zahl von 0 - 4294967295
                                    proc getl {idx} {
                                       global global_binout
                                       set sb [string index $global_binout $idx]
                                       scan $sb %c ascii3
                                       set idx [expr $idx + 1]
                                       set sb [string index $global_binout $idx]  
                                       scan $sb %c ascii2
                                       set idx [expr $idx + 1]
                                       set sb [string index $global_binout $idx]  
                                       scan $sb %c ascii1   
                                       set idx [expr $idx + 1]
                                       set sb [string index $global_binout $idx]  
                                       scan $sb %c ascii0   
                                       set zahl [expr $ascii0 + {$ascii1 * 256} + {$ascii2 * 65536} + {$ascii3 * 16777216}]
                                       return $zahl
                                    }
                                    
                                    Pascal Bay 1 Reply Last reply Reply Quote 1
                                    • Pascal Bay
                                      Pascal Bay @paul53 last edited by

                                      @paul53 Einmal mehr Danke. Ich habe die weather.tcl aus WS980WiFiV2a also noch 2b. Es scheint aber, dass die Zeile da ist. Anbei der richtige Auszug getw{idx}.

                                      Bildschirmfoto 2025-01-15 um 09.52.15.jpg

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

                                        @pascal-bay sagte: Auszug getw{idx}.

                                        Dann sollten negative Werte geliefert werden, denn aufgerufen wird die Prozedur für die Außentemperatur so:

                                                    set atemp [expr double([getw 10]) / 10]
                                        
                                        Pascal Bay 1 Reply Last reply Reply Quote 0
                                        • Pascal Bay
                                          Pascal Bay @paul53 last edited by

                                          @paul53 Danke. Sehe ich das richtig, dann ist mein getw{idx} richtig? Der Fehler muss also woanders liegen?

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

                                            @pascal-bay sagte: Der Fehler muss also woanders liegen?

                                            Sieht so aus.
                                            Hast du die TCL-Datei ausgetauscht? Oben ist die globale Variable answer und im letzten Post ist sie global_binout.

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

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            957
                                            Online

                                            31.7k
                                            Users

                                            79.7k
                                            Topics

                                            1.3m
                                            Posts

                                            5
                                            23
                                            718
                                            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