# Freebox os dashboard - charts
This flow is only a part from Freebox os dashboard, please go to the collection
Freebox os dashboard
Node-RED flows to manage your Freebox with a Raspberry Pi
Language
French only
Install
Node RED installation :
bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered)
Palette needed :
node-red-contrib-crypto-js-dynamic
node-red-dashboard
Command line installation :
cd ~/.nodered
npm install node-red-contrib-crypto-js-dynamic
npm install node-red-dashboard
#Features
- Reboot button
- Uplink and Downlink gauge speed
- Upload and Download chart
- xDSL gain chart
- xDSL protocol and modulation
- Uptime
- Synchronisation and connection state
- IPv4 and IPv6 display
- Temperatures and fan speed
- DHCP main informations
- Static and dynamic IP - Host tables
[{"id":"a838eb2cf0ea046c","type":"tab","label":"courbes","disabled":false,"info":""},{"id":"9cea69b54a4af3db","type":"http request","z":"a838eb2cf0ea046c","name":"post to freebox","method":"POST","ret":"obj","paytoqs":"ignore","url":"http://mafreebox.freebox.fr/api/v8/rrd/","tls":"","persist":false,"proxy":"","authType":"","x":420,"y":60,"wires":[["1e2fd79fc6885391","15704d664090d57d"]]},{"id":"1e2fd79fc6885391","type":"debug","z":"a838eb2cf0ea046c","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload.success","targetType":"msg","statusVal":"","statusType":"auto","x":640,"y":20,"wires":[]},{"id":"8ea889226277e7e7","type":"function","z":"a838eb2cf0ea046c","name":"\"db\": \"net\"","func":"msg.headers = {\n 'Content-Type':'application/json'\n \n};\nmsg.headers['X-Fbx-App-Auth'] = global.get(\"session_token\");\n\nmsg.payload = {\n \"db\": \"net\",\n //\"fields\": [ \"temp1\" ],\n \"precision\": 8\n};\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":240,"y":60,"wires":[["9cea69b54a4af3db","503c2e051c9e9f50"]]},{"id":"c0ae0f9cb2fe8a3e","type":"inject","z":"a838eb2cf0ea046c","name":"data","props":[{"p":"payload"}],"repeat":"20","crontab":"","once":true,"onceDelay":"1","topic":"","payloadType":"date","x":80,"y":60,"wires":[["8ea889226277e7e7"]]},{"id":"503c2e051c9e9f50","type":"debug","z":"a838eb2cf0ea046c","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":390,"y":100,"wires":[]},{"id":"6d4b06fe2d977234","type":"function","z":"a838eb2cf0ea046c","d":true,"name":"","func":"frbxdata = msg.payload.result.data;\nmsg.payload = [{\n\"series\": [\"bw_up\", \"bw_down\", \"rate_up\", \"rate_down\", \"vpn_rate_up\", \"vpn_rate_down\"],\n\"data\": [\n [], [], [], [], [], []\n],\n\"labels\": [\"\"]\n}];\nfor (let element of frbxdata) {\n time = element.time * 1000;\n msg.payload[0].data[0].push( { \"x\" : time , \"y\" : element.bw_up/1000000 } );\n msg.payload[0].data[1].push( { \"x\" : time , \"y\" : element.bw_down/1000000 } );\n msg.payload[0].data[2].push( { \"x\" : time , \"y\" : element.rate_up/1000000 } );\n msg.payload[0].data[3].push( { \"x\" : time , \"y\" : element.rate_down/1000000 } );\n msg.payload[0].data[4].push( { \"x\" : time , \"y\" : element.vpn_rate_up/1000000 } );\n msg.payload[0].data[5].push( { \"x\" : time , \"y\" : element.vpn_rate_down/1000000 } );\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":780,"y":60,"wires":[["8190ce8419239d6b","ce24db40d36747e7"]]},{"id":"8190ce8419239d6b","type":"debug","z":"a838eb2cf0ea046c","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":950,"y":20,"wires":[]},{"id":"ce24db40d36747e7","type":"ui_chart","z":"a838eb2cf0ea046c","d":true,"name":"","group":"4bb454ce062fd819","order":1,"width":"7","height":"5","label":"Vitesses (Mbps)","chartType":"line","legend":"true","xformat":"HH:mm","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":1,"removeOlderPoints":"10000","removeOlderUnit":"604800","cutout":0,"useOneColor":false,"useUTC":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"outputs":1,"useDifferentColor":false,"x":960,"y":60,"wires":[[]]},{"id":"15704d664090d57d","type":"switch","z":"a838eb2cf0ea046c","name":"","property":"payload.success","propertyType":"msg","rules":[{"t":"true"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":610,"y":60,"wires":[["6d4b06fe2d977234","0d529096dbf26986","d5cd7de1d7b80a06"],["5db676517e50f886"]]},{"id":"0d529096dbf26986","type":"function","z":"a838eb2cf0ea046c","name":"","func":"frbxdata = msg.payload.result.data;\nmsg.payload = [{\n\"series\": [\"Actuel\", \"Maximum\", \"VPN\"],\n\"data\": [\n [], [], []\n],\n\"labels\": [\"\"]\n}];\nfor (let element of frbxdata) {\n time = element.time * 1000;\n msg.payload[0].data[1].push( { \"x\" : time , \"y\" : element.bw_up/1000000 } );\n msg.payload[0].data[0].push( { \"x\" : time , \"y\" : element.rate_up/1000000 } );\n msg.payload[0].data[2].push( { \"x\" : time , \"y\" : element.vpn_rate_up/1000000 } );\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":780,"y":140,"wires":[["2aff7ab15078e15a"]]},{"id":"2aff7ab15078e15a","type":"ui_chart","z":"a838eb2cf0ea046c","name":"","group":"4bb454ce062fd819","order":3,"width":"0","height":"0","label":"Upload (Mbps)","chartType":"line","legend":"true","xformat":"HH:mm","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":1,"removeOlderPoints":"10000","removeOlderUnit":"604800","cutout":0,"useOneColor":false,"useUTC":false,"colors":["#d62728","#ff9896","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"outputs":1,"useDifferentColor":false,"x":960,"y":140,"wires":[[]]},{"id":"d5cd7de1d7b80a06","type":"function","z":"a838eb2cf0ea046c","name":"","func":"frbxdata = msg.payload.result.data;\nmsg.payload = [{\n\"series\": [\"Actuel\", \"Maximum\", \"VPN\"],\n\"data\": [\n [], [], []\n],\n\"labels\": [\"\"]\n}];\nfor (let element of frbxdata) {\n time = element.time * 1000;\n msg.payload[0].data[1].push( { \"x\" : time , \"y\" : element.bw_down/1000000 } );\n msg.payload[0].data[0].push( { \"x\" : time , \"y\" : element.rate_down/1000000 } );\n msg.payload[0].data[2].push( { \"x\" : time , \"y\" : element.vpn_rate_down/1000000 } );\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":780,"y":100,"wires":[["992ebc9e20f96963"]]},{"id":"992ebc9e20f96963","type":"ui_chart","z":"a838eb2cf0ea046c","name":"","group":"4bb454ce062fd819","order":2,"width":"0","height":"0","label":"Download (Mbps)","chartType":"line","legend":"true","xformat":"HH:mm","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":1,"removeOlderPoints":"10000","removeOlderUnit":"604800","cutout":0,"useOneColor":false,"useUTC":false,"colors":["#1f77b4","#aec7e8","#2ca02c","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"outputs":1,"useDifferentColor":false,"x":970,"y":100,"wires":[[]]},{"id":"24f7633781f818f6","type":"http request","z":"a838eb2cf0ea046c","name":"post to freebox","method":"POST","ret":"obj","paytoqs":"ignore","url":"http://mafreebox.freebox.fr/api/v8/rrd/","tls":"","persist":false,"proxy":"","authType":"","x":420,"y":280,"wires":[["8d4a0c0cd251409b","983724a5c92a6958"]]},{"id":"8d4a0c0cd251409b","type":"debug","z":"a838eb2cf0ea046c","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":610,"y":240,"wires":[]},{"id":"fea44ee5cdb2b892","type":"function","z":"a838eb2cf0ea046c","name":"\"db\": \"dsl\"","func":"msg.headers = {\n 'Content-Type':'application/json'\n \n};\nmsg.headers['X-Fbx-App-Auth'] = global.get(\"session_token\");\n\nmsg.payload = {\n \"db\": \"dsl\",\n //\"fields\": [ \"temp1\" ],\n \"precision\": 10\n};\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":240,"y":280,"wires":[["24f7633781f818f6","46ac8e14909901be"]]},{"id":"321e73225ef4f32b","type":"inject","z":"a838eb2cf0ea046c","name":"data","props":[{"p":"payload"}],"repeat":"20","crontab":"","once":true,"onceDelay":"1","topic":"","payloadType":"date","x":80,"y":280,"wires":[["fea44ee5cdb2b892"]]},{"id":"46ac8e14909901be","type":"debug","z":"a838eb2cf0ea046c","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":390,"y":320,"wires":[]},{"id":"f966f87187ff3735","type":"function","z":"a838eb2cf0ea046c","name":"","func":"frbxdata = msg.payload.result.data;\nmsg.payload = [{\n\"series\": [\"dsl upload signal/noise ratio\", \"dsl download signal/noise ratio\"],\n\"data\": [\n [], []\n],\n\"labels\": [\"\"]\n}];\nfor (let element of frbxdata) {\n time = element.time * 1000;\n msg.payload[0].data[0].push( { \"x\" : time , \"y\" : element.snr_up/100 } );\n msg.payload[0].data[1].push( { \"x\" : time , \"y\" : element.snr_down/100 } );\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":780,"y":280,"wires":[["501ca58a646f034d","797780bd89559510"]]},{"id":"501ca58a646f034d","type":"debug","z":"a838eb2cf0ea046c","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":950,"y":240,"wires":[]},{"id":"797780bd89559510","type":"ui_chart","z":"a838eb2cf0ea046c","name":"","group":"0a413baa56b6e7b6","order":4,"width":"0","height":"0","label":"Marge de bruit (dB)","chartType":"line","legend":"true","xformat":"HH:mm","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":1,"removeOlderPoints":"10000","removeOlderUnit":"604800","cutout":0,"useOneColor":false,"useUTC":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"outputs":1,"useDifferentColor":false,"x":970,"y":280,"wires":[[]]},{"id":"983724a5c92a6958","type":"switch","z":"a838eb2cf0ea046c","name":"","property":"payload.success","propertyType":"msg","rules":[{"t":"true"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":610,"y":280,"wires":[["f966f87187ff3735","ad5b055302bdb1f3"],["ce7055a089f5a123"]]},{"id":"ad5b055302bdb1f3","type":"function","z":"a838eb2cf0ea046c","d":true,"name":"","func":"frbxdata = msg.payload.result.data;\nmsg.payload = [{\n\"series\": [\"Upload\", \"Download\"],\n\"data\": [\n [], []\n],\n\"labels\": [\"\"]\n}];\nfor (let element of frbxdata) {\n time = element.time * 1000;\n msg.payload[0].data[0].push( { \"x\" : time , \"y\" : element.rate_up/10000 } );\n msg.payload[0].data[1].push( { \"x\" : time , \"y\" : element.rate_down/10000 } );\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":780,"y":320,"wires":[["bed7b3a501619bf9"]]},{"id":"bed7b3a501619bf9","type":"ui_chart","z":"a838eb2cf0ea046c","d":true,"name":"","group":"0a413baa56b6e7b6","order":4,"width":"7","height":"5","label":"Débit Max (Mbps)","chartType":"line","legend":"true","xformat":"HH:mm","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":1,"removeOlderPoints":"10000","removeOlderUnit":"604800","cutout":0,"useOneColor":false,"useUTC":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"outputs":1,"useDifferentColor":false,"x":970,"y":320,"wires":[[]]},{"id":"5db676517e50f886","type":"link out","z":"a838eb2cf0ea046c","name":"success false","links":["37179428002096c8"],"x":675,"y":160,"wires":[]},{"id":"ce7055a089f5a123","type":"link out","z":"a838eb2cf0ea046c","name":"success false","links":["37179428002096c8"],"x":675,"y":380,"wires":[]},{"id":"4bb454ce062fd819","type":"ui_group","name":"Courbes de débit","tab":"5c0ab36281749b90","order":2,"disp":true,"width":"7","collapse":true},{"id":"0a413baa56b6e7b6","type":"ui_group","name":"Courbes xDSL","tab":"5c0ab36281749b90","order":3,"disp":true,"width":"7","collapse":true},{"id":"5c0ab36281749b90","type":"ui_tab","name":"Home","icon":"network_check","order":1,"disabled":false,"hidden":false}]