From a1e3c14550106f9ab2007ce88bdf887a4e21e6a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?So=C3=B3s=20P=C3=A9ter?= Date: Tue, 20 Nov 2018 00:42:56 +0100 Subject: [PATCH] Added api-ssl related documentation (#7184) * Added api-ssl related documentation * Updated to refer to the last changes in parent PR * Fixed typos * Fixed conflicts Fixed conflicts with the home-assistant/home-assistant.io --- .../device_tracker.mikrotik.markdown | 22 +++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/source/_components/device_tracker.mikrotik.markdown b/source/_components/device_tracker.mikrotik.markdown index 1183060b972..8e839945c87 100644 --- a/source/_components/device_tracker.mikrotik.markdown +++ b/source/_components/device_tracker.mikrotik.markdown @@ -30,7 +30,7 @@ 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 an Mikrotik router in your installation, add the following to your `configuration.yaml` file: +To use a Mikrotik router in your installation, add the following to your `configuration.yaml` file: ```yaml # Example configuration.yaml entry @@ -57,12 +57,30 @@ password: port: description: Mikrotik API port. required: false - default: 8728 + default: 8728 (or 8729 if ssl is true) type: integer +ssl: + description: Use api_ssl service instead of api. + 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 `ip` for DHCP leases. required: false type: string {% endconfiguration %} +To use api_ssl service further configuration is required at RouterOS side. You have to upload or generate a certificate for api\-ssl service. Here is an example for a self signed certificate: + +```bash +/certificate add common-name="Self signed demo certificate for API" days-valid=3650 name="Self signed demo certificate for API" key-usage=digital-signature,key-encipherment,tls-server,key-cert-sign,crl-sign +/certificate sign "Self signed demo certificate for API" +/ip service set api-ssl certificate="Self signed demo certificate for API" +/ip service enable api-ssl +``` +If everything is working you can disable the pure api service: + +```bash +/ip service disable api +``` See the [device tracker component page](/components/device_tracker/) for instructions how to configure the people to be tracked.