Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Praktische Anwendungen (Showcase)
    4. [Linux Shell-Skript] WLAN-Wetterstation

    NEWS

    • Monatsrückblick - April 2025

    • Minor js-controller 7.0.7 Update in latest repo

    • Save The Date: ioBroker@Smart Living Forum Solingen, 14.06.

    [Linux Shell-Skript] WLAN-Wetterstation

    This topic has been deleted. Only users with topic management privileges can see it.
    • SBorg
      SBorg Forum Testing Most Active @crunchip last edited by

      @crunchip sagte in [Linux Shell-Skript] WLAN-Wetterstation:

      da ich die Maschine(VM) neu gestartet habe

      = bei dir iobroker? Wenn du also schreibst "iobroker neu gestartet" ist dies nicht der/unser iobroker sondern deine VM 🙂
      Schau mal was bei gestopptem Skript mittels ./wetterstation.sh --data kommt. Ist dies ein Datenpaket oder irgendeine Meldung?

      crunchip 1 Reply Last reply Reply Quote 0
      • crunchip
        crunchip Forum Testing Most Active @SBorg last edited by crunchip

        @SBorg sagte in [Linux Shell-Skript] WLAN-Wetterstation:

        nicht der/unser iobroker sondern deine VM

        ja die VM neu gestartet, ist folglich iobroker selbst dann ja auch neugestartet

        @SBorg sagte in [Linux Shell-Skript] WLAN-Wetterstation:

        Schau mal was bei gestopptem Skrip

        mom, teste ich

        root@IoBroker:/home/iobroker# ./wetterstation.sh --data
        
        
        Warte maximal 66 Sekunden auf Datenpaket der Wetterstation...
        
        listening on [any] 55555 ...
        no connection : Connection timed out
        root@IoBroker:/home/iobroker#
        
        

        anschliessend nun wieder gestartet, jetzt hab ich wieder das Problem

        root@IoBroker:/home/iobroker# ./wetterstation.sh
        listening on [any] 55555 ...
        Warning: forward host lookup failed for ESP_9C8A47.local: Unknown host
        connect to [10.1.1.10] from ESP_9C8A47.local [10.1.1.206] 24230
        listening on [any] 55555 ...
        no connection : Connection timed out
        listening on [any] 55555 ...
        no connection : Connection timed out
        listening on [any] 55555 ...
        no connection : Connection timed out
        listening on [any] 55555 ...
        no connection : Connection timed out
        listening on [any] 55555 ...
        no connection : Connection timed out
        listening on [any] 55555 ...
        no connection : Connection timed out
        listening on [any] 55555 ...
        no connection : Connection timed out
        listening on [any] 55555 ...
        Warning: forward host lookup failed for ESP_9C8A47.local: Unknown host
        connect to [10.1.1.10] from ESP_9C8A47.local [10.1.1.206] 31842
        listening on [any] 55555 ...
        no connection : Connection timed out
        listening on [any] 55555 ...
        no connection : Connection timed out
        listening on [any] 55555 ...
        no connection : Connection timed out
        listening on [any] 55555 ...
        Warning: forward host lookup failed for ESP_9C8A47.local: Unknown host
        connect to [10.1.1.10] from ESP_9C8A47.local [10.1.1.206] 5617
        listening on [any] 55555 ...
        no connection : Connection timed out
        listening on [any] 55555 ...
        no connection : Connection timed out
        listening on [any] 55555 ...
        no connection : Connection timed out
        listening on [any] 55555 ...
        no connection : Connection timed out
        listening on [any] 55555 ...
        no connection : Connection timed out
        listening on [any] 55555 ...
        no connection : Connection timed out
        listening on [any] 55555 ...
        no connection : Connection timed out
        listening on [any] 55555 ...
        no connection : Connection timed out
        listening on [any] 55555 ...
        no connection : Connection timed out
        listening on [any] 55555 ...
        no connection : Connection timed out
        listening on [any] 55555 ...
        no connection : Connection timed out
        listening on [any] 55555 ...
        no connection : Connection timed out
        
        

        die Datenpunkte im Iobroker werden aber aktualisiert und läuft weiterhin!!?
        35031de3-f646-4fe7-99ae-5dfb4b6dc233-image.png

        Edit, scheinbar alles verzögernd , letzte Messung 13.43.29 und wird nicht mehr aktualisiert, bekomm es auch nicht wieder zum laufen, selbe Problem wie gestern.

        1 Reply Last reply Reply Quote 0
        • crunchip
          crunchip Forum Testing Most Active last edited by crunchip

          @SBorg also nochmal von vorn

          • VM neu gestartet
            *Ausgabe grep
          root@IoBroker:~# ps -aux | grep wetterstation.sh
          root       695  0.4  0.0  11548  3344 ?        S    13:53   0:00 /bin/bash /home/iobroker/wetterstation.sh
          root      2297  0.0  0.0  11548  2092 ?        S    13:55   0:00 /bin/bash /home/iobroker/wetterstation.sh
          root      2302  0.0  0.0  12780  1016 pts/0    S+   13:55   0:00 grep wetterstation.sh
          
          

          Werte für javascript.0.Wetterstation._Kommunikationsfehler (mein Abfrageintervall ist 30 sec)

          false 	true 	simple-api.0 	2020-03-14 13:52:26.944 	
          true 	true 	simple-api.0 	2020-03-14 13:52:32.131
          

          nur so am Rande gefragt, im log hab ich gerade gesehen(durch den Neustart)

          host.IoBroker	2020-03-14 13:57:18.088	error	Caught by controller[0]: at process._tickCallback (internal/process/next_tick.js:68:7)
          host.IoBroker	2020-03-14 13:57:18.087	error	Caught by controller[0]: at promise.then (/opt/iobroker/node_modules/standard-as-callback/built/index.js:19:49)
          host.IoBroker	2020-03-14 13:57:18.087	error	Caught by controller[0]: at tryCatcher (/opt/iobroker/node_modules/standard-as-callback/built/utils.js:11:23)
          host.IoBroker	2020-03-14 13:57:18.087	error	Caught by controller[0]: at (anonymous function).(anonymous function) (/opt/iobroker/node_modules/iobroker.objects-redis/index.js:17:107068)
          host.IoBroker	2020-03-14 13:57:18.086	error	Caught by controller[0]: TypeError: Cannot read property 'common' of null
          simple-api.0	2020-03-14 13:57:17.534	info	(3520) Terminated (NO_ERROR): Without reason
          simple-api.0	2020-03-14 13:57:17.533	info	(3520) terminating
          simple-api.0	2020-03-14 13:57:17.510	info	(3520) terminating http server on port 8087
          simple-api.0	2020-03-14 13:57:17.508	error	at process._tickCallback (internal/process/next_tick.js:68:7)
          simple-api.0	2020-03-14 13:57:17.508	error	at promise.then (/opt/iobroker/node_modules/standard-as-callback/built/index.js:19:49)
          simple-api.0	2020-03-14 13:57:17.508	error	at tryCatcher (/opt/iobroker/node_modules/standard-as-callback/built/utils.js:11:23)
          simple-api.0	2020-03-14 13:57:17.508	error	at (anonymous function).(anonymous function) (/opt/iobroker/node_modules/iobroker.objects-redis/index.js:17:107068)
          simple-api.0	2020-03-14 13:57:17.508	error	(3520) TypeError: Cannot read property 'common' of null
          simple-api.0	2020-03-14 13:57:17.506	error	(3520) uncaught exception: Cannot read property 'common' of null
          
          SBorg 1 Reply Last reply Reply Quote 0
          • SBorg
            SBorg Forum Testing Most Active @crunchip last edited by

            @crunchip sagte in [Linux Shell-Skript] WLAN-Wetterstation:

            root@IoBroker:~# ps -aux | grep wetterstation.sh
            root 695 0.4 0.0 11548 3344 ? S 13:53 0:00 /bin/bash /home/iobroker/wetterstation.sh
            root 2297 0.0 0.0 11548 2092 ? S 13:55 0:00 /bin/bash /home/iobroker/wetterstation.sh
            root 2302 0.0 0.0 12780 1016 pts/0 S+ 13:55 0:00 grep wetterstation.sh

            Jepp, Skript läuft doppelt. Daher bekommst du gelegentlich Werte, Direkttests funktionieren deswegen auch nicht (der Port ist durch die 1. Instanz bereits belegt)
            Die "13:53 Uhr" dürfte der Autostart vom Reboot sein, aber wo die "13:55 Uhr" herkommt? Oder hattest du da zwischenzeitlich das Skript manuell gestartet? Oder hast du es ev. doppelt in der crontab stehen?
            Das erklärt dann natürlich auch warum der "Kommunikationsfehler" so schnell kommt. Da werkelt die eine Instanz noch, wird von der 2. blockiert und meckert dann natürlich zu Recht 😉

            und wenn dann sich noch mit

            simple-api.0	2020-03-14 13:57:17.510	info	(3520) terminating http server on port 8087
            

            der Simple-API verabschiedet geht sowieso auch im ioB nüscht mehr.

            crunchip Glasfaser 2 Replies Last reply Reply Quote 0
            • crunchip
              crunchip Forum Testing Most Active @SBorg last edited by crunchip

              @SBorg wie kann bitte das script doppelt laufen?
              es war lediglich ein Neustart der VM,(kein manuelles starten des scripts)
              anschliessend habe ich ps -aux | grep wetterstation.sh aufgerufen,
              mit dem Ergebnis von oben.

              ein crontab ist nur einmal eingetragen

              @reboot /home/iobroker/wetterstation.sh &
              2 0 * * * pkill -9 wetterstation.* && /home/iobroker/wetterstation.sh &
              

              @SBorg sagte in [Linux Shell-Skript] WLAN-Wetterstation:

              aber wo die "13:55 Uhr" herkommt?

              die Uhrzeit ändert sich, wenn ich den Befehl erneut ausführe, also immer die aktuelle Uhrzeit beim Befehlsaufruf

              Neuschwansteini 2 Replies Last reply Reply Quote 0
              • Neuschwansteini
                Neuschwansteini @crunchip last edited by

                @crunchip bei welchem User hast du den Cron eingetragen? Jeder user hat seinen eigenen Cron.. nicht vergessen.. da hab ich mir auch schon ein paar Eigentore geschossen, weil ein Cron beim falschen user drin war...

                crunchip 2 Replies Last reply Reply Quote 0
                • Neuschwansteini
                  Neuschwansteini @crunchip last edited by

                  @crunchip also zum nachvollziehen, ein "sudo crontab -e " ist eine andere also einfach nur crontab -e 🙂

                  crunchip 1 Reply Last reply Reply Quote 0
                  • crunchip
                    crunchip Forum Testing Most Active @Neuschwansteini last edited by

                    @ilovegym ich bin mit root drauf

                    1 Reply Last reply Reply Quote 0
                    • crunchip
                      crunchip Forum Testing Most Active @Neuschwansteini last edited by

                      @ilovegym aber danke für den Hinweis, hab mal mit sudo eingegeben
                      ist ein anderes temp/crontab.xxxxx
                      also bewusst hatte ich kein sudo eingegeben, ist dann wohl scheinbar zu Anfangszeiten durch copy and past passiert, das nochmal ein zweiter crontab gesetzt wurde.

                      1 Reply Last reply Reply Quote 1
                      • Glasfaser
                        Glasfaser @SBorg last edited by

                        @SBorg

                        Ist ja richtig was los hier 🙂

                        Die Version V1.0.0 funktioniert sehr gut ... Danke ....

                        SBorg 1 Reply Last reply Reply Quote 1
                        • Nashra
                          Nashra Most Active Forum Testing last edited by

                          Donnerwetter bei mir lief wetterstation.sh auch zweimal, obwohl es nur in einer cron drin war/ist.
                          Aber ich habe ein größeres Problem bei Regen_Monat und Regen_Woche.
                          Ich kann einstellen in der History/Influxdb was ich will, es werden keine Daten geschrieben, alle anderen Daten sind vorhanden. Weiß einfach nicht mehr weiter 😞

                          History:

                          67.1 	false 		2020-03-14 16:30:39.121 	
                          67.1 	false 		2020-03-14 16:30:12.899 	
                          67.1 	false 		2020-03-14 16:29:46.670
                          

                          Influxdb:

                          null 	false 	influxdb.0 	2020-03-14 17:10:17.628 	
                          null 	false 	influxdb.0 	2020-03-14 17:10:36.632 	
                          null 	false 	influxdb.0 	2020-03-14 17:10:36.644 	
                          
                          
                          Glasfaser 1 Reply Last reply Reply Quote 0
                          • Glasfaser
                            Glasfaser @Nashra last edited by Glasfaser

                            @Nashra
                            Wird denn der Datenpunkt aktualisiert !?

                            Zeige mal die Debug Ausgabe in Putty was dann kommt !

                            ./wetterstation.sh --debug
                            
                            Nashra 1 Reply Last reply Reply Quote 0
                            • Nashra
                              Nashra Most Active Forum Testing @Glasfaser last edited by

                              @Glasfaser sagte in [Linux Shell-Skript] WLAN-Wetterstation:

                              @Nashra
                              Wird denn der Datenpunkt aktualisiert !?

                              Zeige mal die Debug Ausgabe in Putty was dann kommt !

                              ./wetterstation.sh --debug
                              

                              ws.PNG

                              Glasfaser 1 Reply Last reply Reply Quote 0
                              • Glasfaser
                                Glasfaser @Nashra last edited by Glasfaser

                                @Nashra

                                Laut Gesamtansicht sind die Werte da .
                                Da fehlt aber der Abschnitt mit den Datenpunkten ,da kannst du es auch erkennen das sie gesendet werden bzw. welcher Wert gesendet wird ...

                                1.JPG

                                Nashra 1 Reply Last reply Reply Quote 0
                                • Nashra
                                  Nashra Most Active Forum Testing @Glasfaser last edited by

                                  @Glasfaser sagte in [Linux Shell-Skript] WLAN-Wetterstation:

                                  @Nashra

                                  Laut Gesamtansicht sind die Werte da .
                                  Da fehlt aber der Abschnitt mit den Datenpunkten ,da kannst du es auch erkennen das sie gesendet werden bzw. welcher Wert gesendet wird ...

                                  1.JPG

                                  Werte kommen alle rein und stehen auch im io in den DP. Im History.0 sind sie ja auch drin,
                                  nur eben die Werte von Regen_Monat und Regen_Woche stehen nicht in Influxdb.0 drin.
                                  Alle anderen Werte/Daten sind in Influxdb vorhanden.

                                  Glasfaser 1 Reply Last reply Reply Quote 0
                                  • crunchip
                                    crunchip Forum Testing Most Active last edited by

                                    @SBorg kann es möglich sein, das mit der neuen version wieder das Problem besteht, was ich ganz am Anfang hatte, wegen Proxmox VM, falls du dich erinnern kannst (im Thread ganz am Anfang).
                                    da musst ich ja das -p einfügen in dieser Zeile

                                    DATA=$(timeout ${WARTE} nc -lv -p ${WS_PORT}|sed '3 p')
                                    

                                    in v1.0 sieht die Zeile so aus

                                    DATA=$(timeout ${WARTE} nc -lvw 1 -p ${WS_PORT}|sed -n '1 p')
                                    

                                    da scheinbar bei mir ja vorhin irgendwas doppelt lief, hab ichs nochmal neu gemacht.
                                    Jedoch bekomm ich mit v1.0 keine Werte rein


                                    root@IoBroker:/home/iobroker# ./wetterstation.sh --debug
                                    listening on [any] 55555 ...
                                    no connection : Connection timed out

                                    Messwerteblock:

                                    Temperatur Innen : °C
                                    Temperatur Aussen : °C
                                    Taupunkt : °C
                                    Chill-Faktor : °C
                                    Luftfeuchte Innen : %
                                    Luftfeuchte Aussen : %
                                    Windgeschwindkeit : km/h
                                    max. Windgeschwindkeit : km/h
                                    Windrichtung : °
                                    Windrichtung :
                                    Luftdruck absolut : hPa
                                    Luftdruck relativ : hPa
                                    Regenrate : mm/h
                                    Regen Tag : mm
                                    Regen Woche : mm
                                    Regen Monat : mm
                                    Regen Jahr : mm
                                    Sonnenstrahlung : W/m²
                                    UV-Index :
                                    Zeitstempel :

                                    Datenstring für ioBroker:

                                    DATA von Wetterstation:

                                    Debug VAR:
                                    Installationsverzeichnis: /home/iobroker
                                    IPP: 10.1.1.10:8087 WS_PORT: 55555 WS_POLL: 30 PRE_DP: javascript.0.Wetterstation
                                    Script-Version: V1.0.0 Config-Version: V1.0.0 Sub-Version: V1.0.0


                                    bin zurück auf die 0.1.4 und läuft wieder

                                    Messwerteblock: 72.5 45.0 36.1 45.0 39 71 0.9 1.1 58 29.238 29.968 0.000 0.000 0.681 1.449 0 0.00 0 2020-03-14 %2017:25:31

                                    Temperatur Innen : 22.50 °C
                                    Temperatur Aussen : 7.22 °C
                                    Taupunkt : 2.27 °C
                                    Chill-Faktor : 7.22 °C
                                    Luftfeuchte Innen : 39 %
                                    Luftfeuchte Aussen : 71 %
                                    Windgeschwindkeit : 1.44 km/h
                                    max. Windgeschwindkeit : 1.77 km/h
                                    Windrichtung : 58 °
                                    Luftdruck absolut : 990.11 hPa
                                    Luftdruck relativ : 1014.83 hPa
                                    Regen aktuell : 0 mm
                                    Regen Tag : 0 mm
                                    Regen Woche : 17.2 mm
                                    Regen Monat : 36.8 mm
                                    Regen Jahr : 0 mm
                                    Sonnenstrahlung : 0.00 W/m²
                                    UV-Index : 0
                                    Zeitstempel : 14.03.2020 18:25:31

                                    Datenstring für ioBroker:
                                    javascript.0.Wetterstation.Innentemperatur=22.50&javascript.0.Wetterstation.Aussentemperatur=7.22&javascript.0 .Wetterstation.Taupunkt=2.27&javascript.0.Wetterstation.Chillfaktor=7.22&javascript.0.Wetterstation.Innenfeuch tigkeit=39&javascript.0.Wetterstation.Aussenfeuchtigkeit=71&javascript.0.Wetterstation.Wind=1.44&javascript.0. Wetterstation.Wind_max=1.77&javascript.0.Wetterstation.Windrichtung=58&javascript.0.Wetterstation.Druck_absolu t=990.11&javascript.0.Wetterstation.Druck_relativ=1014.83&javascript.0.Wetterstation.Regen_aktuell=0&javascrip t.0.Wetterstation.Regen_Tag=0&javascript.0.Wetterstation.Regen_Woche=17.2&javascript.0.Wetterstation.Regen_Mon at=36.8&javascript.0.Wetterstation.Regen_Jahr=0&javascript.0.Wetterstation.Sonnenstrahlung=0.00&javascript.0.W etterstation.UV_Index=0&javascript.0.Wetterstation.Zeitstempel=14.03.2020 18:25:31

                                    DATA von Wetterstation:
                                    GET /weatherstation/updateweatherstation.php?ID=&PASSWORD=&indoortempf=72.5&tempf=45.0&dewptf=36.1&w indchillf=45.0&indoorhumidity=39&humidity=71&windspeedmph=0.9&windgustmph=1.1&winddir=58&absbaromin=29.238&bar omin=29.968&rainin=0.000&dailyrainin=0.000&weeklyrainin=0.681&monthlyrainin=1.449&yearlyrainin=0&solarradiatio n=0.00&UV=0&dateutc=2020-03-14%2017:25:31&softwaretype=EasyWeatherV1.4.7&action=updateraw&realtime=1&rtfreq=5 Connection: Close

                                    Debug VAR:
                                    Installationsverzeichnis: /home/iobroker
                                    IPP: 10.1.1.10:8087 WS_PORT: 55555 WS_POLL: 30 PRE_DP: javascript.0.Wetterstation
                                    Script-Version: V0.1.4 Config-Version: V0.1.4

                                    SBorg 1 Reply Last reply Reply Quote 0
                                    • Glasfaser
                                      Glasfaser @Nashra last edited by Glasfaser

                                      @Nashra
                                      Zeige mal die Einstellungen von Influx ( Datenpunkt )

                                      Nashra 1 Reply Last reply Reply Quote 0
                                      • Nashra
                                        Nashra Most Active Forum Testing @Glasfaser last edited by

                                        @Glasfaser sagte in [Linux Shell-Skript] WLAN-Wetterstation:

                                        @Nashra
                                        Zeige mal die Einstellungen von Influx ( Datenpunkt )

                                        influxdb.PNG

                                        Glasfaser 1 Reply Last reply Reply Quote 0
                                        • Glasfaser
                                          Glasfaser @Nashra last edited by

                                          @Nashra

                                          Stelle mal so ein ....

                                          1111.JPG

                                          Nashra 1 Reply Last reply Reply Quote 0
                                          • Nashra
                                            Nashra Most Active Forum Testing @Glasfaser last edited by Nashra

                                            @Glasfaser habs geändert. Ergebnis nach Neustart des Adapters

                                            influxdb2.PNG

                                            Sorry, aber ich kapiere das nicht das keine Daten geschrieben werden 😵

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

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            579
                                            Online

                                            31.6k
                                            Users

                                            79.4k
                                            Topics

                                            1.3m
                                            Posts

                                            linux shell-script wetterstation wlan-wetterstation
                                            141
                                            5399
                                            2876950
                                            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