Community discussions

MikroTik App
 
DuncanCT
newbie
Topic Author
Posts: 28
Joined: Thu May 24, 2018 1:28 pm

Idiots Guide to Node-RED and Mikrotik

Sun Jun 03, 2018 8:00 pm

So I'm very much a beginner/idiot ( :lol: ) and messing around in Node Red. Please excuse my terminology it's probably wrong for some stuff.

I've downloaded the Mikrotik node (flows.nodered.org/node/node-red-contrib-mikrotik). It's gives a very basic way to make API calls. (I'd have no idea how to do it otherwise)

Setups is something like this...

Inject > Mikrotik > Debug

So I've injected these commands...

/login & /interface/print as a test and it's works.

Looking to get a info on an Interface Tx/Rx Rate. How often does this sample. Assume you would need to averaging it out over 5/10sec. Also to get total usage?

Any input general or specific? Thanks!
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26289
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia

Re: Idiots Guide to Node-RED and Mikrotik

Mon Jun 04, 2018 10:01 am

Once you have successfully connected and gotten some data, the "MikroTik part" of it is over. How often does it sample, how to filter out certain stuff, and how to average it - those questions are better asked to NodeRED users. I have not used it or seen anyone else use it here, so not sure.
 
DuncanCT
newbie
Topic Author
Posts: 28
Joined: Thu May 24, 2018 1:28 pm

Re: Idiots Guide to Node-RED and Mikrotik

Mon Jun 04, 2018 3:17 pm

I have a better understanding of Node-RED than I do of the Mikrotik. So please assume my question are for Mikrotik unless stated otherwise.

So what I was asking was how often it samples on the Mikrotik side but on futher reflection the answer is right in front of my face! :shock: kbpS! And having read on other topics you can have a counter function and them push every so many seconds to average out over time?

Ok, unfortunately the Node linked above logs in, makes a call and then logs out again. Making listening to a port not possible. And I assume the best was to have something as dynamic as Tx/Rx Rate is to have a script running pushing to Node-RED instead of making calls so continuously?

So this might be out of the scope of this forum but any guidance on making a link between the two. Assume a TCP node with API port specified.
 
MichaelWard
just joined
Posts: 4
Joined: Tue May 24, 2016 11:24 am

Re: Idiots Guide to Node-RED and Mikrotik

Tue Aug 14, 2018 3:21 pm

Hi Duncan.
Can you clarify which of the following you are doing?
  1. running the node-red server on the mikrotik router?
  2. doing some kind of configuration of the mikrotik router using node-red running somewhere else?
If you are doing option 1, would you mind posting a link showing how you achieved this?
What hardware specs does the router require?
I have a HAP RB951Ui-2nD here id like to try.
 
Mowglii
just joined
Posts: 1
Joined: Wed May 04, 2022 8:16 pm

Re: Idiots Guide to Node-RED and Mikrotik

Wed May 04, 2022 8:19 pm

Hi Michael,

Big bump here I know!

I wondered if you ever managed to get Node-RED running on a Mikrotik router?

Cheers,
Morgan

Who is online

Users browsing this forum: adimihaix, Bing [Bot], coreshock, Railander, sted and 71 guests