Mikrotik
The MikroTik integration offers presence detection by looking at connected devices to a MikroTik RouterOS based router.
There is currently support for the following device types within Home Assistant:
- Presence detection
Prerequisites
You have to enable accessing the RouterOS API on your router to use this platform.
RouterOS uses a ping test to determine client presence, make sure you are not blocking this on the client (Windows firewall default behavior), as this will result in the provided device_tracker having the state not_home.
Terminal:
Web Frontend:
Go to IP > Services > API and enable it.
Make sure that port 8728 or the port you choose is accessible from your network.
此集成可通过 UI 配置。前往 设置 > 设备与服务 添加。
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:
If everything is working fine you can disable the pure api service in RouterOS:
The user privileges in RouterOS
To use this device tracker, you only need limited privileges. To enhance the security of your MikroTik device, create a "read only" group with solely API and ping test permissions and add a user to that group:
You will be prompted to set a password for the newly created user. Depending on your RouterOS version and configuration, you might need to set a password yourself:

