Skip to content

mrin/domoticz-routeros-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Mikrotik RouterOS - Domoticz Python plugin

Plugin supports:

  • Bandwidth usage monitor for selected interface.
  • Manage interface status

See this link for more information on the Domoticz plugins.

Installation

Before installation plugin check the python3, python3-dev and python3-pip is installed for Domoticz plugin system:

sudo apt-get install python3 python3-dev python3-pip

Also need to install setuptools and virtualenv:

sudo pip3 install -U setuptools virtualenv

Then go to the plugins folder:

cd domoticz/plugins
git clone https://github.com/mrin/domoticz-routeros-plugin.git mikrotik

# installing dependencies:
cd mikrotik
virtualenv -p python3 .env
source .env/bin/activate
pip install git+https://github.com/mrin/miktapi
deactivate

Restart the Domoticz service

sudo service domoticz.sh restart

Now go to Setup -> Hardware in your Domoticz interface and add type with name Mikrotik RouterOS.

Field Information
Data Timeout Keep Disabled
IP address Enter the IP address of Mikrotik RouterOS
API Port default 8728
API Username routeros username (see Configure API credentials)
API Password routeros password (see Configure API credentials)
Update interval In seconds, this determines with which interval the plugin polls RouterOS stats
Bandwidth Interface Interface name, ex. pppoe-out1, ether2
Status Interface Interface name, ex. pppoe-out1, ether2
Debug When set to true the plugin shows additional information in the Domoticz log

After clicking on the Add button the new devices are available in Setup -> Devices.

Update plugin

cd domoticz/plugins/mikrotik
git pull

Restart the Domoticz service

sudo service domoticz.sh restart

Screenshots

up down status

Configure API credentials

RouterOS Winbox

  1. Enabling API.

Go to IP -> Services and enable api service.

  1. Creating API user.

Go to System -> Users, tab Groups. Create new group with permissions: api, read, write.

Then after group created go to tab Users and create new. Associate this user with group previously created.

Done.

About

Mikrotik RouterOS plugin for Domoticz

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages