Files
core/homeassistant/components/device_tracker
Soós Péter 3891f2eebe Add mikrotik SSL support (#17898)
* Update mikrotik.py

* Update mikrotik.py

* Added basic  api_ssl support

Added preliminary support to use api_ssl instead of api. It don't check the validity of the certificate need it.
At Home Assistant side add ssl = true to your sensor configuration, and don't forget to change the port too (to 8729 by default):

device_tracker:
  - platform: mikrotik
    host: 192.168.88.1
    port: 8729
    ssl: true
    username: homeassistant
    password: TopSecret

At MikroTik side you have to add or generate a certificate, and configure api_ssl to use it. Here is an example:

/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
/ip service disable api
/user group add name=homeassistant policy=read,api,!local,!telnet,!ssh,!ftp,!reboot,!write,!policy,!test,!winbox,!password,!web,!sniff,!sensitive,!romon,!dude,!tikapp
/user add group=homeassistant name=homeassistant
/user set password="TopSecret" homeassistant

* Fixed import missind ssl lib

* SSL support code cleanup, use ssl-api port by default if ssl enabled

* Restored accidentalli deleted method parameter

* Fixed Python 3.5.3 compilation errors

Fixed Python 3.5.3 compilation errors reported by Travis CI

* Removed duplicated MTK_DEFAULT_API_PORT
2018-11-19 16:54:09 +01:00
..
2018-07-23 10:16:05 +02:00
2018-10-02 11:03:09 +02:00
2017-04-29 22:04:49 -07:00
2018-10-30 07:35:23 +01:00
2018-10-02 11:03:09 +02:00
2018-05-17 19:44:01 +02:00
2018-10-01 08:59:45 +02:00
2018-11-06 13:15:48 +01:00
2018-10-02 11:03:09 +02:00
2018-11-19 16:54:09 +01:00
2018-10-02 11:03:09 +02:00
2018-10-02 11:03:09 +02:00
2018-11-05 19:00:46 -05:00
2018-10-01 08:59:45 +02:00
2018-08-07 18:12:36 +02:00
2018-08-07 09:13:01 +02:00
2018-07-20 11:45:20 +03:00
2018-11-12 19:10:03 -07:00
2018-07-23 10:16:05 +02:00
2018-10-25 23:15:20 +03:00
2018-11-05 09:28:02 +01:00
2018-07-20 11:45:20 +03:00
2018-07-17 19:34:29 +02:00
2018-10-01 08:59:45 +02:00
2017-09-23 17:15:46 +02:00