Skip to content

Commit 9354932

Browse files
engrbm87frenck
authored andcommitted
Update mikrotik.markdown (#11927)
1 parent 27a9a90 commit 9354932

File tree

1 file changed

+21
-31
lines changed

1 file changed

+21
-31
lines changed

source/_integrations/mikrotik.markdown

Lines changed: 21 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,24 @@ Go to **IP** -> **Services** -> **API** and enable it.
3131

3232
Make sure that port 8728 or the port you choose is accessible from your network.
3333

34-
To use a MikroTik router in your installation, add the following to your `configuration.yaml` file:
34+
Home Assistant offers Mikrotik integration through **Configuration** -> **Integrations** -> **Mikrotik**.
35+
It also allows importing from the `configuration.yaml` file:
3536

3637
```yaml
3738
# Example configuration.yaml entry
3839
mikrotik:
39-
- host: IP_ADDRESS
40+
- name: Mikrotik
41+
host: IP_ADDRESS
4042
username: ROUTEROS_USERNAME
4143
password: ROUTEROS_PASSWORD
4244
```
4345
4446
{% configuration %}
47+
name:
48+
description: The name of your Mikrotik device.
49+
required: true
50+
default: Mikrotik
51+
type: string
4552
host:
4653
description: The IP address of your MikroTik device.
4754
required: true
@@ -54,12 +61,6 @@ password:
5461
description: The password of the given user account on the MikroTik device.
5562
required: true
5663
type: string
57-
login_method:
58-
description: The login method to use on the MikroTik device. The `plain` method is used by default, if you have an older RouterOS Version than 6.43, use `token` as the login method.
59-
required: false
60-
type: string
61-
options: plain, token
62-
default: plain
6364
port:
6465
description: RouterOS API port.
6566
required: false
@@ -70,24 +71,23 @@ ssl:
7071
required: false
7172
default: false
7273
type: boolean
73-
method:
74-
description: Override autodetection of device scanning method. Can be `wireless` to use local wireless registration, `capsman` for capsman wireless registration, or `dhcp` for DHCP leases.
75-
required: false
76-
type: string
7774
arp_ping:
7875
description: Use ARP ping with DHCP method for device scanning.
7976
required: false
8077
default: false
8178
type: boolean
79+
force_dhcp:
80+
description: Force use of DHCP server list for devices to be tracked.
81+
required: false
82+
default: false
83+
type: boolean
84+
detection_time:
85+
description: How long since the last seen time before the device is marked away, specified in seconds.
86+
required: false
87+
default: 300
88+
type: integer
8289
{% endconfiguration %}
8390
84-
<div class='note info'>
85-
86-
As of version 6.43 of RouterOS Mikrotik introduced a new login method (`plain`) in addition to the old login method (`token`). With Version 6.45.1 the old `token` login method got deprecated.
87-
In order to support both login mechanisms, the new configuration option `login_method` has been introduced.
88-
89-
</div>
90-
9191
## Use a certificate
9292
9393
To use SSL to connect to the API (via `api-ssl` instead of `api` service) further configuration is required at RouterOS side. You have to upload or generate a certificate and configure `api-ssl` service to use it. Here is an example of a self-signed certificate:
@@ -126,16 +126,6 @@ mikrotik:
126126
password: YOUR_PASSWORD
127127
ssl: true
128128
arp_ping: true
129-
method: dhcp
130-
track_devices: true
131-
132-
- host: 192.168.88.2
133-
username: homeassistant
134-
password: YOUR_PASSWORD
135-
ssl: true
136-
port: 8729
137-
method: capsman
138-
track_devices: true
129+
force_dhcp: true
130+
detection_time: 30
139131
```
140-
141-
See the [device tracker integration page](/integrations/device_tracker/) for instructions on how to configure the people to be tracked.

0 commit comments

Comments
 (0)