[{"id":"c3371390eabe669c","type":"inject","z":"5a1cda5786c898fd","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"600","crontab":"","once":true,"onceDelay":"10","topic":"","payload":"","payloadType":"date","x":130,"y":140,"wires":[["5c0fb1bb4c2c89c6"]]},{"id":"86591119aade73c4","type":"split","z":"5a1cda5786c898fd","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":730,"y":140,"wires":[["7cd67530d6f639b6"]]},{"id":"fc6391e48d58f714","type":"change","z":"5a1cda5786c898fd","name":"Rain Max / Av","rules":[{"t":"set","p":"avrain","pt":"global","to":"$average(**.rain_live)","tot":"jsonata"},{"t":"set","p":"maxrain","pt":"global","to":"$max(**.rain_live)","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":660,"y":220,"wires":[[]]},{"id":"fb5e4e795c087039","type":"comment","z":"5a1cda5786c898fd","name":"Netatmo: Regensensoren anderer Nutzer auslesen","info":"","x":270,"y":80,"wires":[]},{"id":"7cd67530d6f639b6","type":"debug","z":"5a1cda5786c898fd","name":"Alle Stationen","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":900,"y":140,"wires":[]},{"id":"abf7e4805c686ad3","type":"http request","z":"5a1cda5786c898fd","name":"","method":"GET","ret":"obj","paytoqs":"ignore","url":"","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":415,"y":140,"wires":[["fc6391e48d58f714","bfbf22cc6e128a78"]],"l":false},{"id":"5c0fb1bb4c2c89c6","type":"function","z":"5a1cda5786c898fd","name":"get public data","func":"const access_token = global.get('NetatmoAccessToken')\nconst headers = {}\nconst types = [\"rain\"]\n//const types = [\"rain\", \"wind\"]\n\nheaders[\"Authorization\"] = `Bearer ${access_token}`\n\n// Koordinatenfenster in URL anpassen!!! \n// 48.xx -49.xx und 7.x - 8.x\n\nlet url = \"https://api.netatmo.com/api/getpublicdata?lat_ne=47.xx&lon_ne=7.x&lat_sw=49.xx&lon_sw=8.x&filter=true&required_data=rain\"\n\ntypes.forEach(type=>{\n url = `${url}&required=${type}`\n node.send({headers,url})\n})\n\n\nreturn null","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":300,"y":140,"wires":[["abf7e4805c686ad3"]]},{"id":"bfbf22cc6e128a78","type":"change","z":"5a1cda5786c898fd","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.body","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":570,"y":140,"wires":[["86591119aade73c4"]]}]