mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-08 09:56:52 +00:00
Update mikrotik.markdown (#11927)
This commit is contained in:
parent
27a9a90599
commit
9354932db2
@ -31,17 +31,24 @@ Go to **IP** -> **Services** -> **API** and enable it.
|
|||||||
|
|
||||||
Make sure that port 8728 or the port you choose is accessible from your network.
|
Make sure that port 8728 or the port you choose is accessible from your network.
|
||||||
|
|
||||||
To use a MikroTik router in your installation, add the following to your `configuration.yaml` file:
|
Home Assistant offers Mikrotik integration through **Configuration** -> **Integrations** -> **Mikrotik**.
|
||||||
|
It also allows importing from the `configuration.yaml` file:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
# Example configuration.yaml entry
|
# Example configuration.yaml entry
|
||||||
mikrotik:
|
mikrotik:
|
||||||
- host: IP_ADDRESS
|
- name: Mikrotik
|
||||||
|
host: IP_ADDRESS
|
||||||
username: ROUTEROS_USERNAME
|
username: ROUTEROS_USERNAME
|
||||||
password: ROUTEROS_PASSWORD
|
password: ROUTEROS_PASSWORD
|
||||||
```
|
```
|
||||||
|
|
||||||
{% configuration %}
|
{% configuration %}
|
||||||
|
name:
|
||||||
|
description: The name of your Mikrotik device.
|
||||||
|
required: true
|
||||||
|
default: Mikrotik
|
||||||
|
type: string
|
||||||
host:
|
host:
|
||||||
description: The IP address of your MikroTik device.
|
description: The IP address of your MikroTik device.
|
||||||
required: true
|
required: true
|
||||||
@ -54,12 +61,6 @@ password:
|
|||||||
description: The password of the given user account on the MikroTik device.
|
description: The password of the given user account on the MikroTik device.
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
login_method:
|
|
||||||
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.
|
|
||||||
required: false
|
|
||||||
type: string
|
|
||||||
options: plain, token
|
|
||||||
default: plain
|
|
||||||
port:
|
port:
|
||||||
description: RouterOS API port.
|
description: RouterOS API port.
|
||||||
required: false
|
required: false
|
||||||
@ -70,24 +71,23 @@ ssl:
|
|||||||
required: false
|
required: false
|
||||||
default: false
|
default: false
|
||||||
type: boolean
|
type: boolean
|
||||||
method:
|
|
||||||
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.
|
|
||||||
required: false
|
|
||||||
type: string
|
|
||||||
arp_ping:
|
arp_ping:
|
||||||
description: Use ARP ping with DHCP method for device scanning.
|
description: Use ARP ping with DHCP method for device scanning.
|
||||||
required: false
|
required: false
|
||||||
default: false
|
default: false
|
||||||
type: boolean
|
type: boolean
|
||||||
|
force_dhcp:
|
||||||
|
description: Force use of DHCP server list for devices to be tracked.
|
||||||
|
required: false
|
||||||
|
default: false
|
||||||
|
type: boolean
|
||||||
|
detection_time:
|
||||||
|
description: How long since the last seen time before the device is marked away, specified in seconds.
|
||||||
|
required: false
|
||||||
|
default: 300
|
||||||
|
type: integer
|
||||||
{% endconfiguration %}
|
{% endconfiguration %}
|
||||||
|
|
||||||
<div class='note info'>
|
|
||||||
|
|
||||||
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.
|
|
||||||
In order to support both login mechanisms, the new configuration option `login_method` has been introduced.
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
## Use a certificate
|
## Use a certificate
|
||||||
|
|
||||||
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:
|
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:
|
|||||||
password: YOUR_PASSWORD
|
password: YOUR_PASSWORD
|
||||||
ssl: true
|
ssl: true
|
||||||
arp_ping: true
|
arp_ping: true
|
||||||
method: dhcp
|
force_dhcp: true
|
||||||
track_devices: true
|
detection_time: 30
|
||||||
|
|
||||||
- host: 192.168.88.2
|
|
||||||
username: homeassistant
|
|
||||||
password: YOUR_PASSWORD
|
|
||||||
ssl: true
|
|
||||||
port: 8729
|
|
||||||
method: capsman
|
|
||||||
track_devices: true
|
|
||||||
```
|
```
|
||||||
|
|
||||||
See the [device tracker integration page](/integrations/device_tracker/) for instructions on how to configure the people to be tracked.
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user