59_Buienradar

Begonnen von Christoph Morrison, 23 Juli 2019, 21:37:15

Vorheriges Thema - Nächstes Thema

Christoph Morrison

Hab ich damals total überlesen.

Mich wundert halt, welches Subsystem diese Konvertierung durchführt. Eigentlich gehört hinter &reg dann auch noch ein Semikolon um daraus ein named entity zu machen. BR macht sowas zumindest mal nicht.

Zeig mal bitte das latitude und das longitude-Reading aus deinem Global und zwar als Raw. Ist da irgendwo ein Semikolon reingekommen?

Christoph Morrison

Und mal euere Buienradar-Raw-Def und ein list.

Gisbert

Hallo Christoph,

hier sind meine raw-Definitionen:
defmod Buienradar Budefmod Buienradar Buienradar
attr Buienradarienradar
attr Buienradar comment Das Reading maxrain ist der Maximalwert der Regenmenge aus folgenden Devices:\
- Buienradar\
- Leverkusen.DarkSky - wegen fehlerhaften Daten (Werte ~ 0.01 mm/qm) rausgenommen\
- verschiedene Netatmo-Geräte in der Umgebung\
- Am Mühlenweg 1 und Dünenweg 33 wurden rausgenommen wegen Fehlmessungen (Rasen sprengen?)\
Das Reading maxrain wird über eine Funktion max_rain() erzeugt, die in 99_myUtils_Dewpoint.pm steht
attr Buienradar group Wetter
attr Buienradar icon weather_rain_meter
attr Buienradar interval 300
attr Buienradar region nl
attr Buienradar room Weather
attr Buienradar stateFormat Regen: <span style='color:{(ReadingsVal('$name','rainDataNow','') > 0 ? "red":"#2e5e87")}'>[$name:rainDataNow] mm/h</span><br/>\
max. Regen: <span style='color:{(ReadingsVal('$name','maxrain','') > 0 ? "red":"#2e5e87")}'>[$name:maxrain] mm/h</span>
attr Buienradar userReadings rainDataNow {round(ReadingsNum($name,'rainNow',''),1)}, \
Zeitstempel {substr(ReadingsTimestamp($name,'rainDataNow',''),0,16)}, \
rain {ReadingsNum($name,'rainDataNow','')}, \
maxrain {round(max_rain(),1)}, \
active {(ReadingsAge($name,'state',0) > 300 ? "not ok":"ok")}

setstate Buienradar Regen: <span style='color:red'>0.1 mm/h</span><br/>\
max. Regen: <span style='color:red'>0.1 mm/h</span>
setstate Buienradar 2021-09-15 07:05:00 Zeitstempel 2021-09-15 07:05
setstate Buienradar 2021-09-15 07:05:00 active ok
setstate Buienradar 2019-08-05 22:09:07 chartData ['00:00', 0.000], ['22:00', 0.000], ['22:05', 0.000], ['22:10', 0.000], ['22:15', 0.000], ['22:20', 0.000], ['22:25', 0.000], ['22:30', 0.000], ['22:35', 0.000], ['22:40', 0.000], ['22:45', 0.000], ['22:50', 0.000], ['22:55', 0.000], ['23:00', 0.000], ['23:05', 0.000], ['23:10', 0.000], ['23:15', 0.000], ['23:20', 0.000], ['23:25', 0.000], ['23:30', 0.000], ['23:35', 0.000], ['23:40', 0.000], ['23:45', 0.000], ['23:50', 0.000], ['23:55', 0.000]
setstate Buienradar 2021-09-15 07:05:00 maxrain 0.1


attr global userattr assistantName:textField babbleDevice cmdIcon devStateIcon devStateIcon:textField-long devStateStyle gassistantName:textField genericDeviceType:aircondition,coffeemaker,ac_unit,aircooler,airfreshener,airpurifier,audio_video_receiver,awning,bathtub,bed,blender,blinds,boiler,camera,carbon_monoxide_detector,charger,closet,coffee_maker,cooktop,curtain,dehumidifier,dehydrator,dishwasher,door,drawer,dryer,fan,faucet,fireplace,freezer,fryer,garage,gate,grill,heater,hood,humidifier,kettle,light,lock,remotecontrol,mop,mower,microwave,multicooker,network,outlet,oven,pergola,petfeeder,pressurecooker,radiator,refrigerator,router,scene,sensor,securitysystem,settop,shutter,shower,smoke_detector,sousvide,speaker,streaming_box,streaming_stick,streaming_soundbar,soundbar,sprinkler,standmixer,switch,tv,thermostat,vacuum,valve,washer,waterheater,waterpurifier,watersoftener,window,yogurtmaker homebridgeMapping:textField-long icon readingsWatcher realRoom:textField sortby stateFormat valueStyle webCmd webCmdLabel:textField-long widgetOverride
attr global autoload_undefined_devices 1
attr global autosave 0
attr global backup_before_update 1
attr global backupdir /media/USBBackup/FhemBackup
attr global commandref modular
attr global comment SecurityCheck:\
telnetPort is not password protected\
Protect this FHEM installation by configuring the allowed device allowedWEB\
You can disable this message with attr global motd none\
\
blocking: https://forum.fhem.de/index.php/topic,99492.msg929439.html#msg929439\
DNS-Lookup ist blockierend. \
Um das zu vermeiden kann man "attr global dnsServer 8.8.8.8" (oder Vergleichbares) setzen.\
Laut https://forum.fhem.de/index.php/topic,94957.msg953012.html#msg953012 soll ein DNS-Server im eigenen Netz eingetragen werden, um disconnects beim HMLAN zu vermeiden.\
Mit eingeschaltetem stacktrace erhält man im log file detailierte Information, die im Falle von PERL WARNING oder ERROR helfen.\
\
narchive: hier ist die Anzahl der täglichen log-Dateien gemeint, die beibehalten werden.\
\
restoreDirs: Anzahl der Sicherungen bei einem Fhem save und update.
attr global dnsServer 127.0.0.1
attr global exclude_from_update 72_FRITZBOX.pm 98_DLNARenderer.pm 00_HMLAN.pm 50_Signalbot.pm
attr global featurelevel 6.0
attr global holiday2we nw
attr global latitude 51.02943
attr global logfile ./log/fhem-%Y-%m-%d.log
attr global longitude 7.05584
attr global modpath ./
attr global motd SecurityCheck:\
  httpWEB is not password protected\
  telnetPort is not password protected\
\
Protect this FHEM installation by configuring the allowed device allowedWEB\
You can disable this message with attr global motd none
attr global mseclog 1
attr global nrarchive 7
attr global restoreDirs 18
attr global sendStatistics onUpdate
attr global showInternalValues 0
attr global sslVersion TLSv12:!SSLv3
attr global stacktrace 0
attr global statefile ./log/fhem.save
attr global updateInBackground 1
attr global verbose 3

setstate global no definition


Viele​ Grüße​ Gisbert​
Aktuelles FHEM | PROXMOX | Fujitsu Futro S740 | Debian 12 | UniFi | Homematic, VCCU, HMUART | ESP8266 | ATtiny85 | Wasser-, Stromzähler | Wlan-Kamera | SIGNALduino, Flamingo Rauchmelder FA21/22RF | RHASSPY

Christoph Morrison

Hatte ich ja schon auf GH geschrieben: Deine Def, auch die von global, sieht absolut unverdächtig aus. Irgendein Subsystem von FHEM muss diese URL modifizieren. Aber BR macht das nicht.

Ich kann's übrigens auch auf meiner Testinstanz nicht nachvollziehen.

Trotzdem habe ich mal in v3.0.10 die Position des region-Parameters im Query-String verschoben um das & davor loszubekommen.

Gisbert

Hallo Christoph,

danke für die Info; ich sag's ja, wenn Software im Spiel ist, kann alles passieren ;D
Wo kann ich denn den neuesten Release/Beta runterladen? Auf Github scheint die 3.0.10 noch nicht bereitzustehen.

Viele​ Grüße​ Gisbert​
Aktuelles FHEM | PROXMOX | Fujitsu Futro S740 | Debian 12 | UniFi | Homematic, VCCU, HMUART | ESP8266 | ATtiny85 | Wasser-, Stromzähler | Wlan-Kamera | SIGNALduino, Flamingo Rauchmelder FA21/22RF | RHASSPY


Gisbert

Hallo Christoph,

mit Updates von außerhalb von Fhem frage ich lieber nach, bevor ich größeres Unheil anrichte.

Ich würde es so machen, d.h. in der Kommandozeile von Fhem eingeben:
update https://raw.githubusercontent.com/fhem/mod-Buienradar/development/3.0/controls_Buienradar.txt

Richtig?

Viele​ Grüße​ Gisbert​
Aktuelles FHEM | PROXMOX | Fujitsu Futro S740 | Debian 12 | UniFi | Homematic, VCCU, HMUART | ESP8266 | ATtiny85 | Wasser-, Stromzähler | Wlan-Kamera | SIGNALduino, Flamingo Rauchmelder FA21/22RF | RHASSPY

Gisbert

Hallo Christoph,

wenn ich update all https://raw.githubusercontent.com/fhem/mod-Buienradar/development/3.0/controls_Buienradar.txt in der Kommandozeile von Fhem eingebe, ändert sich in der Versionsnummer bei Buienradar nichts, es bleibt bei der Version 3.0.9.

Viele​ Grüße​ Gisbert​
Aktuelles FHEM | PROXMOX | Fujitsu Futro S740 | Debian 12 | UniFi | Homematic, VCCU, HMUART | ESP8266 | ATtiny85 | Wasser-, Stromzähler | Wlan-Kamera | SIGNALduino, Flamingo Rauchmelder FA21/22RF | RHASSPY

Christoph Morrison

Steht eigentlich immer in den RL wie man es macht, in deinem Fall:

Remove any old source from FHEM by update delete, i.e. update delete https://raw.githubusercontent.com/fhem/mod-Buienradar/release/2.3/controls_Buienradar.txt.

Da musst du halt deinen Link reinkopieren.

You can find the current source by issuing update list

Add new source by update add https://raw.githubusercontent.com/fhem/mod-Buienradar/development/3.0/controls_Buienradar.txt

Check with update check

update Buienradar

Restart FHEM

Gisbert

Guten Morgen Christoph,

danke dafür, dass du den Update-Prozess explizit aufgeschrieben hast. Den hatte ich bei Github in der Zwischenzeit auch gefunden und vermeintlich auch so ausgeführt.
Allerdings habe ich mir selbst Knüppel zwischen die Beine geworfen, indem ich .../release/3.0/... statt .../development/3.0/... benutzt habe - so konnte es nicht funktionieren.

Allem Anschein nach funktioniert das Modul jetzt wieder. Die URL sieht aber mit dem @region bei mir so aus:
https://cdn-secure.buienalarm.nl/api/3.4/forecast.php?lat=51.02943&lon=7.05584&region=nl&unit=mm/u
Ich dachte, dass du region nach vorne gezogen hättest.

Viele​ Grüße​ Gisbert​
Aktuelles FHEM | PROXMOX | Fujitsu Futro S740 | Debian 12 | UniFi | Homematic, VCCU, HMUART | ESP8266 | ATtiny85 | Wasser-, Stromzähler | Wlan-Kamera | SIGNALduino, Flamingo Rauchmelder FA21/22RF | RHASSPY

Christoph Morrison

Jetzt sollte ein normales update reichen.

Gisbert

#281
Hallo Christoph,

EDIT: ich habe gesehen, dass du heute vormittag ein weiteres Update eingestellt hast. Dieses Update habe ich erst jetzt gesehen, so dass die folgenden Zeilen gegenstandslos geworden sind. Sorry für die Verwirrung.

leider kommt mit der Version 3.0.10 immer noch der gleiche Fehler (@ion, also @ion statt region).
Die Position dieses Teil steht unverändert nach lat/long:

https://cdn-secure.buienalarm.nl/api/3.4/forecast.php?lat=51.02943&lon=7.05584®ion=nl&unit=mm/u

Kannst du nochmals reinschauen?
2021.09.19 18:14:17.156 1: DEBUG>[Buienradar]
HTTP Response code is: 502
2021.09.19 18:14:17.162 1: DEBUG>[Buienradar]
$VAR1 = {
          'hu_portSfx' => '',
          'hu_port' => 443,
          'method' => 'GET',
          'code' => 502,
          'hash' => {
                      'helper' => {
                                    'bm' => {
                                              'CODE(0x556171dcf508)' => {
                                                                          'max' => '0.00237107276916504',
                                                                          'cnt' => 208,
                                                                          'tot' => '0.014554500579834',
                                                                          'dmx' => -1000,
                                                                          'mAr' => [
                                                                                     $VAR1->{'hash'},
                                                                                     'Buienradar',
                                                                                     'refresh'
                                                                                   ],
                                                                          'dtot' => 0,
                                                                          'mTS' => '19.09. 07:09:45',
                                                                          'dtotcnt' => 0
                                                                        },
                                              'CODE(0x556171e31960)' => {
                                                                          'dtot' => 0,
                                                                          'dtotcnt' => 0,
                                                                          'mTS' => '19.09. 07:04:48',
                                                                          'cnt' => 3,
                                                                          'max' => '0.00427412986755371',
                                                                          'mAr' => [
                                                                                     'set',
                                                                                     'Buienradar',
                                                                                     'disabled',
                                                                                     'off'
                                                                                   ],
                                                                          'dmx' => -1000,
                                                                          'tot' => '0.00844788551330566'
                                                                        },
                                              'CODE(0x556171ea0bc8)' => {
                                                                          'mTS' => '19.09. 07:06:14',
                                                                          'dtotcnt' => 0,
                                                                          'dtot' => 0,
                                                                          'mAr' => [
                                                                                     $VAR1->{'hash'},
                                                                                     'Buienradar',
                                                                                     '?'
                                                                                   ],
                                                                          'tot' => '0.000838279724121094',
                                                                          'dmx' => -1000,
                                                                          'cnt' => 12,
                                                                          'max' => '0.000123023986816406'
                                                                        }
                                            }
                                  },
                      'NAME' => 'Buienradar',
                      'URL' => 'https://cdn-secure.buienalarm.nl/api/3.4/forecast.php?lat=51.02943&lon=7.05584®ion=nl&unit=mm/u',
                      '.SERIALIZED' => ' 12345678�gGastart
0
precipitation iGaend
1632069600
0
precipitationpGastart@qGaend
1632071700�lGaenddkGastart
0
precipitation
1632070500�fGaend
0
precipitation�eGastart
16320690008jGastart
0
precipitationdkGaend
1632070200\\dGastart
0
precipitation�eGaend
1632068700
0
precipitationHxGastarttyGaend
1632073800�`Gaend
0
precipitation�_Gastart
1632067500�sGaend
0
precipitationlrGastart
1632072300�^Gastart
0
precipitation�_Gaend
1632067200
0
precipitation�tGastart�uGaend
1632072900
0
precipitation�nGastartpGaend
1632071400�sGastart
0
precipitation�tGaend
1632072600�{Gaend�zGastart
0
precipitation
1632074400HxGaend
0
precipitationwGastart
1632073500lrGaend
0
precipitation@qGastart
1632072000
0
precipitation�`GastartbGaend
1632067800
0
precipitation�uGastartwGaend
1632073200\\dGaend
0
precipitation0cGastart
1632068400�mGaend
0
precipitation�lGastart
1632070800
0
precipitation�fGastart�gGaend
16320693000cGaendbGastart
0
precipitation
1632068100�mGastart
0
precipitation�nGaend
1632071100
0
precipitation iGastart8jGaend
1632069900tyGastart
0
precipitation�zGaend
1632074100',
                      'READINGS' => {
                                      'rainNow' => {
                                                     'TIME' => '2021-09-19 18:09:16',
                                                     'VAL' => 'unknown'
                                                   },
                                      'state' => {
                                                   'TIME' => '2021-09-19 18:09:16',
                                                   'VAL' => 'unknown'
                                                 },
                                      'rainAmount' => {
                                                        'TIME' => '2021-09-19 18:09:16',
                                                        'VAL' => '0.000'
                                                      },
                                      'maxrain' => {
                                                     'TIME' => '2021-09-19 18:09:16',
                                                     'VAL' => '0.0'
                                                   },
                                      'rainDurationPercent' => {
                                                                 'VAL' => 0,
                                                                 'TIME' => '2021-09-19 18:09:16'
                                                               },
                                      'rainDuration' => {
                                                          'TIME' => '2021-09-19 18:09:16',
                                                          'VAL' => 0
                                                        },
                                      'rainEnd' => {
                                                     'VAL' => 'unknown',
                                                     'TIME' => '2021-09-19 18:09:16'
                                                   },
                                      'rainDurationIntervals' => {
                                                                   'TIME' => '2021-09-19 18:09:16',
                                                                   'VAL' => 0
                                                                 },
                                      'rainData' => {
                                                      'VAL' => '0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0',
                                                      'TIME' => '2021-09-19 18:09:16'
                                                    },
                                      'rain' => {
                                                  'VAL' => '0.0',
                                                  'TIME' => '2021-09-19 18:09:16'
                                                },
                                      'rainBegin' => {
                                                       'VAL' => 'unknown',
                                                       'TIME' => '2021-09-19 18:09:16'
                                                     },
                                      'rainMax' => {
                                                     'VAL' => '0.000',
                                                     'TIME' => '2021-09-19 18:09:16'
                                                   },
                                      'rainDataNow' => {
                                                         'VAL' => '0.0',
                                                         'TIME' => '2021-09-19 18:09:16'
                                                       },
                                      'rainDataStart' => {
                                                           'TIME' => '2021-09-19 18:09:16',
                                                           'VAL' => '18:00'
                                                         },
                                      'rainDataEnd' => {
                                                         'VAL' => '20:05',
                                                         'TIME' => '2021-09-19 18:09:16'
                                                       },
                                      'rainLaMetric' => {
                                                          'TIME' => '2021-09-19 18:09:16',
                                                          'VAL' => '0,0,0,0,0,0,0,0,0,0,0,0'
                                                        },
                                      'rainDurationTime' => {
                                                              'VAL' => '00:00',
                                                              'TIME' => '2021-09-19 18:09:16'
                                                            },
                                      'rainTotal' => {
                                                       'TIME' => '2021-09-19 18:09:16',
                                                       'VAL' => '0.000'
                                                     },
                                      'chartData' => {
                                                       'VAL' => '[\'00:00\', 0.000], [\'22:00\', 0.000], [\'22:05\', 0.000], [\'22:10\', 0.000], [\'22:15\', 0.000], [\'22:20\', 0.000], [\'22:25\', 0.000], [\'22:30\', 0.000], [\'22:35\', 0.000], [\'22:40\', 0.000], [\'22:45\', 0.000], [\'22:50\', 0.000], [\'22:55\', 0.000], [\'23:00\', 0.000], [\'23:05\', 0.000], [\'23:10\', 0.000], [\'23:15\', 0.000], [\'23:20\', 0.000], [\'23:25\', 0.000], [\'23:30\', 0.000], [\'23:35\', 0.000], [\'23:40\', 0.000], [\'23:45\', 0.000], [\'23:50\', 0.000], [\'23:55\', 0.000]',
                                                       'TIME' => '2019-08-05 22:09:07'
                                                     },
                                      'Zeitstempel' => {
                                                         'TIME' => '2021-09-19 18:09:16',
                                                         'VAL' => '2021-09-19 18:09'
                                                       },
                                      'active' => {
                                                    'VAL' => 'ok',
                                                    'TIME' => '2021-09-19 18:09:16'
                                                  }
                                    },
                      'FUUID' => '5c430dc6-f33f-b139-0391-311dd930d4dd016b',
                      'LONGITUDE' => '7.05584',
                      'LATITUDE' => '51.02943',
                      '.RainStart' => undef,
                      'FVERSION' => 'Buienradar.pm:?/2021-09-19',
                      'NR' => 532,
                      '.attrminint' => [],
                      'DEF' => '',
                      'STATE' => 'Regen: <span style=\'color:#2e5e87\'>0.0 mm/h</span><br/>
max. Regen: <span style=\'color:#2e5e87\'>0.0 mm/h</span>',
                      'REGION' => 'nl',
                      'NEXTUPDATE' => '2021-09-19 18:19:16',
                      'VERSION' => '3.0.10',
                      '.FhemMetaInternals' => 1,
                      '.userReadings' => [
                                           {
                                             't' => '1632067756.30531',
                                             'reading' => 'rainDataNow',
                                             'value' => '0.0',
                                             'modifier' => 'none',
                                             'perlCode' => '{round(ReadingsNum($name,\'rainNow\',\'\'),1)}',
                                             'TIME' => '2021-09-19 18:09:16',
                                             'trigger' => undef
                                           },
                                           {
                                             'trigger' => undef,
                                             'perlCode' => '{substr(ReadingsTimestamp($name,\'rainDataNow\',\'\'),0,16)}',
                                             'modifier' => 'none',
                                             'TIME' => '2021-09-19 18:09:16',
                                             'reading' => 'Zeitstempel',
                                             'value' => '2021-09-19 18:09',
                                             't' => '1632067756.30531'
                                           },
                                           {
                                             'trigger' => undef,
                                             'perlCode' => '{ReadingsNum($name,\'rainDataNow\',\'\')}',
                                             'modifier' => 'none',
                                             'TIME' => '2021-09-19 18:09:16',
                                             'reading' => 'rain',
                                             'value' => '0.0',
                                             't' => '1632067756.30531'
                                           },
                                           {
                                             'value' => '0.0',
                                             'reading' => 'maxrain',
                                             't' => '1632067756.30531',
                                             'trigger' => undef,
                                             'TIME' => '2021-09-19 18:09:16',
                                             'modifier' => 'none',
                                             'perlCode' => '{round(max_rain(),1)}'
                                           },
                                           {
                                             'trigger' => undef,
                                             'TIME' => '2021-09-19 18:09:16',
                                             'perlCode' => '{(ReadingsAge($name,\'state\',0) > 300 ? "not ok":"ok")}',
                                             'modifier' => 'none',
                                             'value' => 'ok',
                                             'reading' => 'active',
                                             't' => '1632067756.30531'
                                           }
                                         ],
                      'CFGFN' => './FHEM/WetterdatenSensorenInternet.cfg',
                      'TYPE' => 'Buienradar',
                      'INTERVAL' => 300,
                      '.attraggr' => []
                    },
          'displayurl' => 'https://cdn-secure.buienalarm.nl/api/3.4/forecast.php?lat=51.02943&lon=7.05584®ion=nl&unit=mm/u',
          'hu_filecount' => 1,
          'host' => 'cdn-secure.buienalarm.nl',
          'addr' => 'https://cdn-secure.buienalarm.nl:443',
          'protocol' => 'https',
          'conn' => undef,
          'httpheader' => 'HTTP/1.1 502 Bad Gateway
Date: Sun, 19 Sep 2021 16:14:17 GMT
Content-Type: text/html
Connection: close
Vary: Accept-Encoding
CF-Cache-Status: DYNAMIC
Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
Report-To: {"endpoints":[{"url":"https:\\/\\/a.nel.cloudflare.com\\/report\\/v3?s=f%2FD41d2dKOzBTnmXCBziTdO%2B0cnssQIXjosjsHjFtJH%2FtZM8gYwchdsF5Tg9Tro3vq0riwHHNuKMwih%2FRXtKWaNhgaqkEPUBB8MCE5BghkoqRce%2Fs76QKxs8ncPlwy0J2pYP6ntxNtj6IA%3D%3D"}],"group":"cf-nel","max_age":604800}
NEL: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
Server: cloudflare
CF-RAY: 69141b2c8b185be5-FRA',
          'NAME' => '',
          'auth' => 0,
          'url' => 'https://cdn-secure.buienalarm.nl/api/3.4/forecast.php?lat=51.02943&lon=7.05584®ion=nl&unit=mm/u',
          'callback' => sub { "DUMMY" },
          'timeout' => 10,
          'redirects' => 0,
          'loglevel' => 4,
          'compress' => 1,
          'hu_blocking' => 0,
          'sslargs' => {},
          'path' => '/api/3.4/forecast.php?lat=51.02943&lon=7.05584®ion=nl&unit=mm/u'
        };


Viele Grüße Gisbert
Aktuelles FHEM | PROXMOX | Fujitsu Futro S740 | Debian 12 | UniFi | Homematic, VCCU, HMUART | ESP8266 | ATtiny85 | Wasser-, Stromzähler | Wlan-Kamera | SIGNALduino, Flamingo Rauchmelder FA21/22RF | RHASSPY

Gisbert

#282
Guten Morgen Christoph,

im Prinzip funktioniert das Modul.
Es kommt jedoch vor, dass Buienradar nicht erreichbar ist, dann gibt es den Fehler 502. Daran ist ja nichts zu ändern, die Seite ist halt nicht erreichbar.

In diesem Fall wird ein ellenlanger Text in das log-file geschrieben. Kann man das irgendwie unterbinden?
Hier ein Beispiel von heute Nacht.
Verbose auf null zu setzen hatte ich auch schon probiert, aber ohne Erfolg. Gibt es eine andere Möglichkeit die Länge der log-Einträge drastisch zu kürzen? Eine Zeile würde mir ausreichen.

2021.09.25 00:02:41.171 1: DEBUG>[Buienradar]
HTTP Response code is: 502
2021.09.25 00:02:41.177 1: DEBUG>[Buienradar]
$VAR1 = {
          'hu_blocking' => 0,
          'displayurl' => 'https://cdn-secure.buienalarm.nl/api/3.4/forecast.php?region=nl&lat=51.02943&lon=7.05584&unit=mm/u',
          'path' => '/api/3.4/forecast.php?region=nl&lat=51.02943&lon=7.05584&unit=mm/u',
          'hu_port' => 443,
          'protocol' => 'https',
          'code' => 502,
          'NAME' => '',
          'method' => 'GET',
          'compress' => 1,
          'hu_filecount' => 1,
          'host' => 'cdn-secure.buienalarm.nl',
          'callback' => sub { "DUMMY" },
          'httpheader' => 'HTTP/1.1 502 Bad Gateway
Date: Fri, 24 Sep 2021 22:02:41 GMT
Content-Type: text/html
Connection: close
Vary: Accept-Encoding
CF-Cache-Status: DYNAMIC
Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
Report-To: {"endpoints":[{"url":"https:\\/\\/a.nel.cloudflare.com\\/report\\/v3?s=ZKA9q600W9Jvakns8o5MTPfR6DuGoIeduGtCm3zdO5U3Tq%2FjLIZYRmIkSqn8nKQD%2F2HuYwxzjZ0ESX8r3VJGIKaWKNk%2FalSSmw1YLqYY6OFUPJGmOARC7OVqjUO9dg%2FzLdt5OxdtqofNVg%3D%3D"}],"group":"cf-nel","max_age":604800}
NEL: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
Server: cloudflare
CF-RAY: 693f4c66ee594a56-FRA',
          'hu_portSfx' => '',
          'hash' => {
                      'NR' => 565,
                      'REGION' => 'nl',
                      '.attraggr' => [],
                      'TYPE' => 'Buienradar',
                      'DEF' => '',
                      '.userReadings' => [
                                           {
                                             'TIME' => '2021-09-24 23:57:41',
                                             'modifier' => 'none',
                                             'perlCode' => '{round(ReadingsNum($name,\'rainNow\',\'\'),1)}',
                                             't' => '1632520661.2134',
                                             'trigger' => undef,
                                             'value' => '0.0',
                                             'reading' => 'rainDataNow'
                                           },
                                           {
                                             'TIME' => '2021-09-24 23:57:41',
                                             'perlCode' => '{substr(ReadingsTimestamp($name,\'rainDataNow\',\'\'),0,16)}',
                                             'modifier' => 'none',
                                             't' => '1632520661.2134',
                                             'value' => '2021-09-24 23:57',
                                             'reading' => 'Zeitstempel',
                                             'trigger' => undef
                                           },
                                           {
                                             'value' => '0.0',
                                             'reading' => 'rain',
                                             'trigger' => undef,
                                             't' => '1632520661.2134',
                                             'perlCode' => '{ReadingsNum($name,\'rainDataNow\',\'\')}',
                                             'modifier' => 'none',
                                             'TIME' => '2021-09-24 23:57:41'
                                           },
                                           {
                                             'trigger' => undef,
                                             'value' => '0.0',
                                             'reading' => 'maxrain',
                                             'perlCode' => '{round(max_rain(),1)}',
                                             'modifier' => 'none',
                                             't' => '1632520661.2134',
                                             'TIME' => '2021-09-24 23:57:41'
                                           },
                                           {
                                             'trigger' => undef,
                                             'reading' => 'active',
                                             'value' => 'ok',
                                             'TIME' => '2021-09-24 23:57:41',
                                             't' => '1632520661.2134',
                                             'perlCode' => '{(ReadingsAge($name,\'state\',0) > 300 ? "not ok":"ok")}',
                                             'modifier' => 'none'
                                           }
                                         ],
                      'FVERSION' => 'Buienradar.pm:?/2021-09-24',
                      '.attrminint' => [],
                      'READINGS' => {
                                      'maxrain' => {
                                                     'TIME' => '2021-09-24 23:57:41',
                                                     'VAL' => '0.0'
                                                   },
                                      'rainTotal' => {
                                                       'VAL' => '0.000',
                                                       'TIME' => '2021-09-24 23:57:41'
                                                     },
                                      'rainLaMetric' => {
                                                          'VAL' => '0,0,0,0,0,0,0,0,0,0,0,0',
                                                          'TIME' => '2021-09-24 23:57:41'
                                                        },
                                      'rainAmount' => {
                                                        'TIME' => '2021-09-24 23:57:41',
                                                        'VAL' => '0.000'
                                                      },
                                      'rainDataStart' => {
                                                           'VAL' => '23:50',
                                                           'TIME' => '2021-09-24 23:57:41'
                                                         },
                                      'state' => {
                                                   'TIME' => '2021-09-24 23:57:41',
                                                   'VAL' => 'unknown'
                                                 },
                                      'active' => {
                                                    'TIME' => '2021-09-24 23:57:41',
                                                    'VAL' => 'ok'
                                                  },
                                      'rainDuration' => {
                                                          'VAL' => 0,
                                                          'TIME' => '2021-09-24 23:57:41'
                                                        },
                                      'rainNow' => {
                                                     'VAL' => 'unknown',
                                                     'TIME' => '2021-09-24 23:57:41'
                                                   },
                                      'rainMax' => {
                                                     'TIME' => '2021-09-24 23:57:41',
                                                     'VAL' => '0.000'
                                                   },
                                      'rainDurationIntervals' => {
                                                                   'TIME' => '2021-09-24 23:57:41',
                                                                   'VAL' => 0
                                                                 },
                                      'rainData' => {
                                                      'TIME' => '2021-09-24 23:57:41',
                                                      'VAL' => '0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0'
                                                    },
                                      'rainDataNow' => {
                                                         'TIME' => '2021-09-24 23:57:41',
                                                         'VAL' => '0.0'
                                                       },
                                      'chartData' => {
                                                       'VAL' => '[\'00:00\', 0.000], [\'22:00\', 0.000], [\'22:05\', 0.000], [\'22:10\', 0.000], [\'22:15\', 0.000], [\'22:20\', 0.000], [\'22:25\', 0.000], [\'22:30\', 0.000], [\'22:35\', 0.000], [\'22:40\', 0.000], [\'22:45\', 0.000], [\'22:50\', 0.000], [\'22:55\', 0.000], [\'23:00\', 0.000], [\'23:05\', 0.000], [\'23:10\', 0.000], [\'23:15\', 0.000], [\'23:20\', 0.000], [\'23:25\', 0.000], [\'23:30\', 0.000], [\'23:35\', 0.000], [\'23:40\', 0.000], [\'23:45\', 0.000], [\'23:50\', 0.000], [\'23:55\', 0.000]',
                                                       'TIME' => '2019-08-05 22:09:07'
                                                     },
                                      'rainEnd' => {
                                                     'VAL' => 'unknown',
                                                     'TIME' => '2021-09-24 23:57:41'
                                                   },
                                      'rain' => {
                                                  'VAL' => '0.0',
                                                  'TIME' => '2021-09-24 23:57:41'
                                                },
                                      'rainBegin' => {
                                                       'VAL' => 'unknown',
                                                       'TIME' => '2021-09-24 23:57:41'
                                                     },
                                      'rainDurationPercent' => {
                                                                 'TIME' => '2021-09-24 23:57:41',
                                                                 'VAL' => 0
                                                               },
                                      'rainDataEnd' => {
                                                         'VAL' => '01:55',
                                                         'TIME' => '2021-09-24 23:57:41'
                                                       },
                                      'Zeitstempel' => {
                                                         'VAL' => '2021-09-24 23:57',
                                                         'TIME' => '2021-09-24 23:57:41'
                                                       },
                                      'rainDurationTime' => {
                                                              'VAL' => '00:00',
                                                              'TIME' => '2021-09-24 23:57:41'
                                                            }
                                    },
                      'LATITUDE' => '51.02943',
                      'helper' => {
                                    'bm' => {
                                              'CODE(0x56247a87b4a8)' => {
                                                                          'dtot' => 0,
                                                                          'cnt' => 64,
                                                                          'dtotcnt' => 0,
                                                                          'mTS' => '24.09. 20:31:40',
                                                                          'tot' => '0.00132203102111816',
                                                                          'dmx' => -1000,
                                                                          'max' => '4.41074371337891e-05',
                                                                          'mAr' => [
                                                                                     $VAR1->{'hash'},
                                                                                     'Buienradar',
                                                                                     '?'
                                                                                   ]
                                                                        }
                                            }
                                  },
                      '.FhemMetaInternals' => 1,
                      'LONGITUDE' => '7.05584',
                      'FUUID' => '5c430dc6-f33f-b139-0391-311dd930d4dd016b',
                      '.SERIALIZED' => ' 12345678
0
precipitationpXNaendDWNastart
1632524100TeNaend
0
precipitation(dNastart
1632527400<PNastarthQNaend
0
precipitation
1632522300x_Nastart�`Naend
0
precipitation
1632526200
0
precipitation�aNaend�`Nastart
1632526500�bNaend
0
precipitation�aNastart
1632526800 ]NastartL^Naend
0
precipitation
1632525600ONastart
0
precipitation<PNaend
1632522000�YNastart
0
precipitation�ZNaend
1632524700�LNastart
0
precipitation�MNaend
1632521400x_Naend
0
precipitationL^Nastart
1632525900�ZNastart
0
precipitation�[Naend
1632525000
0
precipitation�LNaend�KNastart
1632521100�RNaend
0
precipitationhQNastart
1632522600�SNaend
0
precipitation�RNastart
1632522900HNastart4INaend
0
precipitation
16325202004INastart`JNaend
0
precipitation
1632520500
0
precipitation�KNaend`JNastart
1632520800ONaend
0
precipitation�MNastart
1632521700
0
precipitation(dNaend�bNastart
1632527100DWNaend
0
precipitationVNastart
1632523800VNaend
0
precipitation�TNastart
1632523500 ]Naend
0
precipitation�[Nastart
1632525300
0
precipitation�YNaendpXNastart
1632524400�TNaend
0
precipitation�SNastart
1632523200',
                      'STATE' => 'Regen: <span style=\'color:#2e5e87\'>0.0 mm/h</span><br/>
max. Regen: <span style=\'color:#2e5e87\'>0.0 mm/h</span>',
                      'VERSION' => '3.1.0-10',
                      'NEXTUPDATE' => '2021-09-25 00:07:40',
                      'CFGFN' => './FHEM/WetterdatenSensorenInternet.cfg',
                      'NAME' => 'Buienradar',
                      'URL' => 'https://cdn-secure.buienalarm.nl/api/3.4/forecast.php?region=nl&lat=51.02943&lon=7.05584&unit=mm/u',
                      '.RainStart' => undef,
                      'INTERVAL' => 300
                    },
          'loglevel' => 4,
          'url' => 'https://cdn-secure.buienalarm.nl/api/3.4/forecast.php?region=nl&lat=51.02943&lon=7.05584&unit=mm/u',
          'sslargs' => {},
          'auth' => 0,
          'redirects' => 0,
          'conn' => undef,
          'addr' => 'https://cdn-secure.buienalarm.nl:443',
          'timeout' => 10
        };


Viele Grüße Gisbert
Aktuelles FHEM | PROXMOX | Fujitsu Futro S740 | Debian 12 | UniFi | Homematic, VCCU, HMUART | ESP8266 | ATtiny85 | Wasser-, Stromzähler | Wlan-Kamera | SIGNALduino, Flamingo Rauchmelder FA21/22RF | RHASSPY

Christoph Morrison

Zitat von: Gisbert am 25 September 2021, 08:21:01
In diesem Fall wird ein ellenlanger Text in das log-file geschrieben. Kann man das irgendwie unterbinden?
Hier ein Beispiel von heute Nacht.
Verbose auf null zu setzen hatte ich auch schon probiert, aber ohne Erfolg. Gibt es eine andere Möglichkeit die Länge der log-Einträge drastisch zu kürzen? Eine Zeile würde mir ausreichen.

Du kannst in global verbose auf 1 setzen und wirst dann keine debug messages mehr sehen, so lange du nicht im BR-Device noch debug auf 1 gesetzt hast. Habs mir aber mal mitgenommen, 1 ist in global schon sehr wenig verbose.

Cybers

Beim Update bekomme ich folgenden Fehler:

Downloading https://raw.githubusercontent.com/fhem/mod-Buienradar/development/3.0/controls_Buienradar.txt
Buienradar
UPD lib/FHEM/Weather/Buienradar.pm
UPD FHEM/59_Buienradar.pm
Got 13197 bytes for FHEM/59_Buienradar.pm, expected 13538
aborting.

Gruß, Sascha
FHEM 6.2 auf Raspberry PI 4 / Smartvisu
Eltako Serie 14: FAM14, FGW14-USB, FSB14, FSR14-4x, FSR14-2x, FDG14, FTS14-EM in Kombination mit Jung F50 24V Tastern
1-Wire Temperatursensoren
aus alter Zeit:
Gott sei Dank nur noch 3 Homematic Jalousie- & Schaltaktoren! Wer sich mit Funk auskennt, legt Kabel