|
[{"id":"5286be59.669fe","type":"cron","z":"d290794c.e099a8","name":"Cronjob (Every Hour)","crontab":"0 */1 * * *","x":200,"y":100,"wires":[["8749a854.0cee38"]]},{"id":"8749a854.0cee38","type":"exec","z":"d290794c.e099a8","command":"/home/pi/Speedtest/speedtest-cli","addpay":false,"append":"","useSpawn":"","timer":"","name":"Call Speedtest-Cli","x":445.5,"y":101.66665649414062,"wires":[["d5973ebb.39e38"],[],[]]},{"id":"d5973ebb.39e38","type":"function","z":"d290794c.e099a8","name":"Data Preparation for File","func":"var content = msg.payload.split(\"\\n\");\nmsg.payload = JSON.stringify({\n \"Testserver\": content[2].match(/\\((.*?)\\)/)[1],\n \"Hosted by\": content[4],\n \"Download Speed Mbit/s\": parseFloat(content[6].split(\" \")[1]),\n \"Upload Speed Mbit/s\": parseFloat(content[8].split(\" \")[1]),\n \"Timestamp\": new Date()\n}) + \",\";\n\nreturn msg;","outputs":1,"noerr":0,"x":730,"y":100,"wires":[["b246a7b.dee2b58"]]},{"id":"b246a7b.dee2b58","type":"file","z":"d290794c.e099a8","name":"Store data (/home/pi/Speedtest/data.json)","filename":"/home/pi/Speedtest/data.json","appendNewline":true,"createDir":false,"overwriteFile":"false","x":1080,"y":100,"wires":[]}] |
thank you for pointing that out. I updated the readme