You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: source/_integrations/mikrotik.markdown
+21-31Lines changed: 21 additions & 31 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,17 +31,24 @@ Go to **IP** -> **Services** -> **API** and enable it.
31
31
32
32
Make sure that port 8728 or the port you choose is accessible from your network.
33
33
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:
35
36
36
37
```yaml
37
38
# Example configuration.yaml entry
38
39
mikrotik:
39
-
- host: IP_ADDRESS
40
+
- name: Mikrotik
41
+
host: IP_ADDRESS
40
42
username: ROUTEROS_USERNAME
41
43
password: ROUTEROS_PASSWORD
42
44
```
43
45
44
46
{% configuration %}
47
+
name:
48
+
description: The name of your Mikrotik device.
49
+
required: true
50
+
default: Mikrotik
51
+
type: string
45
52
host:
46
53
description: The IP address of your MikroTik device.
47
54
required: true
@@ -54,12 +61,6 @@ password:
54
61
description: The password of the given user account on the MikroTik device.
55
62
required: true
56
63
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
63
64
port:
64
65
description: RouterOS API port.
65
66
required: false
@@ -70,24 +71,23 @@ ssl:
70
71
required: false
71
72
default: false
72
73
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
77
74
arp_ping:
78
75
description: Use ARP ping with DHCP method for device scanning.
79
76
required: false
80
77
default: false
81
78
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
82
89
{% endconfiguration %}
83
90
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
-
91
91
## Use a certificate
92
92
93
93
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:
126
126
password: YOUR_PASSWORD
127
127
ssl: true
128
128
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
139
131
```
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