Mikrotik Dashboard

Show mikrotik status using mikronode API and dashboard ui. Requiere configure with your mtk credentials (hotsname, user and pass)

The flow has function to format data and send it to IoT Platform for future.

[{"id":"abee3ed3.de95f8","type":"subflow","name":"Loop10s","info":"","in":[{"x":230,"y":44,"wires":[{"id":"c617709.749e89"}]}],"out":[{"x":620,"y":46,"wires":[{"id":"c617709.749e89","port":0}]}]},{"id":"c617709.749e89","type":"function","z":"abee3ed3.de95f8","name":"loop","func":"// Loop function\n// Top output provides triger for next actions\n// Botton output should be connected to the input through a dealy\n// The msg.payload can consis one of actions: start, stop, toggle\n// Other content is ignored\n// On the outoput the msg.payload contains current loop state\n\ncontext.loop = context.loop || \"stop\";\ncontext.loops = context.loops || 0;\n\n//console.log(\"topic :\" + msg.topic);\n//console.log(\"loop  :\" + context.loop);\n//console.log(\"loops :\" + context.loops);\n//console.log(\"action:\" + msg.payload);\n\nswitch (msg.payload) {\n\tcase \"stop\":\n\t\tcontext.loops = context.loops + 1;\n\t\tmsg.payload = \"stopped\";\n\t\tcontext.loop = \"stop\";\n\t\treturn [msg,null];\n\tcase \"toggle\":\n\t\tif (context.loop == \"start\") {\n\t\t\tmsg.payload = \"stopped\";\n\t\t\tcontext.loop = \"stop\";\n\t\t\treturn [msg,null];\n\t\t} else {\n\t\t\tmsg.payload = \"started\";\n\t\t\tcontext.loop = \"loop\";\n\t\t\tcontext.loops = 1;\n\t\t\treturn [msg,msg];\n\t\t}\n\t\tbreak;\n\tcase \"start\":\n\t\tmsg.payload = \"started\";\n\t\tcontext.loop = \"loop\";\n\t\tcontext.loops = 1;\n\t\treturn [msg,msg];\n\tdefault:\n\t\tif (context.loop == \"loop\") {\n\t\t\tcontext.loops = context.loops + 1;\n\t\t\tmsg.payload = \"loop:\" + context.loops;\n\t\t\treturn [msg,msg];\n\t\t} else {\n\t\t\treturn [null,null]; \n\t\t}\n}","outputs":"2","noerr":0,"x":471,"y":150,"wires":[[],["b9e7b35d.68c15"]]},{"id":"b9e7b35d.68c15","type":"delay","z":"abee3ed3.de95f8","name":"","pauseType":"delay","timeout":"10","timeoutUnits":"seconds","rate":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":480.9999771118164,"y":284.14285469055176,"wires":[["c617709.749e89"]]},{"id":"3992796e.da9e9e","type":"debug","z":"abee3ed3.de95f8","name":"","active":true,"console":"false","complete":"false","x":659.9999771118164,"y":152.14285469055176,"wires":[]},{"id":"31c0cdb0.36f3fa","type":"inject","z":"abee3ed3.de95f8","name":"start loop 2","topic":"loop2","payload":"start","payloadType":"str","repeat":"","crontab":"","once":false,"x":248.9999771118164,"y":122.14285469055176,"wires":[["c617709.749e89"]]},{"id":"40493740.0bbe18","type":"inject","z":"abee3ed3.de95f8","name":"stop loop 2","topic":"loop2","payload":"stop","payloadType":"str","repeat":"","crontab":"","once":false,"x":250.9999771118164,"y":198.14285469055176,"wires":[["c617709.749e89"]]},{"id":"480a64c6.2865c4","type":"subflow","name":"Loop60s","info":"","in":[{"x":253.33332061767578,"y":58.33333396911621,"wires":[{"id":"363059a2.458fe6"}]}],"out":[{"x":589.9999389648438,"y":48.33333206176758,"wires":[{"id":"363059a2.458fe6","port":0}]}]},{"id":"363059a2.458fe6","type":"function","z":"480a64c6.2865c4","name":"loop","func":"// Loop function\n// Top output provides triger for next actions\n// Botton output should be connected to the input through a dealy\n// The msg.payload can consis one of actions: start, stop, toggle\n// Other content is ignored\n// On the outoput the msg.payload contains current loop state\n\ncontext.loop = context.loop || \"stop\";\ncontext.loops = context.loops || 0;\n\n//console.log(\"topic :\" + msg.topic);\n//console.log(\"loop  :\" + context.loop);\n//console.log(\"loops :\" + context.loops);\n//console.log(\"action:\" + msg.payload);\n\nswitch (msg.payload) {\n\tcase \"stop\":\n\t\tcontext.loops = context.loops + 1;\n\t\tmsg.payload = \"stopped\";\n\t\tcontext.loop = \"stop\";\n\t\treturn [msg,null];\n\tcase \"toggle\":\n\t\tif (context.loop == \"start\") {\n\t\t\tmsg.payload = \"stopped\";\n\t\t\tcontext.loop = \"stop\";\n\t\t\treturn [msg,null];\n\t\t} else {\n\t\t\tmsg.payload = \"started\";\n\t\t\tcontext.loop = \"loop\";\n\t\t\tcontext.loops = 1;\n\t\t\treturn [msg,msg];\n\t\t}\n\t\tbreak;\n\tcase \"start\":\n\t\tmsg.payload = \"started\";\n\t\tcontext.loop = \"loop\";\n\t\tcontext.loops = 1;\n\t\treturn [msg,msg];\n\tdefault:\n\t\tif (context.loop == \"loop\") {\n\t\t\tcontext.loops = context.loops + 1;\n\t\t\tmsg.payload = \"loop:\" + context.loops;\n\t\t\treturn [msg,msg];\n\t\t} else {\n\t\t\treturn [null,null]; \n\t\t}\n}","outputs":"2","noerr":0,"x":408.33331298828125,"y":156.66665649414062,"wires":[[],["d6a4fbad.324338"]]},{"id":"d6a4fbad.324338","type":"delay","z":"480a64c6.2865c4","name":"","pauseType":"delay","timeout":"60","timeoutUnits":"seconds","rate":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":418.33329010009766,"y":290.8095111846924,"wires":[["363059a2.458fe6"]]},{"id":"6f532be0.395894","type":"debug","z":"480a64c6.2865c4","name":"","active":true,"console":"false","complete":"false","x":597.3332901000977,"y":158.80951118469238,"wires":[]},{"id":"c088b152.7660b","type":"inject","z":"480a64c6.2865c4","name":"start loop 2","topic":"loop2","payload":"start","payloadType":"str","repeat":"","crontab":"","once":false,"x":186.33329010009766,"y":128.80951118469238,"wires":[["363059a2.458fe6"]]},{"id":"5f6d1c7a.f5774c","type":"inject","z":"480a64c6.2865c4","name":"stop loop 2","topic":"loop2","payload":"stop","payloadType":"str","repeat":"","crontab":"","once":false,"x":188.33329010009766,"y":204.80951118469238,"wires":[["363059a2.458fe6"]]},{"id":"d8e682fd.92783","type":"subflow","name":"Loop3s","info":"","in":[{"x":260,"y":70,"wires":[{"id":"3659dff0.2bd6"}]}],"out":[{"x":543,"y":50,"wires":[{"id":"3659dff0.2bd6","port":0}]}]},{"id":"3659dff0.2bd6","type":"function","z":"d8e682fd.92783","name":"loop","func":"// Loop function\n// Top output provides triger for next actions\n// Botton output should be connected to the input through a dealy\n// The msg.payload can consis one of actions: start, stop, toggle\n// Other content is ignored\n// On the outoput the msg.payload contains current loop state\n\ncontext.loop = context.loop || \"stop\";\ncontext.loops = context.loops || 0;\n\n//console.log(\"topic :\" + msg.topic);\n//console.log(\"loop  :\" + context.loop);\n//console.log(\"loops :\" + context.loops);\n//console.log(\"action:\" + msg.payload);\n\nswitch (msg.payload) {\n\tcase \"stop\":\n\t\tcontext.loops = context.loops + 1;\n\t\tmsg.payload = \"stopped\";\n\t\tcontext.loop = \"stop\";\n\t\treturn [msg,null];\n\tcase \"toggle\":\n\t\tif (context.loop == \"start\") {\n\t\t\tmsg.payload = \"stopped\";\n\t\t\tcontext.loop = \"stop\";\n\t\t\treturn [msg,null];\n\t\t} else {\n\t\t\tmsg.payload = \"started\";\n\t\t\tcontext.loop = \"loop\";\n\t\t\tcontext.loops = 1;\n\t\t\treturn [msg,msg];\n\t\t}\n\t\tbreak;\n\tcase \"start\":\n\t\tmsg.payload = \"started\";\n\t\tcontext.loop = \"loop\";\n\t\tcontext.loops = 1;\n\t\treturn [msg,msg];\n\tdefault:\n\t\tif (context.loop == \"loop\") {\n\t\t\tcontext.loops = context.loops + 1;\n\t\t\tmsg.payload = \"loop:\" + context.loops;\n\t\t\treturn [msg,msg];\n\t\t} else {\n\t\t\treturn [null,null]; \n\t\t}\n}","outputs":"2","noerr":0,"x":417.0000228881836,"y":168.85714530944824,"wires":[[],["1b6f0c3b.440494"]]},{"id":"1b6f0c3b.440494","type":"delay","z":"d8e682fd.92783","name":"","pauseType":"delay","timeout":"3","timeoutUnits":"seconds","rate":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":417,"y":303,"wires":[["3659dff0.2bd6"]]},{"id":"db40abb7.a1c328","type":"debug","z":"d8e682fd.92783","name":"","active":true,"console":"false","complete":"false","x":606,"y":171,"wires":[]},{"id":"60362fbb.522a5","type":"inject","z":"d8e682fd.92783","name":"start loop 2","topic":"loop2","payload":"start","payloadType":"str","repeat":"","crontab":"","once":false,"x":195,"y":141,"wires":[["3659dff0.2bd6"]]},{"id":"6941303c.4896e","type":"inject","z":"d8e682fd.92783","name":"stop loop 2","topic":"loop2","payload":"stop","payloadType":"str","repeat":"","crontab":"","once":false,"x":197,"y":217,"wires":[["3659dff0.2bd6"]]},{"id":"ed0ca72e.2817a8","type":"tab","label":"Mikrotik Dashboard"},{"id":"64859918.b4071","type":"inject","z":"ed0ca72e.2817a8","name":"input for debug","topic":"ccq","payload":"/interface/wireless/registration-table/print","payloadType":"str","repeat":"","crontab":"","once":false,"x":331,"y":64.67083358764648,"wires":[["37cc2746.b71c"]]},{"id":"ba3a2124.e52d78","type":"ui_gauge","z":"ed0ca72e.2817a8","name":"Rx","group":"89585401.f564d8","order":1,"width":"3","height":"3","gtype":"donut","title":"Rx","label":"","format":"{{value}}%","min":"0","max":"100","x":1193.4204483032227,"y":20.305639266967773,"wires":[]},{"id":"eaa64bce.f1449","type":"function","z":"ed0ca72e.2817a8","name":"value rx-ccq","func":"var valor = msg.payload.d[\"rx-ccq\"];\nmsg.payload = valor;\nmsg.topic = \"Rx\"\nreturn msg;","outputs":1,"noerr":0,"x":1032.8650512695312,"y":20,"wires":[["ba3a2124.e52d78","d19b021e.52fc88"]]},{"id":"6e0009ac.d5cec8","type":"function","z":"ed0ca72e.2817a8","name":"value tx-ccq","func":"var valor = msg.payload.d[\"tx-ccq\"];\nmsg.payload = valor;\nmsg.topic = \"Tx\";\nreturn msg;","outputs":1,"noerr":0,"x":1030.5872802734375,"y":87.76862907409668,"wires":[["6d26212d.881b1","d19b021e.52fc88"]]},{"id":"6d26212d.881b1","type":"ui_gauge","z":"ed0ca72e.2817a8","name":"Tx","group":"89585401.f564d8","order":2,"width":"3","height":"3","gtype":"donut","title":"Tx","label":"","format":"{{value}}%","min":0,"max":"100","x":1198.6427764892578,"y":100.26873397827148,"wires":[]},{"id":"37cc2746.b71c","type":"mikrotik","z":"ed0ca72e.2817a8","device":"","name":"mtk","action":"9","x":404.9788932800293,"y":298.72104263305664,"wires":[["63217e9d.d1e5a"]]},{"id":"63217e9d.d1e5a","type":"function","z":"ed0ca72e.2817a8","name":"adapta iot","func":"var newMsg = { d: msg.payload[0] };\nmsg.payload = newMsg;\nreturn msg;","outputs":"1","noerr":0,"x":552.7567100524902,"y":298.7210626602173,"wires":[["eaa64bce.f1449","6e0009ac.d5cec8","1fa2158b.4c144a","ff7c6a47.526","5d5a7689.426728","c0bf990c.7110b8","f4ce7df9.588508","845deade.e6248","8bfb71cc.93c38","c3f15fe5.325238","2d66c3e5.8a7df4","e1507684.512ab"]]},{"id":"d19b021e.52fc88","type":"ui_chart","z":"ed0ca72e.2817a8","name":"CCQ linear","group":"89585401.f564d8","order":3,"width":"","height":"","label":"CCQ Evol","interpolate":"linear","nodata":"No Data","ymin":"","ymax":"","removeOlder":1,"removeOlderUnit":"3600","x":1214.3452911376953,"y":58.64693832397461,"wires":[[],[]]},{"id":"ff7c6a47.526","type":"function","z":"ed0ca72e.2817a8","name":"value tx-signal-strength","func":"var valor = msg.payload.d[\"tx-signal-strength\"];\nmsg.payload = valor;\nmsg.topic = \"Tx\"\nreturn msg;","outputs":1,"noerr":0,"x":1000.1904373168945,"y":158.0993595123291,"wires":[["c6ab3674.e90298","5be76a5e.d332d4"]]},{"id":"1fa2158b.4c144a","type":"debug","z":"ed0ca72e.2817a8","name":"output for debug","active":true,"console":"false","complete":"payload","x":659.4045791625977,"y":63.194541931152344,"wires":[]},{"id":"c6ab3674.e90298","type":"ui_gauge","z":"ed0ca72e.2817a8","name":"Tx","group":"358444a8.536014","order":2,"width":"3","height":"3","gtype":"gage","title":"Tx","label":"","format":"{{value}}","min":"-100","max":"0","x":1197.5565338134766,"y":157.90591049194336,"wires":[]},{"id":"6c12b6b1.633","type":"ui_gauge","z":"ed0ca72e.2817a8","name":"Rx","group":"358444a8.536014","order":1,"width":"3","height":"3","gtype":"gage","title":"Rx","label":"","format":"{{value}}","min":"-100","max":"0","x":1195.0565338134766,"y":250.40595626831055,"wires":[]},{"id":"5d5a7689.426728","type":"function","z":"ed0ca72e.2817a8","name":"value rx-signal-strength","func":"var valor = msg.payload.d[\"signal-strength\"];\nmsg.payload = valor;\nmsg.topic = \"Rx\"\nreturn msg;","outputs":1,"noerr":0,"x":1000.0565338134766,"y":207.90592575073242,"wires":[["6c12b6b1.633","5be76a5e.d332d4"]]},{"id":"5be76a5e.d332d4","type":"ui_chart","z":"ed0ca72e.2817a8","name":"CCQ linear","group":"358444a8.536014","order":3,"width":"0","height":"0","label":"Signal Evol","interpolate":"linear","nodata":"No Data","ymin":"","ymax":"","removeOlder":1,"removeOlderUnit":"3600","x":1211.3065338134766,"y":202.90592575073242,"wires":[[],[]]},{"id":"c0bf990c.7110b8","type":"function","z":"ed0ca72e.2817a8","name":"value radioname","func":"var valor = msg.payload.d[\"radio-name\"];\nmsg.payload = valor;\nmsg.topic = \"radioname\"\nreturn msg;","outputs":1,"noerr":0,"x":979.8482208251953,"y":305.4059257507324,"wires":[["386da676.81c702"]]},{"id":"386da676.81c702","type":"ui_text","z":"ed0ca72e.2817a8","group":"89585401.f564d8","order":4,"width":"6","height":"1","name":"Conected To","label":"Link to:","format":"{{msg.payload}}","layout":"row-spread","x":1211.8690948486328,"y":312.3434257507324,"wires":[]},{"id":"f4ce7df9.588508","type":"function","z":"ed0ca72e.2817a8","name":"value uptime","func":"var valor = msg.payload.d[\"uptime\"];\nmsg.payload = valor;\nmsg.topic = \"uptime\"\nreturn msg;","outputs":1,"noerr":0,"x":963.5982208251953,"y":355.4059257507324,"wires":[["786da530.7f314c"]]},{"id":"786da530.7f314c","type":"ui_text","z":"ed0ca72e.2817a8","group":"89585401.f564d8","order":5,"width":"6","height":"1","name":"Uptime","label":"Uptime:","format":"{{msg.payload}}","layout":"","x":1205.6190948486328,"y":362.3434257507324,"wires":[]},{"id":"845deade.e6248","type":"function","z":"ed0ca72e.2817a8","name":"value tx-rate","func":"var valor = msg.payload.d[\"tx-rate\"];\nmsg.payload = valor;\nmsg.topic = \"txrate\"\nreturn msg;","outputs":1,"noerr":0,"x":964.6398468017578,"y":414.7808952331543,"wires":[["733d4336.dbcf74"]]},{"id":"733d4336.dbcf74","type":"ui_text","z":"ed0ca72e.2817a8","group":"89585401.f564d8","order":6,"width":"6","height":"1","name":"Tx-Rate","label":"TxRate:","format":"{{msg.payload}}","layout":"","x":1205.4107208251953,"y":414.2183647155762,"wires":[]},{"id":"8bfb71cc.93c38","type":"function","z":"ed0ca72e.2817a8","name":"value rx-rate","func":"var valor = msg.payload.d[\"rx-rate\"];\nmsg.payload = valor;\nmsg.topic = \"rxrate\"\nreturn msg;","outputs":1,"noerr":0,"x":967.1398468017578,"y":471.0309257507324,"wires":[["b208bae2.b8c208"]]},{"id":"b208bae2.b8c208","type":"ui_text","z":"ed0ca72e.2817a8","group":"89585401.f564d8","order":7,"width":"6","height":"1","name":"Rx-Rate","label":"RxRate:","format":"{{msg.payload}}","layout":"","x":1207.9107208251953,"y":470.4683952331543,"wires":[]},{"id":"c3f15fe5.325238","type":"function","z":"ed0ca72e.2817a8","name":"value Distance","func":"var valor = msg.payload.d[\"distance\"];\nmsg.payload = valor;\nmsg.topic = \"distnace\"\nreturn msg;","outputs":1,"noerr":0,"x":969.6398468017578,"y":588.5308647155762,"wires":[["1ffa3ca0.eaf68b"]]},{"id":"1ffa3ca0.eaf68b","type":"ui_text","z":"ed0ca72e.2817a8","group":"89585401.f564d8","order":8,"width":"6","height":"1","name":"Distance","label":"Dist:","format":"{{msg.payload}}","layout":"","x":1195.4107208251953,"y":586.718334197998,"wires":[]},{"id":"2d66c3e5.8a7df4","type":"function","z":"ed0ca72e.2817a8","name":"value signal-to-noise","func":"var valor = msg.payload.d[\"signal-to-noise\"];\nmsg.payload = valor;\nmsg.topic = \"signatltonoise\"\nreturn msg;","outputs":1,"noerr":0,"x":993.3898468017578,"y":532.2808647155762,"wires":[["6136d36d.8e58dc"]]},{"id":"6136d36d.8e58dc","type":"ui_text","z":"ed0ca72e.2817a8","group":"358444a8.536014","order":4,"width":"","height":"","name":"Signal to Noise","label":"SNR:","format":"{{msg.payload}}","layout":"","x":1210.4107208251953,"y":530.468334197998,"wires":[]},{"id":"fcf84547.47299","type":"ui_text","z":"ed0ca72e.2817a8","group":"d7834ab0.dd7088","order":1,"width":"","height":"","name":"ROS Version","label":"Version:","format":"{{msg.payload}}","layout":"","x":1205.889762878418,"y":638.9475364685059,"wires":[]},{"id":"e1507684.512ab","type":"function","z":"ed0ca72e.2817a8","name":"value os-version","func":"var valor = msg.payload.d[\"routeros-version\"];\nmsg.payload = valor;\nmsg.topic = \"rosversion\"\nreturn msg;","outputs":1,"noerr":0,"x":970.1188888549805,"y":640.760066986084,"wires":[["fcf84547.47299"]]},{"id":"4b7b9564.73853c","type":"subflow:d8e682fd.92783","z":"ed0ca72e.2817a8","name":"","x":114.69050598144531,"y":266.90899658203125,"wires":[["ec6cda15.d248b8","4adcfa4b.b0085c","8b1bb7a5.3cdb1","5a3b7427.35f624"]]},{"id":"a97c0b69.6a1fe","type":"ui_switch","z":"ed0ca72e.2817a8","name":"Switch","label":"","group":"635a4682.744878","order":1,"width":"1","height":"1","topic":"Monitoring","onvalue":"start","onvalueType":"str","onicon":"","oncolor":"","offvalue":"stop","offvalueType":"str","officon":"","offcolor":"","x":76.8809814453125,"y":65.4803466796875,"wires":[["49352356.1f4c4c","4b7b9564.73853c"]]},{"id":"ec6cda15.d248b8","type":"function","z":"ed0ca72e.2817a8","name":"value reg-table","func":"var valor = \"/interface/wireless/registration-table/print\";\nmsg.payload = valor;\nmsg.topic = \"reg-table\"\nreturn msg;","outputs":1,"noerr":0,"x":285.8809356689453,"y":206.17083168029785,"wires":[["37cc2746.b71c"]]},{"id":"d68f84b2.616678","type":"function","z":"ed0ca72e.2817a8","name":"value wireless","func":"var valor = \"/interface/wireless/print\";\nmsg.payload = valor;\nmsg.topic = \"wireless\"\nreturn msg;","outputs":1,"noerr":0,"x":295.97632598876953,"y":365.6946029663086,"wires":[["42faf260.2cdbd4"]]},{"id":"fda7368a.d3d278","type":"ui_text","z":"ed0ca72e.2817a8","group":"358444a8.536014","order":5,"width":"6","height":"1","name":"Frequency","label":"Freq:","format":"{{msg.payload}}","layout":"","x":1210.547649383545,"y":740.8372869491577,"wires":[]},{"id":"cf62342f.80b09","type":"function","z":"ed0ca72e.2817a8","name":"value frecuency","func":"var valor = msg.payload.d[\"frequency\"];\nmsg.payload = valor;\nmsg.topic = \"frecuency\"\nreturn msg;","outputs":1,"noerr":0,"x":976.4433822631836,"y":730.9831562042236,"wires":[["fda7368a.d3d278"]]},{"id":"a42f383.6343348","type":"function","z":"ed0ca72e.2817a8","name":"adapta iot","func":"var newMsg = { d: msg.payload[0] };\nmsg.payload = newMsg;\nreturn msg;","outputs":"1","noerr":0,"x":547.5475044250488,"y":451.1706953048706,"wires":[["cf62342f.80b09","1937c313.ef9085","837b801e.392308"]]},{"id":"42faf260.2cdbd4","type":"mikrotik","z":"ed0ca72e.2817a8","device":"","name":"mtk2","action":"9","x":393.2141799926758,"y":450.83738231658936,"wires":[["a42f383.6343348"]]},{"id":"f7912361.05303","type":"ui_text","z":"ed0ca72e.2817a8","group":"358444a8.536014","order":6,"width":"","height":"","name":"Channel","label":"Channel","format":"{{msg.payload}}","layout":"","x":1194.8809814453125,"y":871.1708030700684,"wires":[]},{"id":"837b801e.392308","type":"function","z":"ed0ca72e.2817a8","name":"value channel","func":"var valor = msg.payload.d[\"channel-width\"];\nmsg.payload = valor;\nmsg.topic = \"channel\"\nreturn msg;","outputs":1,"noerr":0,"x":970.7767143249512,"y":861.3166723251343,"wires":[["f7912361.05303"]]},{"id":"cfa0f9fe.6ed8a","type":"ui_text","z":"ed0ca72e.2817a8","group":"358444a8.536014","order":7,"width":"","height":"","name":"Band","label":"Band:","format":"{{msg.payload}}","layout":"","x":1186.8809814453125,"y":807.1708030700684,"wires":[]},{"id":"1937c313.ef9085","type":"function","z":"ed0ca72e.2817a8","name":"value band","func":"var valor = msg.payload.d[\"band\"];\nmsg.payload = valor;\nmsg.topic = \"band\"\nreturn msg;","outputs":1,"noerr":0,"x":962.7767143249512,"y":797.3166723251343,"wires":[["cfa0f9fe.6ed8a"]]},{"id":"4adcfa4b.b0085c","type":"function","z":"ed0ca72e.2817a8","name":"value health","func":"var valor = \"/system/health/print\";\nmsg.payload = valor;\nmsg.topic = \"health\"\nreturn msg;","outputs":1,"noerr":0,"x":288.8809814453125,"y":489.17080307006836,"wires":[["bb2c6c05.152e8"]]},{"id":"bb2c6c05.152e8","type":"mikrotik","z":"ed0ca72e.2817a8","device":"","name":"mtk3","action":"9","x":388.8809814453125,"y":549.1708030700684,"wires":[["4888d491.a202f4"]]},{"id":"4888d491.a202f4","type":"function","z":"ed0ca72e.2817a8","name":"adapta iot","func":"var newMsg = { d: msg.payload[0] };\nmsg.payload = newMsg;\nreturn msg;","outputs":"1","noerr":0,"x":548.8809814453125,"y":549.1708030700684,"wires":[["81505ba.f5c85a8","b0f178e0.10cdc"]]},{"id":"8b61d66c.5a0788","type":"ui_text","z":"ed0ca72e.2817a8","group":"d7834ab0.dd7088","order":1,"width":"","height":"","name":"Voltage","label":"Vol:","format":"{{msg.payload}}V","layout":"","x":1178.8809814453125,"y":989.1708030700684,"wires":[]},{"id":"81505ba.f5c85a8","type":"function","z":"ed0ca72e.2817a8","name":"value voltage","func":"var valor = msg.payload.d[\"voltage\"];\nmsg.payload = valor;\nmsg.topic = \"voltage\"\nreturn msg;","outputs":1,"noerr":0,"x":944.7767143249512,"y":979.3166723251343,"wires":[["8b61d66c.5a0788"]]},{"id":"5c50464c.32d8e8","type":"ui_text","z":"ed0ca72e.2817a8","group":"d7834ab0.dd7088","order":1,"width":"","height":"","name":"Temperature","label":"T:","format":"{{msg.payload}}ÂșC","layout":"","x":1188.8809814453125,"y":1029.1708030700684,"wires":[]},{"id":"b0f178e0.10cdc","type":"function","z":"ed0ca72e.2817a8","name":"value temperature","func":"var valor = msg.payload.d[\"temperature\"];\nmsg.payload = valor;\nmsg.topic = \"temperature\"\nreturn msg;","outputs":1,"noerr":0,"x":964.7767143249512,"y":1019.3166723251343,"wires":[["5c50464c.32d8e8"]]},{"id":"8b1bb7a5.3cdb1","type":"function","z":"ed0ca72e.2817a8","name":"value resource","func":"var valor = \"/system/resource/print\";\nmsg.payload = valor;\nmsg.topic = \"resource\"\nreturn msg;","outputs":1,"noerr":0,"x":298.8809814453125,"y":609.1708030700684,"wires":[["4a95ac0a.d676fc"]]},{"id":"4a95ac0a.d676fc","type":"mikrotik","z":"ed0ca72e.2817a8","device":"","name":"mtk4","action":"9","x":388.8809814453125,"y":669.1708030700684,"wires":[["9008dbd1.a0e868"]]},{"id":"9008dbd1.a0e868","type":"function","z":"ed0ca72e.2817a8","name":"adapta iot","func":"var newMsg = { d: msg.payload[0] };\nmsg.payload = newMsg;\nreturn msg;","outputs":"1","noerr":0,"x":548.8809814453125,"y":669.1708030700684,"wires":[["42a9ce3c.d51d78","ec262869.6a58a8","352c644.2992d9c","176171c4.75f7f6","97f54f62.88a18"]]},{"id":"42a9ce3c.d51d78","type":"function","z":"ed0ca72e.2817a8","name":"value cpuload","func":"var valor = msg.payload.d[\"cpu-load\"];\nmsg.payload = valor;\nmsg.topic = \"cpu-load\"\nreturn msg;","outputs":1,"noerr":0,"x":958.8809814453125,"y":1069.1708030700684,"wires":[["c97715fc.204e78"]]},{"id":"c97715fc.204e78","type":"ui_text","z":"ed0ca72e.2817a8","group":"d7834ab0.dd7088","order":1,"width":"","height":"","name":"CPU","label":"CPU:","format":"{{msg.payload}}%","layout":"","x":1172.9852485656738,"y":1079.0249338150024,"wires":[]},{"id":"ec262869.6a58a8","type":"function","z":"ed0ca72e.2817a8","name":"value freemem","func":"var valor = msg.payload.d[\"free-memory\"];\nmsg.payload = Math.round(valor / 1024 / 1024);\nmsg.topic = \"free-memory\"\nreturn msg;","outputs":1,"noerr":0,"x":958.8809814453125,"y":1109.1708030700684,"wires":[["21d38554.a5bf9a"]]},{"id":"21d38554.a5bf9a","type":"ui_text","z":"ed0ca72e.2817a8","group":"d7834ab0.dd7088","order":1,"width":"","height":"","name":"Free Mem","label":"Free Mem:","format":"{{msg.payload}}Mb / 64Mb","layout":"","x":1188.8809814453125,"y":1129.1708030700684,"wires":[]},{"id":"352c644.2992d9c","type":"function","z":"ed0ca72e.2817a8","name":"value freehdd","func":"var valor = msg.payload.d[\"free-hdd-space\"];\nmsg.payload = Math.round(valor / 1024 / 1024);\nmsg.topic = \"free-hdd-space\"\nreturn msg;","outputs":1,"noerr":0,"x":958.8809814453125,"y":1169.1708030700684,"wires":[["3a1c5870.bf90f"]]},{"id":"3a1c5870.bf90f","type":"ui_text","z":"ed0ca72e.2817a8","group":"d7834ab0.dd7088","order":1,"width":"","height":"","name":"Free HDD","label":"Free HDD","format":"{{msg.payload}}Mb / 128Mb","layout":"","x":1188.8809814453125,"y":1189.1708030700684,"wires":[]},{"id":"97f54f62.88a18","type":"function","z":"ed0ca72e.2817a8","name":"value version","func":"var valor = msg.payload.d[\"version\"];\nmsg.payload = valor;\nmsg.topic = \"version\"\nreturn msg;","outputs":1,"noerr":0,"x":958.8810119628906,"y":1269.1706733703613,"wires":[[]]},{"id":"176171c4.75f7f6","type":"function","z":"ed0ca72e.2817a8","name":"value uptime","func":"var valor = msg.payload.d[\"uptime\"];\nmsg.payload = valor;\nmsg.topic = \"uptime\"\nreturn msg;","outputs":1,"noerr":0,"x":948.8809814453125,"y":1229.1708030700684,"wires":[["111f8e81.920469"]]},{"id":"111f8e81.920469","type":"ui_text","z":"ed0ca72e.2817a8","group":"d7834ab0.dd7088","order":1,"width":"","height":"","name":"Uptime","label":"Uptime","format":"{{msg.payload}}","layout":"","x":1178.8809814453125,"y":1229.1708030700684,"wires":[]},{"id":"5a3b7427.35f624","type":"function","z":"ed0ca72e.2817a8","name":"value ppoe","func":"var valor = \"/interface/pppoe-client/monitor\\n=numbers=0\\n=once\";\nmsg.payload = valor;\nmsg.topic = \"pppoe\"\nreturn msg;","outputs":1,"noerr":0,"x":291.6666717529297,"y":737.3333473205566,"wires":[["88d74e8c.272448"]]},{"id":"88d74e8c.272448","type":"mikrotik","z":"ed0ca72e.2817a8","device":"","name":"mtk5","action":"9","x":474.9999694824219,"y":735.6666259765625,"wires":[["2a98ca71.564d8e"]]},{"id":"2a98ca71.564d8e","type":"function","z":"ed0ca72e.2817a8","name":"adapta iot","func":"var newMsg = { d: msg.payload[0] };\nmsg.payload = newMsg;\nreturn msg;","outputs":"1","noerr":0,"x":546.6666488647461,"y":875.6666660308838,"wires":[["ec50b0f3.ce8f8","76b81d09.3d854c","a3a0b0d8.8b5cf","e65bd347.7a148","893909d8.eaf498"]]},{"id":"ec50b0f3.ce8f8","type":"function","z":"ed0ca72e.2817a8","name":"value pppoe uptime","func":"var valor = msg.payload.d[\"uptime\"];\nmsg.payload = valor;\nmsg.topic = \"uptime\"\nreturn msg;","outputs":1,"noerr":0,"x":980,"y":1334,"wires":[["9ecb47d1.2e6858"]]},{"id":"9ecb47d1.2e6858","type":"ui_text","z":"ed0ca72e.2817a8","group":"dbf5416.a0ce2c","order":1,"width":"","height":"","name":"pppoe Uptime","label":"Uptime","format":"{{msg.payload}}","layout":"","x":1215,"y":1330.6666259765625,"wires":[]},{"id":"2ba5878e.23ea28","type":"ui_text","z":"ed0ca72e.2817a8","group":"dbf5416.a0ce2c","order":2,"width":"","height":"","name":"Status","label":"Status","format":"{{msg.payload}}","layout":"","x":1185,"y":1389,"wires":[]},{"id":"76b81d09.3d854c","type":"function","z":"ed0ca72e.2817a8","name":"value pppoe status","func":"var valor = msg.payload.d[\"status\"];\nmsg.payload = valor;\nmsg.topic = \"status\"\nreturn msg;","outputs":1,"noerr":0,"x":970,"y":1392.3333740234375,"wires":[["2ba5878e.23ea28"]]},{"id":"93cb066d.8b41e8","type":"ui_text","z":"ed0ca72e.2817a8","group":"dbf5416.a0ce2c","order":3,"width":"","height":"","name":"IP Public","label":"Public IP","format":"{{msg.payload}}","layout":"","x":1196.6666259765625,"y":1437.333251953125,"wires":[]},{"id":"a3a0b0d8.8b5cf","type":"function","z":"ed0ca72e.2817a8","name":"value pppoe ip public","func":"var valor = msg.payload.d[\"local-address\"];\nmsg.payload = valor;\nmsg.topic = \"ippublic\"\nreturn msg;","outputs":1,"noerr":0,"x":981.6666259765625,"y":1440.6666259765625,"wires":[["93cb066d.8b41e8"]]},{"id":"2866bc66.752b94","type":"ui_text","z":"ed0ca72e.2817a8","group":"dbf5416.a0ce2c","order":4,"width":"","height":"","name":"Ip Server","label":"IP Server","format":"{{msg.payload}}","layout":"","x":1190,"y":1500.6666259765625,"wires":[]},{"id":"e65bd347.7a148","type":"function","z":"ed0ca72e.2817a8","name":"value pppoe ip server","func":"var valor = msg.payload.d[\"ac-name\"];\nmsg.payload = valor;\nmsg.topic = \"ipserver\"\nreturn msg;","outputs":1,"noerr":0,"x":975,"y":1504,"wires":[["2866bc66.752b94"]]},{"id":"893909d8.eaf498","type":"function","z":"ed0ca72e.2817a8","name":"value pppoe ip remote","func":"var valor = msg.payload.d[\"remote-address\"];\nmsg.payload = valor;\nmsg.topic = \"internetgateway\"\nflow.set(\"remote-address\",valor);\nreturn msg;\n\n\n","outputs":"1","noerr":0,"x":979.9999389648438,"y":1564,"wires":[["685c8b9.d3a5c74"]]},{"id":"685c8b9.d3a5c74","type":"ui_text","z":"ed0ca72e.2817a8","group":"dbf5416.a0ce2c","order":5,"width":"","height":"","name":"Ip Gateway","label":"Gateway","format":"{{msg.payload}}","layout":"","x":1204.9999389648438,"y":1560.6666259765625,"wires":[]},{"id":"9f3cdc68.fe9408","type":"mikrotik","z":"ed0ca72e.2817a8","device":"","name":"mtk6","action":"9","x":476.9046630859375,"y":1828.4285888671875,"wires":[["2d730809.31502","faba9345.8ec48"]]},{"id":"faba9345.8ec48","type":"debug","z":"ed0ca72e.2817a8","name":"","active":false,"console":"false","complete":"true","x":645.2381629943848,"y":1900.42848777771,"wires":[]},{"id":"2d730809.31502","type":"function","z":"ed0ca72e.2817a8","name":"adapta iot","func":"var newMsg = { d: msg.payload[1] };\nmsg.payload = newMsg;\nreturn msg;","outputs":"1","noerr":0,"x":638.5713157653809,"y":1763.7617893218994,"wires":[["4d8950ab.76a4d","a2c0ec1a.e1e988","41892db1.bd9754"]]},{"id":"4d8950ab.76a4d","type":"function","z":"ed0ca72e.2817a8","name":"value min ping","func":"var valor = msg.payload.d[\"min-rtt\"];\nmsg.payload = valor;\nmsg.topic = \"min-rtt\"\nreturn msg;","outputs":1,"noerr":0,"x":815.2380027770996,"y":1695.4284467697144,"wires":[["1cf21b01.bb0325"]]},{"id":"1cf21b01.bb0325","type":"ui_chart","z":"ed0ca72e.2817a8","name":"Ping linear","group":"dbf5416.a0ce2c","order":7,"width":"0","height":"0","label":"Ping Evol","interpolate":"linear","nodata":"No Data","ymin":"","ymax":"","removeOlder":1,"removeOlderUnit":"3600","x":1031.904384613037,"y":1765.4284915924072,"wires":[[],[]]},{"id":"41892db1.bd9754","type":"function","z":"ed0ca72e.2817a8","name":"value max ping","func":"var valor = msg.payload.d[\"max-rtt\"];\nmsg.payload = valor;\nmsg.topic = \"max-rtt\"\nreturn msg;","outputs":1,"noerr":0,"x":813.5712928771973,"y":1828.7618236541748,"wires":[["1cf21b01.bb0325"]]},{"id":"a2c0ec1a.e1e988","type":"function","z":"ed0ca72e.2817a8","name":"value avg ping","func":"var valor = msg.payload.d[\"avg-rtt\"];\nmsg.payload = valor;\nmsg.topic = \"avg-rtt\"\nreturn msg;","outputs":1,"noerr":0,"x":821.9045753479004,"y":1767.0951309204102,"wires":[["1cf21b01.bb0325"]]},{"id":"49352356.1f4c4c","type":"subflow:480a64c6.2865c4","z":"ed0ca72e.2817a8","x":110,"y":330.66666666666663,"wires":[["d68f84b2.616678"]]},{"id":"1031394c.e062cf","type":"function","z":"ed0ca72e.2817a8","name":"value ping to ip remote","func":"var valor = flow.get(\"remote-address\");\nmsg.payload = \"/tool/flood-ping\\n=address=\" + valor + \"\\n=count=5\\n=size=64\";\nmsg.topic = \"pinginternetgateway\"\nreturn msg;\n\n\n","outputs":"1","noerr":0,"x":495.6665496826172,"y":1700.66667842865,"wires":[["9f3cdc68.fe9408"]]},{"id":"19f3053.774e77b","type":"ui_switch","z":"ed0ca72e.2817a8","name":"Ping loop","label":"Ping test","group":"dbf5416.a0ce2c","order":6,"width":0,"height":0,"topic":"Monitoring Ping","style":"","onvalue":"start","onvalueType":"str","onicon":"","oncolor":"","offvalue":"stop","offvalueType":"str","officon":"","offcolor":"","x":134.66664123535156,"y":1634.666654586792,"wires":[["46fc2dcf.1d5384"]]},{"id":"46fc2dcf.1d5384","type":"subflow:abee3ed3.de95f8","z":"ed0ca72e.2817a8","x":319,"y":1641,"wires":[["1031394c.e062cf"]]},{"id":"89585401.f564d8","type":"ui_group","z":"","name":"CCQ","tab":"36856844.c572f8","order":5,"disp":true,"width":"6"},{"id":"358444a8.536014","type":"ui_group","z":"","name":"SIGNAL","tab":"36856844.c572f8","order":3,"disp":true,"width":"6"},{"id":"d7834ab0.dd7088","type":"ui_group","z":"","name":"SYSTEM","tab":"36856844.c572f8","order":4,"disp":true,"width":"6"},{"id":"635a4682.744878","type":"ui_group","z":"ed0ca72e.2817a8","name":"Monitoring","tab":"6a9bae86.bef62","order":1,"disp":true,"width":"6"},{"id":"dbf5416.a0ce2c","type":"ui_group","z":"ed0ca72e.2817a8","name":"PPPOE","tab":"6a9bae86.bef62","order":2,"disp":true,"width":"6"},{"id":"36856844.c572f8","type":"ui_tab","z":"2de9bf5a.6760b","name":"Home","icon":"dashboard","order":1},{"id":"6a9bae86.bef62","type":"ui_tab","z":"ed0ca72e.2817a8","name":"Home","icon":"dashboard","order":1}]
Vruizvil

Flow Info

created 2 months ago

Node Types

Core
  • debug (x5)
  • delay (x3)
  • function (x44)
  • inject (x7)
Other
  • mikrotik (x6)
  • subflow (x3)
  • subflow:480a64c6.2865c4 (x1)
  • subflow:abee3ed3.de95f8 (x1)
  • subflow:d8e682fd.92783 (x1)
  • tab (x1)
  • ui_chart (x3)
  • ui_gauge (x4)
  • ui_group (x5)
  • ui_switch (x2)
  • ui_tab (x2)
  • ui_text (x21)

Tags

  • mikrotik
  • dashboard
  • mikronode
Copy this flow JSON to your clipboard and then import into Node-RED using the Import From > Clipboard (Ctrl-I) menu option