Jsonmod - Probleme

Begonnen von guhu, 25 September 2020, 09:18:48

Vorheriges Thema - Nächstes Thema

guhu

Hallo, vielen Dank für das Modul Jsonmod, mit dem ich mich beschäftige derzeit. Leide tue mich mich damit etwas schwer, es wäre toll, wenn mir da jemand ein wenig auf die Sprünge helfen könnte.
Das Auslesen funktioniert soweit, jsonpath ist getestet, allerdings werden noch keine Readings abgelegt.
Ich komme nicht ganz klar mit den Meldungen im Logfile:
2020.09.25 09:12:28.250 5: HttpUtils url=https://api.komoot.de/v007/users/<user>/highlights/?sports=&saved=false&recommended=true&_embedded=bookmark&name=&hl=de&page=0&limit=1000
2020.09.25 09:12:28.267 4: IP: api.komoot.de -> 52.209.64.121
2020.09.25 09:12:28.407 5: HttpUtils request header:
GET /v007/users/<user>/highlights/?sports=&saved=false&recommended=true&_embedded=bookmark&name=&hl=de&page=0&limit=1000 HTTP/1.0
Host: api.komoot.de
User-Agent: fhem
Accept-Encoding: gzip,deflate

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

2020.09.25 09:12:29.394 4: https://api.komoot.de/v007/users/<user>/highlights/?sports=&saved=false&recommended=true&_embedded=bookmark&name=&hl=de&page=0&limit=1000: HTTP response code 200
2020.09.25 09:12:29.394 5: HttpUtils https://api.komoot.de/v007/users/<user>/highlights/?sports=&saved=false&recommended=true&_embedded=bookmark&name=&hl=de&page=0&limit=1000: Got data, length: 1617252
2020.09.25 09:12:29.394 5: HttpUtils response header:
HTTP/1.1 200 OK
Content-Type: application/hal+json;charset=UTF-8
Date: Fri, 25 Sep 2020 07:12:28 GMT
ETag: "0bbe021b5f4379ac34d22da8babe8b09a"
Server: Apache-Coyote/1.1
X-kmt-requestid: AQoACqAAAXTB-pOeAAAAAACbe3I
X-komoot-request-id: AQoACqAAAXTB-pOeAAAAAACbe3I
Content-Length: 1617252
Connection: Close
2020.09.25 09:12:29.395 4: [komootv3] api encoding is UTF-8, designated encoder is utf-8-strict


(user ist anonymisiert)
Was sagt mir die letzte Zeile? Ist das jetzt ein Problem oder nicht?
FHEM 5.9 auf Synology DS918+ (in Docker), HM-CFG-USB2 mit hmlan, HM-CC-RT-DN, HM-SEC-SC-2, nanoCUL,a-culfw,deCONZ,Brennenstuhl-Steckdosen,-FB
Module:ENIGMA2,SONOS,FRITZBOX,FB_CALLLIST,WDT_TIMER,VCONTROL300,WITHINGS

yersinia

#1
list vom device bitte

EDIT: mMn sehen die Meldungen unverdächtig aus, der verbose-level könnte auf 3 gesetzt werden, dann ist das Device nicht so geschwätzig imho.
viele Grüße, yersinia
----
FHEM 6.3 (SVN) on RPi 4B with RasPi OS Bullseye (perl 5.32.1) | 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

guhu

#2
Internals:
   API_LAST_RES 1601024401.06061
   API__LAST_MSG 200
   DEF        https://api.komoot.de/v007/users/<user>/highlights/?sports=&saved=false&recommended=true&_embedded=bookmark&name=&hl=de&page=0&limit=1000
   FUUID      5f6b875e-f33f-dad7-6d3c-4aabd3274c9031a6
   FVERSION   98_JsonMod.pm:0.226510/2020-08-23
   NAME       komootv3
   NEXT       2020-09-25 12:00:00
   NOTIFYDEV  global
   NR         191
   NTFY_ORDER 50-komootv3
   SOURCE     https://api.komoot.de/v007/users/<user>/highlights/?sports=&saved=false&recommended=true&_embedded=bookmark&name=&hl=de&page=0&limit=1000 (200)
   STATE      ???
   SVN        22651 2020-08-23 11:25:52 UTC
   TYPE       JsonMod
   CONFIG:
     IN_REQUEST 0
     SOURCE     https://api.komoot.de/v007/users/<user>/highlights/?sports=&saved=false&recommended=true&_embedded=bookmark&name=&hl=de&page=0&limit=1000
     SECRET:
   READINGS:
Attributes:
   readingList multi(jsonPath("\$..items[?(\@._embedded.creator.username=='<user>')]"), concat(property('id'), '_id'), property('id'))
   room       IT



Hier ein Beispiel:
[
   {
      "items" : [
         {
            "type" : "highlight_point",
            "name" : "Schöne alte Villa bei Laufenbacherhof",
            "sport" : "touringbicycle",
            "routable" : true,
            "distance" : 0,
            "categories" : [
               
            ],
            "flagged" : false,
            "_links" : {
               "self" : {
                  "href" : "https://api.komoot.de/v007/highlights/2663360"
               },
               "seasonality" : {
                  "href" : "https://api.komoot.de/v007/highlights/2663360/seasonality"
               },
               "tips" : {
                  "href" : "https://api.komoot.de/v007/highlights/2663360/tips/"
               },
               "images" : {
                  "href" : "https://api.komoot.de/v007/highlights/2663360/images/"
               },
               "recommenders" : {
                  "href" : "https://api.komoot.de/v007/highlights/2663360/recommenders/"
               },
               "creator" : {
                  "href" : "https://api.komoot.de/v007/users/user/profile_embedded"
               },
               "tours" : {
                  "href" : "https://api.komoot.de/v007/smart_tours/for_highlight/2663360/"
               },
               "bookmark" : {
                  "href" : "https://api.komoot.de/v007/highlights/2663360/bookmark/{username}",
                  "templated" : true
               },
               "recommendation" : {
                  "href" : "https://api.komoot.de/v007/highlights/2663360/recommendation/{username}",
                  "templated" : true
               },
               "seo_regions" : {
                  "href" : "https://api.komoot.de/v007/highlights/2663360/seo_regions/"
               },
               "content" : {
                  "href" : "https://api.komoot.de/v007/highlights/2663360/content"
               },
               "front_image" : {
                  "href" : "https://api.komoot.de/v007/highlights/2663360/images/22784449"
               }
            },
            "_embedded" : {
               "creator" : {
                  "username" : "user",
                  "avatar" : {
                     "src" : "https://d2exd72xrrp1s7.cloudfront.net/www/9r/9rajr54tp9xcypi4cjjrmip92noomzgf-uuser-full/165156e958c?width={width}&height={height}&crop={crop}",
                     "templated" : true,
                     "type" : "image/*"
                  },
                  "status" : "public",
                  "_links" : {
                     "self" : {
                        "href" : "https://api.komoot.de/v007/users/user/profile_embedded"
                     },
                     "relation" : {
                        "href" : "https://api.komoot.de/v007/users/{username}/relations/user",
                        "templated" : true
                     }
                  },
                  "display_name" : "Guido"
               },
               "front_image" : {
                  "id" : 22784449,
                  "src" : "https://d2exd72xrrp1s7.cloudfront.net/www/000/1k4/17/17eczvaokwqib7szcnpe8ohjf3iifdlt2-uhi22784449/0?width={width}&height={height}&crop={crop}",
                  "rating" : {
                     "up" : 0,
                     "down" : 0
                  },
                  "templated" : true,
                  "client_hash" : "990bd8638f81295fdd60c1fa87d1dceff00537e4b60f62ef614bd2905a20ab8d",
                  "type" : "image/*",
                  "_links" : {
                     "self" : {
                        "href" : "https://api.komoot.de/v007/highlights/2663360/images/22784449"
                     },
                     "creator" : {
                        "href" : "https://api.komoot.de/v007/users/user/profile_embedded"
                     },
                     "highlight" : {
                        "href" : "https://api.komoot.de/v007/highlights/2663360"
                     },
                     "rating" : {
                        "href" : "https://api.komoot.de/v007/highlights/2663360/images/22784449/rating/{username}",
                        "templated" : true
                     }
                  },
                  "_embedded" : {
                     "creator" : {
                        "username" : "user",
                        "avatar" : {
                           "src" : "https://d2exd72xrrp1s7.cloudfront.net/www/9r/9rajr54tp9xcypi4cjjrmip92noomzgf-uuser-full/165156e958c?width={width}&height={height}&crop={crop}",
                           "templated" : true,
                           "type" : "image/*"
                        },
                        "status" : "public",
                        "_links" : {
                           "self" : {
                              "href" : "https://api.komoot.de/v007/users/user/profile_embedded"
                           },
                           "relation" : {
                              "href" : "https://api.komoot.de/v007/users/{username}/relations/user",
                              "templated" : true
                           }
                        },
                        "display_name" : "Guido"
                     }
                  }
               }
            },
            "id" : 2663360,
            "created_at" : "2020-09-22T08:53:14.351Z",
            "changed_at" : "2020-09-22T08:53:14.363Z",
            "start_point" : {
               "lat" : 50.433113,
               "lng" : 6.85859,
               "alt" : 314
            },
            "mid_point" : {
               "lat" : 50.433113,
               "lng" : 6.85859,
               "alt" : 314
            },
            "end_point" : {
               "lat" : 50.433113,
               "lng" : 6.85859,
               "alt" : 314
            },
            "elevation_up" : 0,
            "elevation_down" : 0,
            "poor_quality" : true
         }
      ]
   },
   {
      "self" : {
         "href" : "https://api.komoot.de/v007/users/user/highlights/?sports=&saved=false&recommended=true&creator=user&name=&hl=de&page=0&limit=1"
      },
      "next" : {
         "href" : "https://api.komoot.de/v007/users/user/highlights/?sports=&saved=false&recommended=true&creator=user&name=&hl=de&page=1&limit=1"
      }
   },
   {
      "size" : 1,
      "totalElements" : 516,
      "totalPages" : 516,
      "number" : 0
   }
]


EDIT: verbose habe ich bewußt mal so hoch gesetzt, damit ich mir das im Detail mal anschauen kann.
FHEM 5.9 auf Synology DS918+ (in Docker), HM-CFG-USB2 mit hmlan, HM-CC-RT-DN, HM-SEC-SC-2, nanoCUL,a-culfw,deCONZ,Brennenstuhl-Steckdosen,-FB
Module:ENIGMA2,SONOS,FRITZBOX,FB_CALLLIST,WDT_TIMER,VCONTROL300,WITHINGS

yersinia

sieht unaufällig aus, ohne aber den JsonString zu kennen, wird es schwierig zu helfen. Vermutlich findet das JsonModul nichts.
multi(jsonPath("\$..items[?(\@._embedded.creator.username=='<user>')]"), concat(property('id'), '_id'), property('id'))

Eventuell kann ein Punkt
property('.id')[code]
schon Abhilfe schaffen.

Ansonsten: kopiere mal den JsonString von
[code]https://api.komoot.de/v007/users/<user>/highlights/?sports=&saved=false&recommended=true&_embedded=bookmark&name=&hl=de&page=0&limit=1000

hierein: https://jsonpath.curiousconcept.com

Und dann gib dort mal den JsonPath in die Befehlszeile und schau ob du Ergebnisse erhältst:
$..items
Bekommst du dann mehrere Ergebnisse zurück, die ein Element ._embedded.creator.username und .id enthalten?

In der Regel muss man sich langsam ran-iterieren.
viele Grüße, yersinia
----
FHEM 6.3 (SVN) on RPi 4B with RasPi OS Bullseye (perl 5.32.1) | 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

yersinia

id und _embedded.creator.username hängen zwei unter items, also doppelter punkt müsste es finden:
multi(jsonPath("\$..items[?(\@.._embedded.creator.username=='<user>')]"), concat(property('..id'), '_id'), property('..id'))
oder
multi(jsonPath("\$..items.[?(\@._embedded.creator.username=='<user>')]"), concat(property('..id'), '_id'), property('..id'))
viele Grüße, yersinia
----
FHEM 6.3 (SVN) on RPi 4B with RasPi OS Bullseye (perl 5.32.1) | 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

guhu

Vielen Dank, Leute! Werde mich dann mal mit den Hinweisen "ran-iterieren". Das bedeutet dann im Umkehrschluß, dass Ihr meint, dass dieser UTF-8 Hinweis kein Problem ist.
FHEM 5.9 auf Synology DS918+ (in Docker), HM-CFG-USB2 mit hmlan, HM-CC-RT-DN, HM-SEC-SC-2, nanoCUL,a-culfw,deCONZ,Brennenstuhl-Steckdosen,-FB
Module:ENIGMA2,SONOS,FRITZBOX,FB_CALLLIST,WDT_TIMER,VCONTROL300,WITHINGS

herrmannj

Zitat von: guhu am 25 September 2020, 12:10:52
Vielen Dank, Leute! Werde mich dann mal mit den Hinweisen "ran-iterieren". Das bedeutet dann im Umkehrschluß, dass Ihr meint, dass dieser UTF-8 Hinweis kein Problem ist.
Bestätigt!
2020.09.25 09:12:29.395 4: [komootv3] api encoding is UTF-8, designated encoder is utf-8-strict
Übersetzt:
die API liefert UTF-8 -> JsonMod wäht UTF-8 als Eingabe. Genauso so ist es normal & richtig.

guhu

erstaunlicherweise liefert der obige Parser https://jsonpath.curiousconcept.com/# nur Fehlermeldungen. Unter https://jsonpath.herokuapp.com/ klappt die Abfrage. Ich habe hier mal ein Beispiel-JSON.

Wenn ich auf Attribute zurückgreife, die einfache Strings sind, dann klappt alles, bspw:

$..items[?(@.id=="4711")]

Wenn ich auf Attributeaus einer Struktur zugreife, geht es nicht, dann meldet dieser Parser immer Fehler, egal was ich mache.

$..items[?(@._embedded.creator.username=="4711")]

Die Ausgabe hingegen geht:


$..items[?(@.type=="touringbicycle")]._embedded.creator.username

Offenbar liefert die Implementierung von jsonpath im Modul auch einen Fehler.



{"_embedded":{"items":[{"type":"highlight_point","name":"Schöne alte Villa bei Laufenbacherhof","sport":"touringbicycle","routable":true,"distance":0,"categories":[],"flagged":false,"_links":{"self":{"href":"https://api.komoot.de/v007/highlights/2663360"},"seasonality":{"href":"https://api.komoot.de/v007/highlights/2663360/seasonality"},"tips":{"href":"https://api.komoot.de/v007/highlights/2663360/tips/"},"images":{"href":"https://api.komoot.de/v007/highlights/2663360/images/"},"recommenders":{"href":"https://api.komoot.de/v007/highlights/2663360/recommenders/"},"creator":{"href":"https://api.komoot.de/v007/users/671427342383/profile_embedded"},"tours":{"href":"https://api.komoot.de/v007/smart_tours/for_highlight/2663360/"},"bookmark":{"href":"https://api.komoot.de/v007/highlights/2663360/bookmark/{username}","templated":true},"recommendation":{"href":"https://api.komoot.de/v007/highlights/2663360/recommendation/{username}","templated":true},"seo_regions":{"href":"https://api.komoot.de/v007/highlights/2663360/seo_regions/"},"content":{"href":"https://api.komoot.de/v007/highlights/2663360/content"},"front_image":{"href":"https://api.komoot.de/v007/highlights/2663360/images/22784449"}},"_embedded":{"creator":{"username":"671427342383","avatar":{"src":"https://d2exd72xrrp1s7.cloudfront.net/www/9r/9rajr54tp9xcypi4cjjrmip92noomzgf-u671427342383-full/165156e958c?width={width}&height={height}&crop={crop}","templated":true,"type":"image/*"},"status":"public","_links":{"self":{"href":"https://api.komoot.de/v007/users/671427342383/profile_embedded"},"relation":{"href":"https://api.komoot.de/v007/users/{username}/relations/671427342383","templated":true}},"display_name":"Guido"},"front_image":{"id":22784449,"src":"https://d2exd72xrrp1s7.cloudfront.net/www/000/1k4/17/17eczvaokwqib7szcnpe8ohjf3iifdlt2-uhi22784449/0?width={width}&height={height}&crop={crop}","rating":{"up":0,"down":0},"templated":true,"client_hash":"990bd8638f81295fdd60c1fa87d1dceff00537e4b60f62ef614bd2905a20ab8d","type":"image/*","_links":{"self":{"href":"https://api.komoot.de/v007/highlights/2663360/images/22784449"},"creator":{"href":"https://api.komoot.de/v007/users/671427342383/profile_embedded"},"highlight":{"href":"https://api.komoot.de/v007/highlights/2663360"},"rating":{"href":"https://api.komoot.de/v007/highlights/2663360/images/22784449/rating/{username}","templated":true}},"_embedded":{"creator":{"username":"671427342383","avatar":{"src":"https://d2exd72xrrp1s7.cloudfront.net/www/9r/9rajr54tp9xcypi4cjjrmip92noomzgf-u671427342383-full/165156e958c?width={width}&height={height}&crop={crop}","templated":true,"type":"image/*"},"status":"public","_links":{"self":{"href":"https://api.komoot.de/v007/users/671427342383/profile_embedded"},"relation":{"href":"https://api.komoot.de/v007/users/{username}/relations/671427342383","templated":true}},"display_name":"Guido"}}}},"id":2663360,"created_at":"2020-09-22T08:53:14.351Z","changed_at":"2020-09-22T08:53:14.363Z","start_point":{"lat":50.433113,"lng":6.85859,"alt":314},"mid_point":{"lat":50.433113,"lng":6.85859,"alt":314},"end_point":{"lat":50.433113,"lng":6.85859,"alt":314},"elevation_up":0,"elevation_down":0,"poor_quality":true}]},"_links":{"self":{"href":"https://api.komoot.de/v007/users/671427342383/highlights/?sports=&saved=false&recommended=true&_embedded=bookmark&name=&hl=de&page=0&limit=1"},"next":{"href":"https://api.komoot.de/v007/users/671427342383/highlights/?sports=&saved=false&recommended=true&_embedded=bookmark&name=&hl=de&page=1&limit=1"}},"page":{"size":1,"totalElements":516,"totalPages":516,"number":0}}
FHEM 5.9 auf Synology DS918+ (in Docker), HM-CFG-USB2 mit hmlan, HM-CC-RT-DN, HM-SEC-SC-2, nanoCUL,a-culfw,deCONZ,Brennenstuhl-Steckdosen,-FB
Module:ENIGMA2,SONOS,FRITZBOX,FB_CALLLIST,WDT_TIMER,VCONTROL300,WITHINGS

herrmannj

#8
ich nehme auch https://jsonpath.herokuapp.com/

Hilfreich bei völlig verquertem JSON ist es, dort als Ausgabe "Normalized path expressions" (JSONPath options) und als path "$..*" zu wählen. Dann wird die JSON einmal komplett durchstrukturiert (als path) ausgegeben und man blickt besser durch.

[
   "$['_embedded']",
   "$['_links']",
   "$['page']",
   "$['_embedded']['items']",
   "$['_embedded']['items'][0]",
   "$['_embedded']['items'][0]['type']",
   "$['_embedded']['items'][0]['name']",
   "$['_embedded']['items'][0]['sport']",
   "$['_embedded']['items'][0]['routable']",
   "$['_embedded']['items'][0]['distance']",
   "$['_embedded']['items'][0]['categories']",
   "$['_embedded']['items'][0]['flagged']",
   "$['_embedded']['items'][0]['_links']",
   "$['_embedded']['items'][0]['_embedded']",
   "$['_embedded']['items'][0]['id']",
   "$['_embedded']['items'][0]['created_at']",
   "$['_embedded']['items'][0]['changed_at']",
   "$['_embedded']['items'][0]['start_point']",
   "$['_embedded']['items'][0]['mid_point']",
   "$['_embedded']['items'][0]['end_point']",
   "$['_embedded']['items'][0]['elevation_up']",
   "$['_embedded']['items'][0]['elevation_down']",
   "$['_embedded']['items'][0]['poor_quality']",
   "$['_embedded']['items'][0]['_links']['self']",
   "$['_embedded']['items'][0]['_links']['seasonality']",
   "$['_embedded']['items'][0]['_links']['tips']",
   "$['_embedded']['items'][0]['_links']['images']",
   "$['_embedded']['items'][0]['_links']['recommenders']",
   "$['_embedded']['items'][0]['_links']['creator']",
   "$['_embedded']['items'][0]['_links']['tours']",
   "$['_embedded']['items'][0]['_links']['bookmark']",
   "$['_embedded']['items'][0]['_links']['recommendation']",
   "$['_embedded']['items'][0]['_links']['seo_regions']",
   "$['_embedded']['items'][0]['_links']['content']",
   "$['_embedded']['items'][0]['_links']['front_image']",
   "$['_embedded']['items'][0]['_links']['self']['href']",
   "$['_embedded']['items'][0]['_links']['seasonality']['href']",
   "$['_embedded']['items'][0]['_links']['tips']['href']",
   "$['_embedded']['items'][0]['_links']['images']['href']",
   "$['_embedded']['items'][0]['_links']['recommenders']['href']",
   "$['_embedded']['items'][0]['_links']['creator']['href']",
   "$['_embedded']['items'][0]['_links']['tours']['href']",
   "$['_embedded']['items'][0]['_links']['bookmark']['href']",
   "$['_embedded']['items'][0]['_links']['bookmark']['templated']",
   "$['_embedded']['items'][0]['_links']['recommendation']['href']",
   "$['_embedded']['items'][0]['_links']['recommendation']['templated']",
   "$['_embedded']['items'][0]['_links']['seo_regions']['href']",
   "$['_embedded']['items'][0]['_links']['content']['href']",
   "$['_embedded']['items'][0]['_links']['front_image']['href']",
   "$['_embedded']['items'][0]['_embedded']['creator']",
   "$['_embedded']['items'][0]['_embedded']['front_image']",
   "$['_embedded']['items'][0]['_embedded']['creator']['username']",
   "$['_embedded']['items'][0]['_embedded']['creator']['avatar']",
   "$['_embedded']['items'][0]['_embedded']['creator']['status']",
   "$['_embedded']['items'][0]['_embedded']['creator']['_links']",
   "$['_embedded']['items'][0]['_embedded']['creator']['display_name']",
   "$['_embedded']['items'][0]['_embedded']['creator']['avatar']['src']",
   "$['_embedded']['items'][0]['_embedded']['creator']['avatar']['templated']",
   "$['_embedded']['items'][0]['_embedded']['creator']['avatar']['type']",
   "$['_embedded']['items'][0]['_embedded']['creator']['_links']['self']",
   "$['_embedded']['items'][0]['_embedded']['creator']['_links']['relation']",
   "$['_embedded']['items'][0]['_embedded']['creator']['_links']['self']['href']",
   "$['_embedded']['items'][0]['_embedded']['creator']['_links']['relation']['href']",
   "$['_embedded']['items'][0]['_embedded']['creator']['_links']['relation']['templated']",
   "$['_embedded']['items'][0]['_embedded']['front_image']['id']",
   "$['_embedded']['items'][0]['_embedded']['front_image']['src']",
   "$['_embedded']['items'][0]['_embedded']['front_image']['rating']",
   "$['_embedded']['items'][0]['_embedded']['front_image']['templated']",
   "$['_embedded']['items'][0]['_embedded']['front_image']['client_hash']",
   "$['_embedded']['items'][0]['_embedded']['front_image']['type']",
   "$['_embedded']['items'][0]['_embedded']['front_image']['_links']",
   "$['_embedded']['items'][0]['_embedded']['front_image']['_embedded']",
   "$['_embedded']['items'][0]['_embedded']['front_image']['rating']['up']",
   "$['_embedded']['items'][0]['_embedded']['front_image']['rating']['down']",
   "$['_embedded']['items'][0]['_embedded']['front_image']['_links']['self']",
   "$['_embedded']['items'][0]['_embedded']['front_image']['_links']['creator']",
   "$['_embedded']['items'][0]['_embedded']['front_image']['_links']['highlight']",
   "$['_embedded']['items'][0]['_embedded']['front_image']['_links']['rating']",
   "$['_embedded']['items'][0]['_embedded']['front_image']['_links']['self']['href']",
   "$['_embedded']['items'][0]['_embedded']['front_image']['_links']['creator']['href']",
   "$['_embedded']['items'][0]['_embedded']['front_image']['_links']['highlight']['href']",
   "$['_embedded']['items'][0]['_embedded']['front_image']['_links']['rating']['href']",
   "$['_embedded']['items'][0]['_embedded']['front_image']['_links']['rating']['templated']",
   "$['_embedded']['items'][0]['_embedded']['front_image']['_embedded']['creator']",
   "$['_embedded']['items'][0]['_embedded']['front_image']['_embedded']['creator']['username']",
   "$['_embedded']['items'][0]['_embedded']['front_image']['_embedded']['creator']['avatar']",
   "$['_embedded']['items'][0]['_embedded']['front_image']['_embedded']['creator']['status']",
   "$['_embedded']['items'][0]['_embedded']['front_image']['_embedded']['creator']['_links']",
   "$['_embedded']['items'][0]['_embedded']['front_image']['_embedded']['creator']['display_name']",
   "$['_embedded']['items'][0]['_embedded']['front_image']['_embedded']['creator']['avatar']['src']",
   "$['_embedded']['items'][0]['_embedded']['front_image']['_embedded']['creator']['avatar']['templated']",
   "$['_embedded']['items'][0]['_embedded']['front_image']['_embedded']['creator']['avatar']['type']",
   "$['_embedded']['items'][0]['_embedded']['front_image']['_embedded']['creator']['_links']['self']",
   "$['_embedded']['items'][0]['_embedded']['front_image']['_embedded']['creator']['_links']['relation']",
   "$['_embedded']['items'][0]['_embedded']['front_image']['_embedded']['creator']['_links']['self']['href']",
   "$['_embedded']['items'][0]['_embedded']['front_image']['_embedded']['creator']['_links']['relation']['href']",
   "$['_embedded']['items'][0]['_embedded']['front_image']['_embedded']['creator']['_links']['relation']['templated']",
   "$['_embedded']['items'][0]['start_point']['lat']",
   "$['_embedded']['items'][0]['start_point']['lng']",
   "$['_embedded']['items'][0]['start_point']['alt']",
   "$['_embedded']['items'][0]['mid_point']['lat']",
   "$['_embedded']['items'][0]['mid_point']['lng']",
   "$['_embedded']['items'][0]['mid_point']['alt']",
   "$['_embedded']['items'][0]['end_point']['lat']",
   "$['_embedded']['items'][0]['end_point']['lng']",
   "$['_embedded']['items'][0]['end_point']['alt']",
   "$['_links']['self']",
   "$['_links']['next']",
   "$['_links']['self']['href']",
   "$['_links']['next']['href']",
   "$['page']['size']",
   "$['page']['totalElements']",
   "$['page']['totalPages']",
   "$['page']['number']"
]

guhu

Irgendwas ist da aber unterschiedlich.

Wenn ich das so habe:
multi(jsonPath("\$..items[*]"), concat(property('.id'), '_id'), property('.id'))
dann liefert mir jsonmod eine Liste mit Readings.
Wenn ich die einschränke wie folgt:
multi(jsonPath("\$..items[?(\@._embedded.creator.username=='671427342383')]"), concat(property('.id'), '_id'), property('.id'))
Bekomme ich nichts geliefert.
Allerdings hatte ich den jsonpath wiederum getestet mit  https://jsonpath.herokuapp.com/
Da bekomme ich das gewünschte Ergebnis.

FHEM 5.9 auf Synology DS918+ (in Docker), HM-CFG-USB2 mit hmlan, HM-CC-RT-DN, HM-SEC-SC-2, nanoCUL,a-culfw,deCONZ,Brennenstuhl-Steckdosen,-FB
Module:ENIGMA2,SONOS,FRITZBOX,FB_CALLLIST,WDT_TIMER,VCONTROL300,WITHINGS

yersinia

Du könntest die Escape-Sequenz noch tauschen:
multi(jsonPath('$..items[?(@._embedded.creator.username=="671427342383")]'), concat(property('.id'), '_id'), property('.id'))
Steht was im log?
viele Grüße, yersinia
----
FHEM 6.3 (SVN) on RPi 4B with RasPi OS Bullseye (perl 5.32.1) | 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

guhu

Gibt keinen Unterschied. Im Log steht nichts drin. Einfach nur keine Readings da.
FHEM 5.9 auf Synology DS918+ (in Docker), HM-CFG-USB2 mit hmlan, HM-CC-RT-DN, HM-SEC-SC-2, nanoCUL,a-culfw,deCONZ,Brennenstuhl-Steckdosen,-FB
Module:ENIGMA2,SONOS,FRITZBOX,FB_CALLLIST,WDT_TIMER,VCONTROL300,WITHINGS

guhu

PS: auch die normalisierte Form, die bei Jayway ein Ergebnis liefert, liefert nicht im Modul:
multi(jsonPath("\$['_embedded']['items'][\?(\@._embedded.creator.username=='671427342383')]"), concat(property('.id'), '_id'), property('.id'))
FHEM 5.9 auf Synology DS918+ (in Docker), HM-CFG-USB2 mit hmlan, HM-CC-RT-DN, HM-SEC-SC-2, nanoCUL,a-culfw,deCONZ,Brennenstuhl-Steckdosen,-FB
Module:ENIGMA2,SONOS,FRITZBOX,FB_CALLLIST,WDT_TIMER,VCONTROL300,WITHINGS

yersinia

Zitat von: guhu am 25 September 2020, 17:32:08
PS: auch die normalisierte Form, die bei Jayway ein Ergebnis liefert, liefert nicht im Modul:
Goessner ist der tab, nach dem du mMn schauen musst.

Normalisiert wäre mMn aber:
multi(jsonPath("\$['_embedded']['items'][\?(\@['_embedded']['creator']['username']=='671427342383')]"), concat(property('.id'), '_id'), property('.id'))
viele Grüße, yersinia
----
FHEM 6.3 (SVN) on RPi 4B with RasPi OS Bullseye (perl 5.32.1) | 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

guhu

Danke. Auch die Form bringt kein Ergebnis, der Tab Goessner hingegen bringt das erwartete Ergebnis.
Gibt es da einer bessere Möglichkeit des Debuggings? Das Ergebnis des Moduls scheint ja von dem der Webseite abzuweichen.
FHEM 5.9 auf Synology DS918+ (in Docker), HM-CFG-USB2 mit hmlan, HM-CC-RT-DN, HM-SEC-SC-2, nanoCUL,a-culfw,deCONZ,Brennenstuhl-Steckdosen,-FB
Module:ENIGMA2,SONOS,FRITZBOX,FB_CALLLIST,WDT_TIMER,VCONTROL300,WITHINGS