This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Mikrotik
#1
Hello,

I created a script to connect my LM from my Mikrotik device to check if my car is at home, like the example https://kb.logicmachine.net/integration/mikrotik/

Code:
# tesla
:global auto01Stor
:local auto01 [/ip arp find mac-address="XX:XX:XX:XX:XX:XX" and complete=yes];
# tesla model 3
:if ($auto01 != $auto01Stor) do={
  :if ($auto01 != "") do={
    /tool fetch url="http://xxxxx:xxxxxxxx@x.x.x.x/scada-remote" http-data="m=json&r=grp&fn=write&alias=32/1/4&value=1" http-method=post;
  } else= {
    /tool fetch url="http:// xxxxx:xxxxxxxx@x.x.x.x /scada-remote" http-data="m=json&r=grp&fn=write&alias=32/1/4&value=0" http-method=post;
  }
  :set auto01Stor $auto01;
}

But with the latest firmware this doesn't work. Maybe because you can't send the username and password this way. 

How to solve this?
Reply
#2
This can be done via Mikrotik API / Wi-Fi registration table. Updated example has been posted here: https://kb.logicmachine.net/integration/...k/#example
Reply


Forum Jump: