[gelöst] JsonMod bringt FHEM zum Absturz

Begonnen von FlatTV, 11 April 2023, 19:37:54

Vorheriges Thema - Nächstes Thema

FlatTV

Ich habe nochmal den Debug erweitert, der READINGS Hash in JsonMod_DoReadings wird noch erstellt.
Dann im concat Sub knallt es, manchmal früher, manchmal später.

Eine Meldung habe ich mal loggen können

2023.04.13 20:24:10 4: [WeatherBit] api encoding is , designated encoder is utf-8-strict
2023.04.13 20:24:10 5: [WeatherBit] start json decoding
json decoded using Cpanel
2023.04.13 20:24:10 5: [WeatherBit] finished json decoding
2023.04.13 20:24:10 5: [WeatherBit] start do readings
2023.04.13 20:24:10 5: [WeatherBit] key ready
2023.04.13 20:24:10 5: [WeatherBit] concat arg=hfc
2023.04.13 20:24:10 5: [WeatherBit] concat arg=0
2023.04.13 20:24:10 5: [WeatherBit] concat arg=_iconAPI
2023.04.13 20:24:10 5: [WeatherBit] concat arg=hfc
2023.04.13 20:24:10 5: [WeatherBit] concat arg=0
2023.04.13 20:24:10 5: [WeatherBit] concat arg=_iconAPI
2023.04.13 20:24:10 5: [WeatherBit] sanitizedSetReading
2023.04.13 20:24:10 5: [WeatherBit] concat arg=hfc
2023.04.13 20:24:10 5: [WeatherBit] concat arg=1
2023.04.13 20:24:10 5: [WeatherBit] concat arg=_iconAPI
2023.04.13 20:24:10 5: [WeatherBit] sanitizedSetReading
2023.04.13 20:24:10 5: [WeatherBit] concat arg=hfc
2023.04.13 20:24:10 5: [WeatherBit] concat arg=2
2023.04.13 20:24:10 5: [WeatherBit] concat arg=_iconAPI
2023.04.13 20:24:10 5: [WeatherBit] sanitizedSetReading
2023.04.13 20:24:10 5: [WeatherBit] concat arg=hfc
2023.04.13 20:24:10 5: [WeatherBit] concat arg=3
2023.04.13 20:24:10 5: [WeatherBit] concat arg=_iconAPI
2023.04.13 20:24:10 5: [WeatherBit] sanitizedSetReading
2023.04.13 20:24:10 5: [WeatherBit] concat arg=hfc
2023.04.13 20:24:10 5: [WeatherBit] concat arg=4
2023.04.13 20:24:10 5: [WeatherBit] concat arg=_iconAPI
2023.04.13 20:24:10 5: [WeatherBit] sanitizedSetReading
2023.04.13 20:24:10 5: [WeatherBit] concat arg=hfc
2023.04.13 20:24:10 5: [WeatherBit] concat arg=5
2023.04.13 20:24:10 5: [WeatherBit] concat arg=_iconAPI
2023.04.13 20:24:10 5: [WeatherBit] sanitizedSetReading
2023.04.13 20:24:10 5: [WeatherBit] concat arg=hfc
2023.04.13 20:24:10 5: [WeatherBit] concat arg=6
2023.04.13 20:24:10 5: [WeatherBit] concat arg=_iconAPI
2023.04.13 20:24:10 5: [WeatherBit] sanitizedSetReading
2023.04.13 20:24:10 5: [WeatherBit] concat arg=hfc
2023.04.13 20:24:10 5: [WeatherBit] concat arg=0
2023.04.13 20:24:10 5: [WeatherBit] concat arg=_condition
2023.04.13 20:24:10 5: [WeatherBit] concat arg=hfc
2023.04.13 20:24:10 5: [WeatherBit] concat arg=0
2023.04.13 20:24:10 5: [WeatherBit] concat arg=_condition
2023.04.13 20:24:10 5: [WeatherBit] sanitizedSetReading
2023.04.13 20:24:10 5: [WeatherBit] concat arg=hfc
2023.04.13 20:24:10 5: [WeatherBit] concat arg=1
2023.04.13 20:24:10 5: [WeatherBit] concat arg=_condition
2023.04.13 20:24:10 5: [WeatherBit] sanitizedSetReading
2023.04.13 20:24:10 5: [WeatherBit] concat arg=hfc
2023.04.13 20:24:10 5: [WeatherBit] concat arg=2
2023.04.13 20:24:10 5: [WeatherBit] concat arg=_condition
2023.04.13 20:24:10 5: [WeatherBit] sanitizedSetReading
2023.04.13 20:24:10 5: [WeatherBit] concat arg=hfc
2023.04.13 20:24:10 5: [WeatherBit] concat arg=3
2023.04.13 20:24:10 5: [WeatherBit] concat arg=_condition
2023.04.13 20:24:10 5: [WeatherBit] sanitizedSetReading
2023.04.13 20:24:11 5: [WeatherBit] concat arg=hfc
2023.04.13 20:24:11 5: [WeatherBit] concat arg=4
2023.04.13 20:24:11 5: [WeatherBit] concat arg=_condition
2023.04.13 20:24:11 5: [WeatherBit] sanitizedSetReading
2023.04.13 20:24:11 5: [WeatherBit] concat arg=hfc
2023.04.13 20:24:11 5: [WeatherBit] concat arg=5
2023.04.13 20:24:11 5: [WeatherBit] concat arg=_condition
2023.04.13 20:24:11 5: [WeatherBit] sanitizedSetReading
2023.04.13 20:24:11 5: [WeatherBit] concat arg=hfc
2023.04.13 20:24:11 5: [WeatherBit] concat arg=6
2023.04.13 20:24:11 5: [WeatherBit] concat arg=_condition
2023.04.13 20:24:11 5: [WeatherBit] sanitizedSetReading
2023.04.13 20:24:11 5: [WeatherBit] concat arg=hfc
2023.04.13 20:24:11 5: [WeatherBit] concat arg=0
2023.04.13 20:24:11 5: [WeatherBit] concat arg=_day_of_week
2023.04.13 20:24:11 3: [WeatherBit] warning: Bizarre copy of UNKNOWN in subroutine entry
 in 'multi(jsonPath('$.data[*]'), concat('hfc', count(), '_day_of_week'), property('ts'))'
2023.04.13 20:24:11 3: [WeatherBit] warning: Bizarre copy of UNKNOWN in list assignment at ./FHEM/98_JsonMod.pm line 285.
 in 'multi(jsonPath('$.data[*]'), concat('hfc', count(), '_day_of_week'), property('ts'))'
2023.04.13 20:24:11 5: [WeatherBit] concat arg=hfc
2023.04.13 20:24:11 5: [WeatherBit] concat arg=feature_fc
2023.04.13 20:24:11 5: [WeatherBit] concat arg=_day_of_week
2023.04.13 20:24:11 5: [WeatherBit] sanitizedSetReading
2023.04.13 20:24:11 5: [WeatherBit] concat arg=hfc
2023.04.13 20:24:11 5: [WeatherBit] concat arg=1
2023.04.13 20:24:11 5: [WeatherBit] concat arg=_day_of_week
2023.04.13 20:24:11 5: [WeatherBit] sanitizedSetReading
2023.04.13 20:24:11 5: [WeatherBit] concat arg=hfc
2023.04.13 20:24:11 5: [WeatherBit] concat arg=1
2023.04.13 20:24:11 5: [WeatherBit] concat arg=_day_of_week
2023.04.13 20:24:11 5: [WeatherBit] sanitizedSetReading
2023.04.13 20:24:11 5: [WeatherBit] concat arg=hfc
2023.04.13 20:24:11 5: [WeatherBit] concat arg=31290
2023.04.13 20:24:11 5: [WeatherBit] concat arg=_day_of_week
2023.04.13 20:24:11 5: [WeatherBit] sanitizedSetReading
2023.04.13 20:24:11 5: [WeatherBit] concat arg=hfc
2023.04.13 20:24:11 5: [WeatherBit] concat arg=1
2023.04.13 20:24:11 5: [WeatherBit] concat arg=_day_of_week
2023.04.13 20:24:11 5: [WeatherBit] sanitizedSetReading
2023.04.13 20:25:42 1: Including fhem.cfg
2023.04.13 20:25:42 3: WEB: port 8083 opened
Raspi3 - im wesentlichen mit Phoscon, HomeMatic ( aktuell über debmatic), CUL, BOSE-ST und Alexa (Connector)

herrmannj

vielen dank. Wie hast Du die Meldungen erzeugt? Anders gefragt, wenn da line 285 steht, stimmt das noch mit dem überein was ich bei mir sehe? (my @args = @_;)

Bonusfrage: Wenn ich bei deiner Ausgabe die concat Argumente anschaue, dann sollte das zweite count() sein. Der geht unmittelbar vor dem crash von 6 auf 0. Direkt danach (evtl sind das die Daten im Fehlerfall) ist das zweite arg plötzlich "feature_fc" also ein Text. Irgendeine Idee wo der Textinhalt "feature_fc" überhaupt herkommt?


FlatTV

Der count() war mir überhaupt nicht aufgefallen aber du hast völlig recht.
Leider sind meine maximalen Abfragen für heute erreicht, keine Ahnung wo der ,,feature_fc" her kommt.

sub JsonMod_DoReadings {
    my ($hash, $data) = @_;
    my $name = $hash->{'NAME'};

    my $path = JsonMod::JSON::Path->new($data);

    my $newReadings = {};
    my $oldReadings = {};
    foreach my $key (keys %{$hash->{'READINGS'}}) {
        $oldReadings->{$key} = 0;
    };
    JsonMod_Logger($hash, 5, 'key ready');

    # sanitize reading names to comply with fhem naming conventions
    # (allowed chars: A-Za-z/\d_\.-)
    my sub sanitizedSetReading {
        my ($r, $v) = @_;
        JsonMod_Logger($hash, 5, 'sanitizedSetReading');
        # convert into valid reading
        # special treatment of "umlaute"
        my %umlaute = ("ä" => "ae", "Ä" => "Ae", "ü" => "ue", "Ü" => "Ue", "ö" => "oe", "Ö" => "Oe", "ß" => "ss" );
        my $umlautkeys = join ("|", keys(%umlaute));
        $r =~ s/($umlautkeys)/$umlaute{$1}/g;
        # normalize remaining special chars
        $r = Unicode::Normalize::NFD($r);
        utf8::encode($r) if utf8::is_utf8($r);
        $r =~ s/\s/_/g;    # whitespace
        $r =~ s/([^A-Za-z0-9\/_\.-])//g;
        # prevent a totally stripped reading name
        # todo, log it?
        #$r = "_Identifier_$_index" unless($r);
        $v //='';
        utf8::encode($v) if utf8::is_utf8($v);
        $newReadings->{$r} = $v;
        $oldReadings->{$r} = 1;
        #printf "1 %s %s %s %s\n", $r, length($r), $v, length($v);
    };

    my sub concat {
        my @args = @_;
        my $result = '';
        foreach my $arg (@args) {
            JsonMod_Logger($hash, 5, 'concat arg='.$arg);
            $result .= $arg;
        };
        return $result;
    };
Raspi3 - im wesentlichen mit Phoscon, HomeMatic ( aktuell über debmatic), CUL, BOSE-ST und Alexa (Connector)

herrmannj

schau mal bitte was bei Dir in Zeile 285 steht (und welche sub das ist)

FlatTV

So wie du sagtest, der concat() mit den Argumenten aus der readingList.
Du darfst diesen Dateianhang nicht ansehen.
Raspi3 - im wesentlichen mit Phoscon, HomeMatic ( aktuell über debmatic), CUL, BOSE-ST und Alexa (Connector)

herrmannj

Mist, das Bild kann ich nicht sehen, bekomme da einen 404 jetzt gehts. passt.

Aber ich denke wir könnten möglicherweise zumindest eine Spur haben. Es scheint so also ab der index entweder aus count() falsch rauskommt oder in concat() falsch reingeht. Dazwischen liegt dann ganz viel perl interna und da steckt wohl auch der bug. 

Interessehalber: gib doch bitte auf dem pi auf der console folgendes ein und poste den output
- uname -m
- perl --version

geht jeweils um (ob) 32 oder 64 bit. Ich teste in der Zwischenzeit mal einige Ideen wie und ob man da was machen kann


FlatTV

Der count() zählt doch auch die 0 immer doppelt?!
Der Index von 0-6 wäre richtig, nur sehe ich die 0 zu jedem Argument doppelt.

Die Zeile wäre in concat()
my @args = @_;
pi@raspi3:~ $ uname -m
armv7l
pi@raspi3:~ $ perl --version

This is perl 5, version 32, subversion 1 (v5.32.1) built for arm-linux-gnueabihf-thread-multi-64int
(with 47 registered patches, see perl -V for more detail)

Copyright 1987-2021, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl".  If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.

pi@raspi3:~ $
Raspi3 - im wesentlichen mit Phoscon, HomeMatic ( aktuell über debmatic), CUL, BOSE-ST und Alexa (Connector)

herrmannj

ZitatDer count() zählt doch auch die 0 immer doppelt?!

Das ist korrekt. Im ersten Durchlauf (m1) wird das array aufgelöst. Dabei wird count() einmal evaluiert, das reading selbst wird jedoch erst in anschließenden Schleife (über das array) gesetzt und dort wird count() (=$index) auch erst erhöht (m2).

In deinem log (ps, Du hast da dankenswerterweise vmtl genau den "heissen" Teil erwischt) ist innerhalb concat mehrfach das zweite Argument "wirr". In deiner readinglist ist das immer count(), sprich der index. Der darf nur 0,0,1,2,3 .. laufen und weder text beinhalten noch 0,1,31290,1 lauten. Kann er theoretisch auch nicht, macht er aber offensichtlich doch

herrmannj

teste bitte das file im Anhang. Du darfst diesen Dateianhang nicht ansehen.

Da ist ein angepasstes logging drin und zusätzlich habe ich den derzeitigen Hauptverdächtigen (count) modifiziert. Btw, Du kannst das verbose (aatr) für fhem gesamt auf 3 lassen und nur das verbose (attr) des moduls auf 5 stellen.

Falls das logging eines durchgangs von JsonMod durch logausgaben von anderen modulen unterbrochen wird (sollte eigentlich nicht) - die bitte drin lassen. Anders formuliert zwischen "[test_json] api encoding is , designated encoder is utf-8-strict" und "[test_json] finished do readings" keine Zeilen entfernen bitte, falls da welche sein sollten

herrmannj

es gäbe da im übrigen noch eine weiter Möglichkeit:

count() ist nur ein wrapper um $index um die interne variable vom user fernzuhalten. $index liegt aber sowieso im scope und man könnte die readinglist auch so schreiben:

multi(jsonPath('$.data[*].weather'), concat('hfc', $index, '_iconAPI'), propertyf('icon', '', 'https://www.weatherbit.io/static/img/icons/%s.png'))
Das alles unter der Annahme das count(), bzw perl dann bei der Parameterübergabe das auch wirklich verursacht. (Für Spass am Gerät kannste dann auch $index++ reinschreiben, bekommste einen 2 Wochen fc zum gleichen Preis ;) )

herrmannj

Bei yersinia war die Konstellation übrigens ähnlich: "concat(count(),.." Wäre schön wenn herauskristallisiert, dass das wirklich die Ursache ist und die workarounds funktionieren

FlatTV

Du warst ja noch richtig fleißig  :o
Ich muss erstmal los und meinen Arbeitgeber glücklich machen.
Raspi3 - im wesentlichen mit Phoscon, HomeMatic ( aktuell über debmatic), CUL, BOSE-ST und Alexa (Connector)

yersinia

Cool, das es hier weitergeht und FlatTV das wirklich verlässlich reproduzieren kann. :)
Umso besser, dass es schon einen Verdacht gibt.

Kurze (sOT) Frage, da ich es in #17 zufällig gesehen habe: spricht was dagegen zumindest teilweise FHEM-eigene Funktionen für die readingsname zu nutzen wie goodReadingName und makeReadingName?
viele Grüße, yersinia
----
FHEM 6.4 (SVN) on RPi 4B with RasPi OS Bookworm (perl 5.36.0) | FTUI
nanoCUL->2x868(1x ser2net)@tsculfw, 1x433@Sduino | MQTT2 | Tasmota | ESPEasy
VCCU->14xSEC-SCo, 7xCC-RT-DN, 5xLC-Bl1PBU-FM, 3xTC-IT-WM-W-EU, 1xPB-2-WM55, 1xLC-Sw1PBU-FM, 1xES-PMSw1-Pl

FlatTV

Ich konnte doch nicht die Finger davon lassen.
Es läuft erstmal, Auszug aus dem Log unten, ohne Absturz.

Ich hab jetzt mal alle Readings aktiviert und (nicht böse sein, wieder rumgefummelt) den Data Dumper aktiviert, um auch noch den Hash immer direkt mit auszugeben.

Mal sehen wie das heute Abend aussieht.

connection: close
2023.04.14 06:48:00 4: [WeatherBit] api encoding is , designated encoder is utf-8-strict
2023.04.14 06:48:00 5: [WeatherBit] start json decoding
json decoded using Cpanel
2023.04.14 06:48:00 5: [WeatherBit] finished json decoding
2023.04.14 06:48:00 5: [WeatherBit] start do readings
2023.04.14 06:48:00 2: [WeatherBit] start JsonPath
cp#0 0 eval m1(jsonPath('$.data[*].weather'), concat('hfc', count(), '_iconAPI'), propertyf('icon', '', 'https://www.weatherbit.io/static/img/icons/%s.png'))
cp#2 count out 0
cp#3 concat input hfc 0 _iconAPI
2023.04.14 06:48:00 5: [WeatherBit] concat arg=hfc
2023.04.14 06:48:00 5: [WeatherBit] concat arg=0
2023.04.14 06:48:00 5: [WeatherBit] concat arg=_iconAPI
cp#1 0 HASH(0x6995698) eval m2(jsonPath('$.data[*].weather'), concat('hfc', count(), '_iconAPI'), propertyf('icon', '', 'https://www.weatherbit.io/static/img/icons/%s.png'))
cp#2 count out 0
cp#3 concat input hfc 0 _iconAPI
2023.04.14 06:48:00 5: [WeatherBit] concat arg=hfc
2023.04.14 06:48:00 5: [WeatherBit] concat arg=0
2023.04.14 06:48:00 5: [WeatherBit] concat arg=_iconAPI
cp#1 1 HASH(0x6668260) eval m2(jsonPath('$.data[*].weather'), concat('hfc', count(), '_iconAPI'), propertyf('icon', '', 'https://www.weatherbit.io/static/img/icons/%s.png'))
cp#2 count out 1
cp#3 concat input hfc 1 _iconAPI
2023.04.14 06:48:00 5: [WeatherBit] concat arg=hfc
2023.04.14 06:48:00 5: [WeatherBit] concat arg=1
2023.04.14 06:48:00 5: [WeatherBit] concat arg=_iconAPI
cp#1 2 HASH(0x64cfd80) eval m2(jsonPath('$.data[*].weather'), concat('hfc', count(), '_iconAPI'), propertyf('icon', '', 'https://www.weatherbit.io/static/img/icons/%s.png'))
cp#2 count out 2
cp#3 concat input hfc 2 _iconAPI
2023.04.14 06:48:00 5: [WeatherBit] concat arg=hfc
2023.04.14 06:48:00 5: [WeatherBit] concat arg=2
2023.04.14 06:48:00 5: [WeatherBit] concat arg=_iconAPI
cp#1 3 HASH(0x6444480) eval m2(jsonPath('$.data[*].weather'), concat('hfc', count(), '_iconAPI'), propertyf('icon', '', 'https://www.weatherbit.io/static/img/icons/%s.png'))
cp#2 count out 3
cp#3 concat input hfc 3 _iconAPI
2023.04.14 06:48:00 5: [WeatherBit] concat arg=hfc
2023.04.14 06:48:00 5: [WeatherBit] concat arg=3
2023.04.14 06:48:00 5: [WeatherBit] concat arg=_iconAPI
cp#1 4 HASH(0x64d7118) eval m2(jsonPath('$.data[*].weather'), concat('hfc', count(), '_iconAPI'), propertyf('icon', '', 'https://www.weatherbit.io/static/img/icons/%s.png'))
cp#2 count out 4
cp#3 concat input hfc 4 _iconAPI
2023.04.14 06:48:00 5: [WeatherBit] concat arg=hfc
2023.04.14 06:48:00 5: [WeatherBit] concat arg=4
2023.04.14 06:48:00 5: [WeatherBit] concat arg=_iconAPI
cp#1 5 HASH(0x64cbbd0) eval m2(jsonPath('$.data[*].weather'), concat('hfc', count(), '_iconAPI'), propertyf('icon', '', 'https://www.weatherbit.io/static/img/icons/%s.png'))
cp#2 count out 5
cp#3 concat input hfc 5 _iconAPI
2023.04.14 06:48:00 5: [WeatherBit] concat arg=hfc
2023.04.14 06:48:00 5: [WeatherBit] concat arg=5
2023.04.14 06:48:00 5: [WeatherBit] concat arg=_iconAPI
cp#1 6 HASH(0x6991280) eval m2(jsonPath('$.data[*].weather'), concat('hfc', count(), '_iconAPI'), propertyf('icon', '', 'https://www.weatherbit.io/static/img/icons/%s.png'))
cp#2 count out 6
cp#3 concat input hfc 6 _iconAPI
2023.04.14 06:48:00 5: [WeatherBit] concat arg=hfc
2023.04.14 06:48:00 5: [WeatherBit] concat arg=6
2023.04.14 06:48:00 5: [WeatherBit] concat arg=_iconAPI
cp#0 0 eval m1(jsonPath('$.data[*].weather'), concat('hfc', count(), '_condition'), property('description'))
cp#2 count out 0
cp#3 concat input hfc 0 _condition
2023.04.14 06:48:00 5: [WeatherBit] concat arg=hfc
2023.04.14 06:48:00 5: [WeatherBit] concat arg=0
2023.04.14 06:48:00 5: [WeatherBit] concat arg=_condition
cp#1 0 HASH(0x1264240) eval m2(jsonPath('$.data[*].weather'), concat('hfc', count(), '_condition'), property('description'))
cp#2 count out 0
cp#3 concat input hfc 0 _condition
2023.04.14 06:48:00 5: [WeatherBit] concat arg=hfc
2023.04.14 06:48:00 5: [WeatherBit] concat arg=0
2023.04.14 06:48:00 5: [WeatherBit] concat arg=_condition
cp#1 1 HASH(0x69752b0) eval m2(jsonPath('$.data[*].weather'), concat('hfc', count(), '_condition'), property('description'))
cp#2 count out 1
cp#3 concat input hfc 1 _condition
2023.04.14 06:48:00 5: [WeatherBit] concat arg=hfc
2023.04.14 06:48:00 5: [WeatherBit] concat arg=1
2023.04.14 06:48:00 5: [WeatherBit] concat arg=_condition
cp#1 2 HASH(0x646d6b8) eval m2(json
Raspi3 - im wesentlichen mit Phoscon, HomeMatic ( aktuell über debmatic), CUL, BOSE-ST und Alexa (Connector)

FlatTV

#29
Läuft seit heute Morgen jede Stunde ohne Probleme mit allen Readings.

2023.04.14 15:00:00 4: [WeatherBit] start request
2023.04.14 15:00:00 4: [WeatherBit] next request: 2023.04.14 16:00:00
2023.04.14 15:00:00 5: HttpUtils url=https://api.weatherbit.io/v2.0/forecast/daily?lang=de&city=Bremerhaven&key=meiner NonBlocking via https
2023.04.14 15:00:00 4: IP: api.weatherbit.io -> 15.235.118.221
2023.04.14 15:00:00 5: HttpUtils request header:
GET /v2.0/forecast/daily?lang=de&city=Bremerhaven&key=meiner HTTP/1.0
Host: api.weatherbit.io
User-Agent: fhem
Accept-Encoding: gzip,deflate

Accept: application/json
Accept-Charset: utf-8, iso-8859-1

2023.04.14 15:00:00 4: https://api.weatherbit.io/v2.0/forecast/daily?lang=de&city=Bremerhaven&key=meiner: HTTP response code 200
2023.04.14 15:00:00 5: HttpUtils https://api.weatherbit.io/v2.0/forecast/daily?lang=de&city=Bremerhaven&key=meiner: Got data, length: 5004
2023.04.14 15:00:00 5: HttpUtils response header:
HTTP/1.1 200 OK
server: openresty/1.19.3.1
date: Fri, 14 Apr 2023 13:00:00 GMT
content-type: application/json; charset=utf-8
content-length: 5004
keep-alive: timeout=5
x-ratelimit-limit: 55
x-ratelimit-remaining: 33
x-ratelimit-reset: 1681516799
x-proxy-cache: HIT
access-control-allow-origin: *
access-control-allow-methods: GET, OPTIONS, POST
access-control-allow-headers: DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range
access-control-expose-headers: DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range
connection: close
2023.04.14 15:00:00 4: [WeatherBit] api encoding is , designated encoder is utf-8-strict
2023.04.14 15:00:00 5: [WeatherBit] start json decoding
json decoded using Cpanel
2023.04.14 15:00:00 5: [WeatherBit] finished json decoding
2023.04.14 15:00:00 5: [WeatherBit] start do readings
2023.04.14 15:00:00 2: [WeatherBit] start JsonPath
cp#0 0 eval m1(jsonPath('$.data[*].weather'), concat('hfc', count(), '_iconAPI'), propertyf('icon', '', 'https://www.weatherbit.io/static/img/icons/%s.png'))
cp#2 count out 0
cp#3 concat input hfc 0 _iconAPI
$VAR1 = 'hfc';
$VAR2 = 0;
$VAR3 = '_iconAPI';
2023.04.14 15:00:00 5: [WeatherBit] concat arg=hfc
2023.04.14 15:00:00 5: [WeatherBit] concat arg=0
2023.04.14 15:00:00 5: [WeatherBit] concat arg=_iconAPI
cp#1 0 HASH(0x754ac68) eval m2(jsonPath('$.data[*].weather'), concat('hfc', count(), '_iconAPI'), propertyf('icon', '', 'https://www.weatherbit.io/static/img/icons/%s.png'))
$VAR1 = 0;
cp#2 count out 0
cp#3 concat input hfc 0 _iconAPI
$VAR1 = 'hfc';
$VAR2 = 0;
$VAR3 = '_iconAPI';
2023.04.14 15:00:00 5: [WeatherBit] concat arg=hfc
2023.04.14 15:00:00 5: [WeatherBit] concat arg=0
2023.04.14 15:00:00 5: [WeatherBit] concat arg=_iconAPI
cp#1 1 HASH(0x708a448) eval m2(jsonPath('$.data[*].weather'), concat('hfc', count(), '_iconAPI'), propertyf('icon', '', 'https://www.weatherbit.io/static/img/icons/%s.png'))
$VAR1 = 1;
cp#2 count out 1
cp#3 concat input hfc 1 _iconAPI
$VAR1 = 'hfc';
$VAR2 = 1;
$VAR3 = '_iconAPI';
2023.04.14 15:00:00 5: [WeatherBit] concat arg=hfc
2023.04.14 15:00:00 5: [WeatherBit] concat arg=1
2023.04.14 15:00:00 5: [WeatherBit] concat arg=_iconAPI
cp#1 2 HASH(0x709a668) eval m2(jsonPath('$.data[*].weather'), concat('hfc', count(), '_iconAPI'), propertyf('icon', '', 'https://www.weatherbit.io/static/img/icons/%s.png'))
$VAR1 = 2;
cp#2 count out 2
cp#3 concat input hfc 2 _iconAPI
$VAR1 = 'hfc';
$VAR2 = 2;
$VAR3 = '_iconAPI';
2023.04.14 15:00:00 5: [WeatherBit] concat arg=hfc
2023.04.14 15:00:00 5: [WeatherBit] concat arg=2
2023.04.14 15:00:00 5: [WeatherBit] concat arg=_iconAPI
cp#1 3 HASH(0x768ee38) eval m2(jsonPath('$.data[*].weather'), concat('hfc', count(), '_iconAPI'), propertyf('icon', '', 'https://www.weatherbit.io/static/img/icons/%s.png'))
$VAR1 = 3;
cp#2 count out 3
cp#3 concat input hfc 3 _iconAPI
$VAR1 = 'hfc';
$VAR2 = 3;
$VAR3 = '_iconAPI';
2023.04.14 15:00:00 5: [WeatherBit] concat arg=hfc
2023.04.14 15:00:00 5: [WeatherBit] concat arg=3
2023.04.14 15:00:00 5: [WeatherBit] concat arg=_iconAPI
cp#1 4 HASH(0x74388f0) eval m2(jsonPath('$.data[*].weather'), concat('hfc', count(), '_iconAPI'), propertyf('icon', '', 'https://www.weatherbit.io/static/img/icons/%s.png'))
$VAR1 = 4;
cp#2 count out 4
cp#3 concat input hfc 4 _iconAPI
$VAR1 = 'hfc';
$VAR2 = 4;
$VAR3 = '_iconAPI';
2023.04.14 15:00:00 5: [WeatherBit] concat arg=hfc
2023.04.14 15:00:00 5: [WeatherBit] concat arg=4
2023.04.14 15:00:00 5: [WeatherBit] concat arg=_iconAPI
cp#1 5 HASH(0x709a398) eval m2(jsonPath('$.data[*].weather'), concat('hfc', count(), '_iconAPI'), propertyf('icon', '', 'https://www.weatherbit.io/static/img/icons/%s.png'))
$VAR1 = 5;
cp#2 count out 5
cp#3 concat input hfc 5 _iconAPI
$VAR1 = 'hfc';
$VAR2 = 5;
$VAR3 = '_iconAPI';
2023.04.14 15:00:00 5: [WeatherBit] concat arg=hfc
2023.04.14 15:00:00 5: [WeatherBit] concat arg=5
2023.04.14 15:00:01 5: [WeatherBit] concat arg=_iconAPI
cp#1 6 HASH(0x7292860) eval m2(jsonPath('$.data[*].weather'), concat('hfc', count(), '_iconAPI'), propertyf('icon', '', 'https://www.weatherbit.io/static/img/icons/%s.png'))
$VAR1 = 6;
cp#2 count out 6
cp#3 concat input hfc 6 _iconAPI
$VAR1 = 'hfc';
$VAR2 = 6;
$VAR3 = '_iconAPI';
2023.04.14 15:00:01 5: [WeatherBit] concat arg=hfc
2023.04.14 15:00:01 5: [WeatherBit] concat arg=6
2023.04.14 15:00:01 5: [WeatherBit] concat arg=_iconAPI
cp#0 0 eval m1(jsonPath('$.data[*].weather'), concat('hfc', count(), '_condition'), property('description'))
cp#2 count out 0
cp#3 concat input hfc 0 _condition
$VAR1 = 'hfc';
$VAR2 = 0;
$VAR3 = '_condition';
2023.04.14 15:00:01 5: [WeatherBit] concat arg=hfc
2023.04.14 15:00:01 5: [WeatherBit] concat arg=0
2023.04.14 15:00:01 5: [WeatherBit] concat arg=_condition
cp#1 0 HASH(0x7627cd8) eval m2(jsonPath('$.data[*].weather'), concat('hfc', count(), '_condition'), property('description'))
$VAR1 = 0;
cp#2 count out 0
cp#3 concat input hfc 0 _condition
$VAR1 = 'hfc';
$VAR2 = 0;
$VAR3 = '_condition';
2023.04.14 15:00:01 5: [WeatherBit] concat arg=hfc
2023.04.14 15:00:01 5: [WeatherBit] concat arg=0
2023.04.14 15:00:01 5: [WeatherBit] concat arg=_condition
cp#1 1 HASH(0x75cf998) eval m2(jsonPath('$.data[*].weather'), concat('hfc', count(), '_condition'), property('description'))
$VAR1 = 1;
cp#2 count out 1
cp#3 concat input hfc 1 _condition
$VAR1 = 'hfc';
$VAR2 = 1;
$VAR3 = '_condition';
2023.04.14 15:00:01 5: [WeatherBit] concat arg=hfc
2023.04.14 15:00:01 5: [WeatherBit] concat arg=1
2023.04.14 15:00:01 5: [WeatherBit] concat arg=_condition
cp#1 2 HASH(0x6e98ef0) eval m2(jsonPath('$.data[*].weather'), concat('hfc', count(), '_condition'), property('description'))
$VAR1 = 2;
cp#2 count out 2
cp#3 concat input hfc 2 _condition
$VAR1 = 'hfc';
$VAR2 = 2;
$VAR3 = '_condition';
2023.04.14 15:00:01 5: [WeatherBit] concat arg=hfc
2023.04.14 15:00:01 5: [WeatherBit] concat arg=2
2023.04.14 15:00:01 5: [WeatherBit] concat arg=_condition
cp#1 3 HASH(0x70ab090) eval m2(jsonPath('$.data[*].weather'), concat('hfc', count(), '_condition'), property('description'))
$VAR1 = 3;
cp#2 count out 3
cp#3 concat input hfc 3 _condition
$VAR1 = 'hfc';
$VAR2 = 3;
$VAR3 = '_condition';
2023.04.14 15:00:01 5: [WeatherBit] concat arg=hfc
2023.04.14 15:00:01 5: [WeatherBit] concat arg=3
2023.04.14 15:00:01 5: [WeatherBit] concat arg=_condition
cp#1 4 HASH(0x72f5228) eval m2(jsonPath('$.data[*].weather'), concat('hfc', count(), '_condition'), property('description'))
$VAR1 = 4;
cp#2 count out 4
cp#3 concat input hfc 4 _condition
$VAR1 = 'hfc';
$VAR2 = 4;
$VAR3 = '_condition';
2023.04.14 15:00:01 5: [WeatherBit] concat arg=hfc
2023.04.14 15:00:01 5: [WeatherBit] concat arg=4
2023.04.14 15:00:01 5: [WeatherBit] concat arg=_condition
cp#1 5 HASH(0x75d30f0) eval m2(jsonPath('$.data[*].weather'), concat('hfc', count(), '_condition'), property('description'))
$VAR1 = 5;
cp#2 count out 5
cp#3 concat input hfc 5 _condition
$VAR1 = 'hfc';
$VAR2 = 5;
$VAR3 = '_condition';
2023.04.14 15:00:01 5: [WeatherBit] concat arg=hfc
2023.04.14 15:00:01 5: [WeatherBit] concat arg=5
2023.04.14 15:00:01 5: [WeatherBit] concat arg=_condition
cp#1 6 HASH(0x768f198) eval m2(jsonPath('$.data[*].weather'), concat('hfc', count(), '_condition'), property('description'))
$VAR1 = 6;
cp#2 count out 6
cp#3 concat input hfc 6 _condition
$VAR1 = 'hfc';
$VAR2 = 6;
$VAR3 = '_condition';
2023.04.14 15:00:01 5: [WeatherBit] concat arg=hfc
2023.04.14 15:00:01 5: [WeatherBit] concat arg=6
2023.04.14 15:00:01 5: [WeatherBit] concat arg=_condition
cp#0 0 eval m1(jsonPath('$.data[*]'), concat('hfc', count(), '_day_of_week'), property('ts'))
cp#2 count out 0
cp#3 concat input hfc 0 _day_of_week
$VAR1 = 'hfc';
$VAR2 = 0;
$VAR3 = '_day_of_week';
2023.04.14 15:00:01 5: [WeatherBit] concat arg=hfc
2023.04.14 15:00:01 5: [WeatherBit] concat arg=0
2023.04.14 15:00:01 5: [WeatherBit] concat arg=_day_of_week
cp#1 0 HASH(0x6e97d00) eval m2(jsonPath('$.data[*]'), concat('hfc', count(), '_day_of_week'), property('ts'))
$VAR1 = 0;
cp#2 count out 0
cp#3 concat input hfc 0 _day_of_week
$VAR1 = 'hfc';
$VAR2 = 0;
$VAR3 = '_day_of_week';
2023.04.14 15:00:01 5: [WeatherBit] concat arg=hfc
2023.04.14 15:00:01 5: [WeatherBit] concat arg=0
2023.04.14 15:00:01 5: [WeatherBit] concat arg=_day_of_week
cp#1 1 HASH(0x762fb28) eval m2(jsonPath('$.data[*]'), concat('hfc', count(), '_day_of_week'), property('ts'))
$VAR1 = 1;
cp#2 count out 1
cp#3 concat input hfc 1 _day_of_week
$VAR1 = 'hfc';
$VAR2 = 1;
$VAR3 = '_day_of_week';
2023.04.14 15:00:01 5: [WeatherBit] concat arg=hfc
2023.04.14 15:00:01 5: [WeatherBit] concat arg=1
2023.04.14 15:00:01 5: [WeatherBit] concat arg=_day_of_week
cp#1 2 HASH(0x70b0be0) eval m2(jsonPath('$.data[*]'), concat('hfc', count(), '_day_of_week'), property('ts'))
$VAR1 = 2;
cp#2 count out 2
cp#3 concat input hfc 2 _day_of_week
$VAR1 = 'hfc';
$VAR2 = 2;
$VAR3 = '_day_of_week';
2023.04.14 15:00:01 5: [WeatherBit] concat arg=hfc
2023.04.14 15:00:01 5: [WeatherBit] concat arg=2
2023.04.14 15:00:01 5: [WeatherBit] concat arg=_day_of_week
cp#1 3 HASH(0x75cb648) eval m2(jsonPath('$.data[*]'), concat('hfc', count(), '_day_of_week'), property('ts'))
$VAR1 = 3;
cp#2 count out 3
cp#3 concat input hfc 3 _day_of_week
$VAR1 = 'hfc';
$VAR2 = 3;
$VAR3 = '_day_of_week';
2023.04.14 15:00:01 5: [WeatherBit] concat arg=hfc
2023.04.14 15:00:01 5: [WeatherBit] concat arg=3
2023.04.14 15:00:01 5: [WeatherBit] concat arg=_day_of_week
cp#1 4 HASH(0x70bc270) eval m2(jsonPath('$.data[*]'), concat('hfc', count(), '_day_of_week'), property('ts'))
$VAR1 = 4;
cp#2 count out 4
cp#3 concat input hfc 4 _day_of_week
$VAR1 = 'hfc';
$VAR2 = 4;
$VAR3 = '_day_of_week';
2023.04.14 15:00:01 5: [WeatherBit] concat arg=hfc
2023.04.14 15:00:01 5: [WeatherBit] concat arg=4
2023.04.14 15:00:01 5: [WeatherBit] concat arg=_day_of_week
cp#1 5 HASH(0x7096f68) eval m2(jsonPath('$.data[*]'), concat('hfc', count(), '_day_of_week'), property('ts'))
$VAR1 = 5;
cp#2 count out 5
cp#3 concat input hfc 5 _day_of_week
$VAR1 = 'hfc';
$VAR2 = 5;
$VAR3 = '_day_of_week';
2023.04.14 15:00:01 5: [WeatherBit] concat arg=hfc
2023.04.14 15:00:01 5: [WeatherBit] concat arg=5
2023.04.14 15:00:01 5: [WeatherBit] concat arg=_day_of_week
cp#1 6 HASH(0x75c2368) eval m2(jsonPath('$.data[*]'), concat('hfc', count(), '_day_of_week'), property('ts'))
$VAR1 = 6;
cp#2 count out 6
cp#3 concat input hfc 6 _day_of_week
$VAR1 = 'hfc';
$VAR2 = 6;
$VAR3 = '_day_of_week';
2023.04.14 15:00:01 5: [WeatherBit] concat arg=hfc
2023.04.14 15:00:01 5: [WeatherBit] concat arg=6
2023.04.14 15:00:01 5: [WeatherBit] concat arg=_day_of_week
cp#0 0 eval m1(jsonPath('$.data[*]'), concat('hfc', count(), '_pop'), propertyf('pop', '', '%s %%'))
cp#2 count out 0
cp#3 concat input hfc 0 _pop
$VAR1 = 'hfc';
$VAR2 = 0;
$VAR3 = '_pop';
2023.04.14 15:00:01 5: [WeatherBit] concat arg=hfc
2023.04.14 15:00:01 5: [WeatherBit] concat arg=0
2023.04.14 15:00:01 5: [WeatherBit] concat arg=_pop
cp#1 0 HASH(0x74d17c8) eval m2(jsonPath('$.data[*]'), concat('hfc', count(), '_pop'), propertyf('pop', '', '%s %%'))
$VAR1 = 0;
cp#2 count out 0
cp#3 concat input hfc 0 _pop
$VAR1 = 'hfc';
$VAR2 = 0;
$VAR3 = '_pop';
2023.04.14 15:00:02 5: [WeatherBit] concat arg=hfc
2023.04.14 15:00:02 5: [WeatherBit] concat arg=0
2023.04.14 15:00:02 5: [WeatherBit] concat arg=_pop
cp#1 1 HASH(0x6f045a0) eval m2(jsonPath('$.data[*]'), concat('hfc', count(), '_pop'), propertyf('pop', '', '%s %%'))
$VAR1 = 1;
cp#2 count out 1
cp#3 concat input hfc 1 _pop
$VAR1 = 'hfc';
$VAR2 = 1;
$VAR3 = '_pop';
2023.04.14 15:00:02 5: [WeatherBit] concat arg=hfc
2023.04.14 15:00:02 5: [WeatherBit] concat arg=1
2023.04.14 15:00:02 5: [WeatherBit] concat arg=_pop
cp#1 2 HASH(0x768f3c0) eval m2(jsonPath('$.data[*]'), concat('hfc', count(), '_pop'), propertyf('pop', '', '%s %%'))
$VAR1 = 2;
cp#2 count out 2
cp#3 concat input hfc 2 _pop
$VAR1 = 'hfc';
$VAR2 = 2;
$VAR3 = '_pop';
2023.04.14 15:00:02 5: [WeatherBit] concat arg=hfc
2023.04.14 15:00:02 5: [WeatherBit] concat arg=2
2023.04.14 15:00:02 5: [WeatherBit] concat arg=_pop
cp#1 3 HASH(0x743b488) eval m2(jsonPath('$.data[*]'), concat('hfc', count(), '_pop'), propertyf('pop', '', '%s %%'))
$VAR1 = 3;
cp#2 count out 3
cp#3 concat input hfc 3 _pop
$VAR1 = 'hfc';
$VAR2 = 3;
$VAR3 = '_pop';
2023.04.14 15:00:02 5: [WeatherBit] concat arg=hfc
2023.04.14 15:00:02 5: [WeatherBit] concat arg=3
2023.04.14 15:00:02 5: [WeatherBit] concat arg=_pop
cp#1 4 HASH(0x74498f0) eval m2(jsonPath('$.data[*]'), concat('hfc', count(), '_pop'), propertyf('pop', '', '%s %%'))
$VAR1 = 4;
cp#2 count out 4
cp#3 concat input hfc 4 _pop
$VAR1 = 'hfc';
$VAR2 = 4;
$VAR3 = '_pop';
2023.04.14 15:00:02 5: [WeatherBit] concat arg=hfc
2023.04.14 15:00:02 5: [WeatherBit] concat arg=4
2023.04.14 15:00:02 5: [WeatherBit] concat arg=_pop
cp#1 5 HASH(0x769a4b8) eval m2(jsonPath('$.data[*]'), concat('hfc', count(), '_pop'), propertyf('pop', '', '%s %%'))
$VAR1 = 5;
cp#2 count out 5
cp#3 concat input hfc 5 _pop
$VAR1 = 'hfc';
$VAR2 = 5;
$VAR3 = '_pop';
2023.04.14 15:00:02 5: [WeatherBit] concat arg=hfc
2023.04.14 15:00:02 5: [WeatherBit] concat arg=5
2023.04.14 15:00:02 5: [WeatherBit] concat arg=_pop
cp#1 6 HASH(0x75731f8) eval m2(jsonPath('$.data[*]'), concat('hfc', count(), '_pop'), propertyf('pop', '', '%s %%'))
$VAR1 = 6;
cp#2 count out 6
cp#3 concat input hfc 6 _pop
$VAR1 = 'hfc';
$VAR2 = 6;
$VAR3 = '_pop';
2023.04.14 15:00:02 5: [WeatherBit] concat arg=hfc
2023.04.14 15:00:02 5: [WeatherBit] concat arg=6
2023.04.14 15:00:02 5: [WeatherBit] concat arg=_pop
cp#0 0 eval m1(jsonPath('$.data[*]'), concat('hfc', count(), '_cloudCover'), propertyf('clouds', '', '%s %%'))
cp#2 count out 0
cp#3 concat input hfc 0 _cloudCover
$VAR1 = 'hfc';
$VAR2 = 0;
$VAR3 = '_cloudCover';
... eingekürzt

Der Vollständigkeit halber noch mein diff
--- "98_JsonMod 2.pm"   2023-04-14 15:12:51.507135923 +0200
+++ 98_JsonMod.pm       2023-04-14 15:12:51.507135923 +0200
@@ -284,7 +284,12 @@
        my sub concat {
                my @args = @_;
                my $result = '';
+
                print "cp#3 concat input @args\n";
+
+               use Data::Dumper;
+               print Dumper @args;
+
                foreach my $arg (@args) {
                        JsonMod_Logger($hash, 5, 'concat arg='.$arg);
                        $result .= $arg;
@@ -447,6 +452,10 @@
                                        foreach (@{$resultSet}) {
                                                $resultObject = $_;
                                                print "cp#1 $index $resultObject eval m2$args\n";
+
+                                               use Data::Dumper;
+                                               print Dumper $index;
+
                                                eval 'm2'.$args; warn $@ if $@;
                                        };
                                };
Raspi3 - im wesentlichen mit Phoscon, HomeMatic ( aktuell über debmatic), CUL, BOSE-ST und Alexa (Connector)