-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathISP_humidity.json
1 lines (1 loc) · 2.93 KB
/
ISP_humidity.json
1
[{"id":"36cae780.e7b9e","type":"tab","label":"ISP_speed","disabled":false,"info":""},{"id":"b8e54117.5e0198","type":"http in","z":"36cae780.e7b9e","name":"","url":"/isp","method":"get","upload":false,"swaggerDoc":"","x":120,"y":280,"wires":[["5d1ac61c.f68ef8"]]},{"id":"8b9bb76b.1cb18","type":"http response","z":"36cae780.e7b9e","name":"","x":550,"y":280,"wires":[]},{"id":"5d1ac61c.f68ef8","type":"function","z":"36cae780.e7b9e","name":"global.get('internetDownload')","func":"// Internet speed in % versus purchased speed\n\nconst internetDownloadPurchased = 30;\nvar internetDownload = parseInt(global.get('internetDownload')) || 0;\n\nmsg.payload = internetDownload/internetDownloadPurchased*100;\n\nreturn msg;","outputs":1,"noerr":0,"x":330,"y":280,"wires":[["8b9bb76b.1cb18"]]},{"id":"9039a9ed.6cf798","type":"comment","z":"36cae780.e7b9e","name":"Endpoint, http://home:1880/isp","info":"","x":190,"y":240,"wires":[]},{"id":"caf64a9d.5da0e","type":"exec","z":"36cae780.e7b9e","command":"bash /usr/local/sbin/speedtest.sh","addpay":false,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"Run speedtest.sh","x":310,"y":120,"wires":[["4d0c66f4.a9d8c"],[],[]]},{"id":"4d0c66f4.a9d8c","type":"csv","z":"36cae780.e7b9e","name":"CSV to Java object","sep":",","hdrin":"","hdrout":"","multi":"one","ret":"\\n","temp":"Date, Time, Ping, Download, Upload","skip":"0","x":510,"y":120,"wires":[["e72a8d0a.90e8e8"]]},{"id":"e72a8d0a.90e8e8","type":"function","z":"36cae780.e7b9e","name":"Get speed Down/Up","func":"\nvar msg0 = {};\nmsg0.payload = msg.payload.Download;\nmsg0.topic = \"Download\";\n\nglobal.set('internetDownload', msg.payload.Download);\n\nvar msg1 = {};\nmsg1.payload = msg.payload.Upload;\nmsg1.topic = \"Upload\";\n\nreturn [msg0, msg1];","outputs":2,"noerr":0,"x":160,"y":180,"wires":[["13e98c5d.10b61c"],["13e98c5d.10b61c"]]},{"id":"13e98c5d.10b61c","type":"ui_chart","z":"36cae780.e7b9e","name":"","group":"f97fdd68.15b31","order":1,"width":"12","height":"6","label":"Broadband Speed","chartType":"line","legend":"false","xformat":"HH:mm","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":"24","removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"colors":["#ff2600","#00f900","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"outputs":1,"x":510,"y":180,"wires":[[]],"outputLabels":["Snitt vind"]},{"id":"11061167.e2223f","type":"inject","z":"36cae780.e7b9e","name":"","topic":"","payload":"","payloadType":"date","repeat":"1200","crontab":"","once":true,"onceDelay":0.1,"x":130,"y":120,"wires":[["caf64a9d.5da0e"]]},{"id":"41affe02.d89dc8","type":"comment","z":"36cae780.e7b9e","name":"Get ISP data","info":"","x":130,"y":60,"wires":[]},{"id":"f97fdd68.15b31","type":"ui_group","z":"","name":"Speed","tab":"fabdbd2e.bd556","order":1,"disp":false,"width":"12","collapse":false},{"id":"fabdbd2e.bd556","type":"ui_tab","z":"","name":"Broadband","icon":"dashboard","order":2}]