Freebox os dashboard - main informations

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":"62ab2e54e9993ac0","type":"tab","label":"infos","disabled":false,"info":""},{"id":"7392a0e4356bec8d","type":"http request","z":"62ab2e54e9993ac0","name":"","method":"GET","ret":"obj","paytoqs":"ignore","url":"http://mafreebox.freebox.fr/api/v8/system/","tls":"","persist":false,"proxy":"","authType":"","x":490,"y":40,"wires":[["94fda4c60500385d","16f9b2f26adf1d4d"]]},{"id":"73c63b1d3a6bceb8","type":"inject","z":"62ab2e54e9993ac0","name":"","props":[{"p":"payload"}],"repeat":"1","crontab":"","once":true,"onceDelay":"1","topic":"","payloadType":"date","x":110,"y":40,"wires":[["fe46d574a2d62bd8"]]},{"id":"94fda4c60500385d","type":"debug","z":"62ab2e54e9993ac0","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":650,"y":40,"wires":[]},{"id":"fe46d574a2d62bd8","type":"function","z":"62ab2e54e9993ac0","name":"set body","func":"msg = {};\nmsg.headers = {\n};\nmsg.headers['X-Fbx-App-Auth'] = global.get(\"session_token\");\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"msg.headers = {\n    'Content-Type':'application/json'\n    \n};\nmsg.headers['X-Fbx-App-Auth'] = global.get(\"session_token\");\nmsg.payload = {\n};\nreturn msg;","libs":[],"x":300,"y":40,"wires":[["7392a0e4356bec8d"]]},{"id":"b49cda07bac39877","type":"ui_text","z":"62ab2e54e9993ac0","group":"2075d3b014cdbb5f","order":2,"width":0,"height":0,"name":"","label":"allumée depuis :","format":"{{msg.payload.result.uptime}}","layout":"col-center","x":920,"y":140,"wires":[]},{"id":"16f9b2f26adf1d4d","type":"switch","z":"62ab2e54e9993ac0","name":"","property":"payload.success","propertyType":"msg","rules":[{"t":"else"},{"t":"true"}],"checkall":"true","repair":false,"outputs":2,"x":650,"y":80,"wires":[["ab71f09f658799c4"],["b49cda07bac39877","5ccba0a7bc9e2c84","9128d48a0cc299f8","54fe464fb45eb784","4fda6fcedfd64a5e","54fdfb7844066366","0eeed7da1e470ed7","5f4e232a5eb26ff7","f384162693e3b806","74f32615c9caee3c","0c85ebce89d82deb","76165064542e353b","10b86a92ac172dbe"]]},{"id":"5ccba0a7bc9e2c84","type":"switch","z":"62ab2e54e9993ac0","name":"","property":"payload.result.disk_status","propertyType":"msg","rules":[{"t":"eq","v":"not_detected","vt":"str"},{"t":"eq","v":"disabled","vt":"str"},{"t":"eq","v":"initializing","vt":"str"},{"t":"eq","v":"error","vt":"str"},{"t":"eq","v":"active","vt":"str"}],"checkall":"true","repair":false,"outputs":5,"x":890,"y":200,"wires":[["0c299bcff581ebb8"],["76fab8257e108ca8"],["14a29084a7ef49c1"],["d73c4432fb8fc19c"],["7acc6ed9f4b40c20"]]},{"id":"f635a907b46e6db9","type":"ui_text","z":"62ab2e54e9993ac0","group":"2075d3b014cdbb5f","order":3,"width":0,"height":0,"name":"","label":"disque dur","format":"{{msg.payload}}","layout":"row-spread","x":1290,"y":260,"wires":[]},{"id":"0c299bcff581ebb8","type":"change","z":"62ab2e54e9993ac0","name":"not_detected","rules":[{"t":"set","p":"payload","pt":"msg","to":"Le disque n'a pas été détecté","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1070,"y":180,"wires":[["f635a907b46e6db9"]]},{"id":"76fab8257e108ca8","type":"change","z":"62ab2e54e9993ac0","name":"disabled","rules":[{"t":"set","p":"payload","pt":"msg","to":"Le disque est désactivé","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1060,"y":220,"wires":[["f635a907b46e6db9"]]},{"id":"14a29084a7ef49c1","type":"change","z":"62ab2e54e9993ac0","name":"initializing","rules":[{"t":"set","p":"payload","pt":"msg","to":"Le disque s'initialise","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1060,"y":260,"wires":[["f635a907b46e6db9"]]},{"id":"d73c4432fb8fc19c","type":"change","z":"62ab2e54e9993ac0","name":"error","rules":[{"t":"set","p":"payload","pt":"msg","to":"Le disque n'a pas pu se monter","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1050,"y":300,"wires":[["f635a907b46e6db9"]]},{"id":"7acc6ed9f4b40c20","type":"change","z":"62ab2e54e9993ac0","name":"active","rules":[{"t":"set","p":"payload","pt":"msg","to":"Le disque est prêt","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1050,"y":340,"wires":[["f635a907b46e6db9"]]},{"id":"9128d48a0cc299f8","type":"debug","z":"62ab2e54e9993ac0","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload.result","targetType":"msg","statusVal":"","statusType":"auto","x":930,"y":100,"wires":[]},{"id":"ab71f09f658799c4","type":"link out","z":"62ab2e54e9993ac0","name":"success false","links":["37179428002096c8"],"x":795,"y":60,"wires":[]},{"id":"54fe464fb45eb784","type":"ui_text","z":"62ab2e54e9993ac0","group":"2075d3b014cdbb5f","order":4,"width":0,"height":0,"name":"","label":"partition principale","format":"{{msg.payload.result.user_main_storage}}","layout":"row-spread","x":930,"y":380,"wires":[]},{"id":"4fda6fcedfd64a5e","type":"ui_text","z":"62ab2e54e9993ac0","group":"2075d3b014cdbb5f","order":1,"width":0,"height":0,"name":"","label":"Nom","format":"{{msg.payload.result .model_info.pretty_name}}","layout":"row-spread","x":870,"y":420,"wires":[]},{"id":"54fdfb7844066366","type":"ui_text","z":"62ab2e54e9993ac0","group":"2075d3b014cdbb5f","order":4,"width":0,"height":0,"name":"","label":"N° série","format":"{{msg.payload.result.serial}}","layout":"row-spread","x":860,"y":460,"wires":[]},{"id":"0eeed7da1e470ed7","type":"ui_text","z":"62ab2e54e9993ac0","group":"2075d3b014cdbb5f","order":4,"width":0,"height":0,"name":"","label":"adresse mac","format":"{{msg.payload.result .mac}}","layout":"row-spread","x":850,"y":500,"wires":[]},{"id":"5f4e232a5eb26ff7","type":"ui_text","z":"62ab2e54e9993ac0","group":"2075d3b014cdbb5f","order":4,"width":0,"height":0,"name":"","label":"Firmware","format":"{{msg.payload.result.firmware_version}}","layout":"row-spread","x":820,"y":540,"wires":[]},{"id":"f384162693e3b806","type":"ui_gauge","z":"62ab2e54e9993ac0","name":"","group":"8641f24d830c936b","order":3,"width":"3","height":"3","gtype":"gage","title":"Température 2","label":"°C","format":"{{msg.payload.result.sensors[0].value}}","min":"30","max":"100","colors":["#00b500","#e6e600","#ca3838"],"seg1":"60","seg2":"80","x":820,"y":580,"wires":[]},{"id":"74f32615c9caee3c","type":"ui_gauge","z":"62ab2e54e9993ac0","name":"","group":"8641f24d830c936b","order":1,"width":"3","height":"3","gtype":"gage","title":"Température 1","label":"°C","format":"{{msg.payload.result.sensors[1].value}}","min":"30","max":"100","colors":["#00b500","#e6e600","#ca3838"],"seg1":"60","seg2":"80","x":800,"y":620,"wires":[]},{"id":"0c85ebce89d82deb","type":"ui_gauge","z":"62ab2e54e9993ac0","name":"","group":"8641f24d830c936b","order":4,"width":"3","height":"3","gtype":"gage","title":"Température CPU B","label":"°C","format":"{{msg.payload.result.sensors[2].value}}","min":"30","max":"100","colors":["#00b500","#e6e600","#ca3838"],"seg1":"60","seg2":"80","x":800,"y":660,"wires":[]},{"id":"76165064542e353b","type":"ui_gauge","z":"62ab2e54e9993ac0","name":"","group":"8641f24d830c936b","order":6,"width":"4","height":"3","gtype":"gage","title":"Ventilateur","label":"RPM","format":"{{msg.payload.result.fans[0].value}}","min":"0","max":"2000","colors":["#00b500","#e6e600","#ca3838"],"seg1":"1500","seg2":"1950","x":750,"y":700,"wires":[]},{"id":"f18354bb7fcb1f5c","type":"ui_text","z":"62ab2e54e9993ac0","group":"2075d3b014cdbb5f","order":4,"width":0,"height":0,"name":"","label":"Synchronisation","format":"<font color= {{msg.color}} > {{msg.payload}} </font>","layout":"row-spread","x":1280,"y":800,"wires":[]},{"id":"d898c516b5e698a8","type":"change","z":"62ab2e54e9993ac0","name":"synchronisée","rules":[{"t":"set","p":"payload","pt":"msg","to":"synchronisée","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":870,"y":740,"wires":[["4ef8c42f29854f02"]]},{"id":"10b86a92ac172dbe","type":"switch","z":"62ab2e54e9993ac0","name":"","property":"payload.result.box_authenticated","propertyType":"msg","rules":[{"t":"true"},{"t":"false"},{"t":"else"}],"checkall":"true","repair":false,"outputs":3,"x":690,"y":780,"wires":[["d898c516b5e698a8"],["5e95407cb15428de"],["4ef8c42f29854f02"]]},{"id":"5e95407cb15428de","type":"change","z":"62ab2e54e9993ac0","name":"désynchronisée","rules":[{"t":"set","p":"payload","pt":"msg","to":"désynchronisée","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":880,"y":780,"wires":[["4ef8c42f29854f02"]]},{"id":"4ef8c42f29854f02","type":"function","z":"62ab2e54e9993ac0","name":"Color Mapping","func":"switch (msg.payload) {\n\ncase \"synchronisée\" : \n    msg.color = \"lime\";\n    break;\ndefault : \n    msg.color = \"red\";\n    break;\n}\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1080,"y":800,"wires":[["f18354bb7fcb1f5c"]]},{"id":"2075d3b014cdbb5f","type":"ui_group","name":"Infos générales","tab":"5c0ab36281749b90","order":4,"disp":true,"width":"7","collapse":true},{"id":"8641f24d830c936b","type":"ui_group","name":"Températures","tab":"5c0ab36281749b90","order":6,"disp":true,"width":"7","collapse":false},{"id":"5c0ab36281749b90","type":"ui_tab","name":"Home","icon":"network_check","order":1,"disabled":false,"hidden":false}]

Collection Info

Flow Info

Created 4 years ago
Rating: not yet rated

Owner

Actions

Rate:

Node Types

Core
  • change (x7)
  • debug (x2)
  • function (x2)
  • http request (x1)
  • inject (x1)
  • link out (x1)
  • switch (x3)
Other
  • tab (x1)
  • ui_gauge (x4)
  • ui_group (x2)
  • ui_tab (x1)
  • ui_text (x8)

Tags

  • Freebox
  • FreeboxOS
  • API
  • Free
Copy this flow JSON to your clipboard and then import into Node-RED using the Import From > Clipboard (Ctrl-I) menu option