question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

No way to set custom device tracking options for mikrotik hub

See original GitHub issue

Home Assistant release with the issue: 0.98.4

Last working Home Assistant release (if known): 0.97.2

Component/platform: https://www.home-assistant.io/components/mikrotik/

Description of problem: Before 0.98.0 it was possible to set consider_home, interval_seconds and other options from https://www.home-assistant.io/components/device_tracker/ page. After PR #25664 it’s now impossible. Even if it’s possible, I don’t see any documentation. device_tracker docs say nothing about config for separate components. mikrotik docs say nothing about these options too. Even more, they don’t describe track_devices option, but use it in the example below 😑.

@slackr31337 can you reply?

This issue was already mentioned in https://github.com/home-assistant/home-assistant/issues/25772#issuecomment-526764264.

What I tried:

mikrotik:
  - host: 192.168.0.1
    username: root
    password: !secret router
    consider_home: 8
    interval_seconds: 3
    track_devices: True

Got:

home_assistant    | 2019-09-08 13:40:43 ERROR (MainThread) [homeassistant.config] Invalid config for [mikrotik]: [consider_home] is an invalid option for [mikrotik]. Check: mikrotik->mikrotik->0->consider_home. (See /config/configuration.yaml, line 237). Please check the docs at https://home-assistant.io/components/mikrotik/
home_assistant    | 2019-09-08 13:40:43 ERROR (MainThread) [homeassistant.setup] Setup failed for mikrotik: Invalid config.
device_tracker:
  - platform: mikrotik
    consider_home: 8
    interval_seconds: 3
    track_new_devices: False

mikrotik:
  - host: 192.168.0.1
    username: root
    password: !secret router
    track_devices: True

Got:

home_assistant    | 2019-09-08 13:44:14 ERROR (MainThread) [homeassistant.components.device_tracker] Error setting up platform legacy
home_assistant    | Traceback (most recent call last):
home_assistant    |   File "/usr/src/homeassistant/homeassistant/components/device_tracker/setup.py", line 65, in async_setup_legacy
home_assistant    |     self.platform.get_scanner, hass, {DOMAIN: self.config}
home_assistant    |   File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
home_assistant    |     result = self.fn(*self.args, **self.kwargs)
home_assistant    |   File "/usr/src/homeassistant/homeassistant/components/mikrotik/device_tracker.py", line 35, in get_scanner
home_assistant    |     return scanner if scanner.success_init else None
home_assistant    | UnboundLocalError: local variable 'scanner' referenced before assignment

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:1
  • Comments:26 (17 by maintainers)

github_iconTop GitHub Comments

6reactions
matziucommented, Nov 20, 2019

Any news?

4reactions
PaulAnnekovcommented, Jan 25, 2020

I think it’s a good example of how to not make a code review 😞 . You approve something which totally breaks backward compatibility and everybody is waiting 4+ months for a fix.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Mikrotik integration not tracking devices #31365 - GitHub
After HA 0.105.0 the Mikrotik device_tracker integration is not tracking my network devices anymore. However, there are no errors either!
Read more >
MikroTik Devices Controller
MikroTik is planning to develop and build a controller app for MikroTik Devices. Currently we are researching possibilities and options, what ...
Read more >
Device-mode - RouterOS - MikroTik Documentation - Support
The device-mode is a feature which sets specific limitations on a device, or limits access to specific configuration options.
Read more >
Using RouterOS to VLAN your network - MikroTik - Forum
I focus on the most commonly requested scenarios: switch with separate router, WiFi router combo, guest WiFi, and public VLAN and printers.
Read more >
v7.3 and v7.3.1 [stable] is released! - MikroTik - Forum
bridge - do not set VLAN on inactive port with a "set" command; ... switch - added option to match source and destination...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found