# Mikrotik - Get data

**URL:** <https://discourse.nodered.org/t/mikrotik-get-data/22653>\
**Category:** General\
**Created:** [5 March 2020 09:24 UTC](https://discourse.nodered.org/t/mikrotik-get-data/22653 "2020-03-05T09:24:11Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![kerzol81](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/kerzol81/32/19117_2.png) [@kerzol81](https://discourse.nodered.org/u/kerzol81)\
**Post date:** [5 March 2020 09:24 UTC](https://discourse.nodered.org/t/mikrotik-get-data/22653/1 "2020-03-05T09:24:11Z")

</div>

Hi, I'm very newbee to Node-RED, I only made some API call to my local transportation's public API with the http request node.

I'd like to solve a GPS problem with Node-Red. I'm looking for a way to ask the GPS capable Mikrotik Router's lat / long position.

I got stuck when making the initial request, the node stays in : requesting state. and the answer is:  
"no response from server" or "Error: ESOCKETTIMEDOUT : [http://x.x.x.1:8728](http://x.x.x.1:8728)"

Please help me out if you have experience with this. I'd like zo mimic a logon and a terminal with Node-red, and parse out the long and lat from the router, and than transform to OSMAND and send it to Traccar 🙂

Thnaks

Zoli

---

<div class="post-metadata">

**Author:** ![kuema](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/kuema/32/6542_2.png) [@kuema](https://discourse.nodered.org/u/kuema)\
**Post date:** [5 March 2020 09:51 UTC](https://discourse.nodered.org/t/mikrotik-get-data/22653/2 "2020-03-05T09:51:43Z")

</div>

I think you need to provide a bit more information.

What have you tried so far? Are any custom nodes involved? Maybe share a part of the flow.

---

<div class="post-metadata">

**Author:** ![kerzol81](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/kerzol81/32/19117_2.png) [@kerzol81](https://discourse.nodered.org/u/kerzol81)\
**Post date:** [5 March 2020 09:54 UTC](https://discourse.nodered.org/t/mikrotik-get-data/22653/3 "2020-03-05T09:54:56Z")

</div>

I need some time, Ive just cannibalised the host :-))) I run node-red in docker... the request was in a loop...

---

<div class="post-metadata">

**Author:** ![kuema](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/kuema/32/6542_2.png) [@kuema](https://discourse.nodered.org/u/kuema)\
**Post date:** [5 March 2020 10:00 UTC](https://discourse.nodered.org/t/mikrotik-get-data/22653/4 "2020-03-05T10:00:28Z")

</div>

Oooops! 🤪

Try starting Node-RED with `--safe`. That way the flows won't start and you can fix the bug.

---

<div class="post-metadata">

**Author:** ![kerzol81](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/kerzol81/32/19117_2.png) [@kerzol81](https://discourse.nodered.org/u/kerzol81)\
**Post date:** [5 March 2020 10:13 UTC](https://discourse.nodered.org/t/mikrotik-get-data/22653/5 "2020-03-05T10:13:43Z")

</div>

is the http request appropriate to login to the Router?

---

<div class="post-metadata">

**Author:** ![kuema](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/kuema/32/6542_2.png) [@kuema](https://discourse.nodered.org/u/kuema)\
**Post date:** [5 March 2020 10:15 UTC](https://discourse.nodered.org/t/mikrotik-get-data/22653/6 "2020-03-05T10:15:42Z")

</div>

I don't know your specific hardware, but if your router provides a HTTP interface, then yes.

---

<div class="post-metadata">

**Author:** ![kerzol81](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/kerzol81/32/19117_2.png) [@kerzol81](https://discourse.nodered.org/u/kerzol81)\
**Post date:** [5 March 2020 10:16 UTC](https://discourse.nodered.org/t/mikrotik-get-data/22653/7 "2020-03-05T10:16:41Z")

</div>

with http request it becomes connected, I think ssh node would be the best, so I'll try the node-red-contrib-ssh

---

<div class="post-metadata">

**Author:** ![kuema](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/kuema/32/6542_2.png) [@kuema](https://discourse.nodered.org/u/kuema)\
**Post date:** [5 March 2020 10:19 UTC](https://discourse.nodered.org/t/mikrotik-get-data/22653/8 "2020-03-05T10:19:05Z")

</div>

Then you're on the right track!

For debugging, it's best to add some debug nodes with the "complete message" setting to see whats going on.

---

<div class="post-metadata">

**Author:** ![kerzol81](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/kerzol81/32/19117_2.png) [@kerzol81](https://discourse.nodered.org/u/kerzol81)\
**Post date:** [5 March 2020 10:30 UTC](https://discourse.nodered.org/t/mikrotik-get-data/22653/9 "2020-03-05T10:30:08Z")

</div>

This is what Ive done so far:

```auto
[{"id":"8e03c0ba.cc4f2","type":"tab","label":"Mikrotik - Traccar","disabled":false,"info":""},{"id":"46941acf.02f724","type":"inject","z":"8e03c0ba.cc4f2","name":"trigger","topic":"","payload":"","payloadType":"date","repeat":"3","crontab":"","once":false,"onceDelay":0.1,"x":260,"y":140,"wires":[["e7fdf82f.2de7d8"]]},{"id":"e7fdf82f.2de7d8","type":"ssh-client","z":"8e03c0ba.cc4f2","debug":false,"ssh":"","hostname":"10.20.20.1","name":"Mikrotik LtAP mini","x":470,"y":320,"wires":[["f9e2bb06.cbc47"]]},{"id":"f9e2bb06.cbc47","type":"exec","z":"8e03c0ba.cc4f2","command":"system identity set name=\"from-node-red\" ","addpay":true,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"","x":800,"y":220,"wires":[["30fe042b.83037c"],["30fe042b.83037c"],["30fe042b.83037c"]]},{"id":"30fe042b.83037c","type":"debug","z":"8e03c0ba.cc4f2","name":"","active":true,"tosidebar":true,"console":true,"tostatus":true,"complete":"payload","targetType":"msg","x":1200,"y":280,"wires":[]}]

```

But It doesnt work yet. I Just would like to set the Microtik's identity.

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [5 March 2020 11:18 UTC](https://discourse.nodered.org/t/mikrotik-get-data/22653/10 "2020-03-05T11:18:07Z")

</div>

Note that there are [mikrotik nodes available](https://flows.nodered.org/search?term=mikrotik)

---

<div class="post-metadata">

**Author:** ![kerzol81](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/kerzol81/32/19117_2.png) [@kerzol81](https://discourse.nodered.org/u/kerzol81)\
**Post date:** [5 March 2020 11:24 UTC](https://discourse.nodered.org/t/mikrotik-get-data/22653/11 "2020-03-05T11:24:34Z")

</div>

Thank you!

---

<div class="post-metadata">

**Author:** ![kerzol81](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/kerzol81/32/19117_2.png) [@kerzol81](https://discourse.nodered.org/u/kerzol81)\
**Post date:** [31 March 2020 05:36 UTC](https://discourse.nodered.org/t/mikrotik-get-data/22653/12 "2020-03-31T05:36:54Z")

</div>

Hi, Thanks. Interestingly I cannot install additional noded via npm.  
I'm testing Node-RED with Docker.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [30 May 2020 05:36 UTC](https://discourse.nodered.org/t/mikrotik-get-data/22653/13 "2020-05-30T05:36:55Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
