Device tracker through Mikrotik not working - how can I check scanning?

Hi,
I am new in HA, I try device tracker through mikrotik router but I have problem with scanning - it isnt working, it still show that i am “home”.

I setup device_tracker and Mikrotik API, and it correctly create known_devices.yaml and fetch all wifi devices. After I rename my devices and enable track only on my phone:

In configuration.yaml:

device_tracker:
  - platform: mikrotik
    host: 192.168.88.1
    username: admin
    password: xyz
    new_device_defaults:
      track_new_devices: false
      hide_if_away: false

in known_devices.yaml:

redminote4redmi:
  hide_if_away: false
  icon:
  mac: C4:0B:CB:44:8D:3D
  name: Vít
  picture:
  track: true
  vendor: Xiaomi Communications Co Ltd

I dont know how can I debug it. Do exists any log of run processes / tasks? I only found “error / warning” log in UI ( http://hasio.local/dev-info ) but there are only error:

Error doing job: Fatal error on transport TCPTransport (error status in uv_stream_t.read callback)
OSError: [Errno 113] Host is unreachable

I dont know what is it.

Thank you for any help.

device_tracker:
  - platform: netgear
    host: 192.168.1.1
    username: admin
    interval_seconds: 10  <== put this
    consider_home: 180 <== put this
    track_new_devices: yes

|interval_seconds |12 |Seconds between each scan for new devices|
|consider_home |180 |Seconds to wait till marking someone as not home after not being seen. This parameter is most useful for households with Apple iOS devices that go into sleep mode while still at home to conserve battery life. iPhones will occasionally drop off the network and then re-appear. consider_home helps prevent false alarms in presence detection when using IP scanners such as Nmap. consider_home accepts various time representations, (E.g. the following all represents 3 minutes: 180, 0:03, 0:03:00)|

It works! Thank you so much!

I don`t understand why, because “consider_home” has 180 as default value and “interval_seconds” has 12 seconds (and I dont think that between 10 vs 12 is not so much), but nice work.

1 Like

Hi:

I have the same problem. My RB is not recognized by HA. Only SNMP works but need many time to update situation,'s family mobile. I update HA to last version and try to configure Mikrotik like HA web page but log show me problems.