Files
core/homeassistant/components
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-20 11:45:20 +03:00
2018-11-15 14:30:37 +01:00
2018-11-05 09:23:58 +01:00
2018-11-03 12:36:22 +01:00
2018-11-15 14:30:37 +01:00
2018-11-17 18:39:38 +01:00
2018-10-08 16:35:38 +02:00
2018-10-03 23:12:21 +02:00
2018-11-18 18:37:03 +01:00
2018-11-15 14:30:37 +01:00
2018-11-15 14:30:37 +01:00
2018-11-14 02:20:15 +01:00
2018-10-08 20:50:24 +02:00
2018-11-12 15:14:37 +01:00
2018-10-14 17:11:39 +02:00
2018-11-15 14:30:37 +01:00
2018-11-08 00:33:51 +01:00
2018-11-16 11:42:48 +01:00
2018-11-15 14:30:37 +01:00
2018-10-25 16:44:57 +02:00
2018-11-15 14:30:37 +01:00
2018-11-15 14:30:37 +01:00
2018-10-01 08:52:42 +02:00
2018-11-06 10:36:52 +01:00
2018-11-15 14:30:37 +01:00
2018-11-12 09:54:08 -05:00
2018-11-15 14:30:37 +01:00
2018-11-15 14:30:37 +01:00
2018-11-15 14:30:37 +01:00
2018-11-11 23:16:23 +01:00
2018-11-15 14:30:37 +01:00
2018-11-19 10:36:00 +01:00
2018-11-15 14:30:37 +01:00
2018-11-13 10:01:14 +01:00
2018-10-01 08:52:42 +02:00
2018-09-26 18:02:05 +02:00
2018-11-15 14:30:37 +01:00
2018-10-24 22:56:14 +02:00
2018-11-15 14:30:37 +01:00
2018-11-15 14:30:37 +01:00
2018-11-15 14:30:37 +01:00
2018-11-13 10:01:14 +01:00
2018-11-15 14:30:37 +01:00
2018-11-15 14:30:37 +01:00
2018-07-20 11:45:20 +03:00
2018-10-01 08:52:42 +02:00
2018-10-02 07:32:03 +02:00
2018-07-20 11:45:20 +03:00
2018-10-21 19:54:51 +02:00
2018-11-13 14:04:36 +01:00
2018-11-19 11:53:27 +01:00
2018-07-18 11:54:27 +02:00
2018-10-30 21:23:44 +01:00
2018-07-20 11:45:20 +03:00
2018-07-10 13:19:32 +02:00
2018-07-20 11:45:20 +03:00
2018-10-01 08:52:42 +02:00
2018-07-20 11:45:20 +03:00
2018-10-01 08:52:42 +02:00
2018-07-20 11:45:20 +03:00
2018-07-23 14:05:38 +02:00
2018-10-03 06:28:08 +02:00
2018-08-13 10:39:48 -07:00
2018-10-01 08:52:42 +02:00
2018-10-01 08:52:42 +02:00
2018-07-20 11:45:20 +03:00
2018-10-14 23:51:15 +02:00
2018-10-01 08:52:42 +02:00
2018-04-18 15:46:44 -04:00
2018-07-20 11:45:20 +03:00
2018-04-16 21:00:13 +02:00
2018-10-01 08:52:42 +02:00
2018-10-01 08:59:45 +02:00
2018-10-01 08:59:45 +02:00
2018-08-23 22:56:18 +02:00
2018-10-01 08:52:42 +02:00
2018-10-02 11:03:09 +02:00
2018-10-01 08:52:42 +02:00
2018-10-01 08:52:42 +02:00
2018-10-28 23:03:27 +01:00
2018-06-25 13:05:07 -04:00
2018-07-20 11:45:20 +03:00
2018-06-25 13:05:07 -04:00
2018-11-19 10:36:00 +01:00
2018-10-02 10:23:37 +02:00
2018-10-01 08:52:42 +02:00
2018-10-01 08:52:42 +02:00
2018-08-16 14:21:49 +02:00
2018-07-20 11:45:20 +03:00
2018-07-20 11:45:20 +03:00
2018-10-17 23:09:05 +02:00
2018-10-01 08:52:42 +02:00
2018-10-01 08:52:42 +02:00
2018-10-01 08:52:42 +02:00
2018-07-20 11:45:20 +03:00
2018-10-01 08:52:42 +02:00
2018-05-25 06:39:41 +02:00
2018-10-01 08:52:42 +02:00
2018-10-01 08:52:42 +02:00
2018-10-28 13:57:44 +01:00
2018-10-01 08:52:42 +02:00
2018-10-01 08:52:42 +02:00
2018-10-01 08:52:42 +02:00
2018-09-27 23:13:11 +02:00
2018-10-01 08:52:42 +02:00
2018-09-18 14:59:39 +02:00
2018-10-02 11:03:09 +02:00
2018-07-20 11:45:20 +03:00
2018-10-25 23:15:20 +03:00
2018-05-14 09:13:59 +02:00
2018-08-21 15:49:58 +02:00
2018-10-31 09:10:28 +01:00
2018-04-02 10:36:38 +02:00
2018-08-27 21:56:28 +02:00
2018-10-01 08:52:42 +02:00
2018-10-01 08:52:42 +02:00
2018-07-18 11:54:27 +02:00
2018-11-04 17:22:03 +01:00
2018-10-02 11:03:09 +02:00
2018-10-01 08:52:42 +02:00
2018-10-29 15:50:44 +01:00
2018-07-20 11:45:20 +03:00
2018-11-14 09:40:43 -05:00
2018-07-23 14:05:38 +02:00
2018-11-18 19:41:24 +01:00
2018-07-23 10:16:05 +02:00
2018-07-20 11:45:20 +03:00
2018-11-08 18:49:00 +01:00
2018-10-01 08:52:42 +02:00
2018-06-30 17:12:00 +02:00
2018-11-05 09:23:58 +01:00
2018-10-24 18:59:52 +02:00