* 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