diff --git a/source/_integrations/mikrotik.markdown b/source/_integrations/mikrotik.markdown index 1a44836b1a6..fb4519671c0 100644 --- a/source/_integrations/mikrotik.markdown +++ b/source/_integrations/mikrotik.markdown @@ -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. -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 # Example configuration.yaml entry mikrotik: - - host: IP_ADDRESS + - name: Mikrotik + host: IP_ADDRESS username: ROUTEROS_USERNAME password: ROUTEROS_PASSWORD ``` {% configuration %} +name: + description: The name of your Mikrotik device. + required: true + default: Mikrotik + type: string host: description: The IP address of your MikroTik device. required: true @@ -54,12 +61,6 @@ password: description: The password of the given user account on the MikroTik device. required: true 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: description: RouterOS API port. required: false @@ -70,24 +71,23 @@ ssl: required: false default: false 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: description: Use ARP ping with DHCP method for device scanning. required: false default: false 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 %} -
- - 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. - -
- ## 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: @@ -126,16 +126,6 @@ mikrotik: password: YOUR_PASSWORD ssl: true arp_ping: true - method: dhcp - track_devices: true - - - host: 192.168.88.2 - username: homeassistant - password: YOUR_PASSWORD - ssl: true - port: 8729 - method: capsman - track_devices: true + force_dhcp: true + detection_time: 30 ``` - -See the [device tracker integration page](/integrations/device_tracker/) for instructions on how to configure the people to be tracked.