『瀚思彼岸』» 智能家居技术论坛

 找回密码
 立即注册
楼主: kenlau

[进阶教程] Mikrotik路由的device_tracker[实测速度比原生的快]

[复制链接]

12

主题

545

帖子

2037

积分

金牌会员

Rank: 6Rank: 6

积分
2037
金钱
1492
HASS币
0
发表于 2018-4-8 10:25:43 来自手机 | 显示全部楼层
Jones 发表于 2018-3-2 16:19
牛了牛了!只是没听说过这路由呢,感觉很高大上的样子

Ros系统,路由系统之王。ros的设置一本书都写不完
回复

使用道具 举报

0

主题

10

帖子

58

积分

注册会员

Rank: 2

积分
58
金钱
48
HASS币
0
发表于 2018-4-12 17:43:44 | 显示全部楼层
这个要收藏 我用mikrotik
回复

使用道具 举报

66

主题

779

帖子

4407

积分

论坛元老

Rank: 8Rank: 8

积分
4407
金钱
3623
HASS币
20
发表于 2018-4-19 15:39:54 | 显示全部楼层
04-19 15:28:53 ERROR (MainThread) [homeassistant.components.device_tracker] Error setting up platform mikrotik
Traceback (most recent call last):
  File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/components/device_tracker/__init__.py", line 181, in async_setup_platform
    platform.get_scanner, hass, {DOMAIN: p_config})
  File "/usr/lib/python3.5/asyncio/futures.py", line 380, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.5/asyncio/tasks.py", line 304, in _wakeup
    future.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
    raise self._exception
  File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/components/device_tracker/mikrotik.py", line 37, in get_scanner
    scanner = MikrotikDeviceScanner(config[DOMAIN])
  File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/components/device_tracker/mikrotik.py", line 58, in __init__
    from routeros_api import RouterOsApiPool
ImportError: No module named 'routeros_api'
回复

使用道具 举报

66

主题

779

帖子

4407

积分

论坛元老

Rank: 8Rank: 8

积分
4407
金钱
3623
HASS币
20
发表于 2018-4-19 15:58:37 | 显示全部楼层
插件内容我直接替换成lz你的了,配置是下面这个,就报错了
device_tracker: 
  - platform: mikrotik
    host: 192.168.1.2
    username: admin
    password: admin
    interface: LAN
    address_range: 192.168.1.1-192.168.1.254
    interval_seconds: 10 
    consider_home: 20
    new_device_defaults:
      track_new_devices : true
      hide_if_away: false
回复

使用道具 举报

66

主题

779

帖子

4407

积分

论坛元老

Rank: 8Rank: 8

积分
4407
金钱
3623
HASS币
20
发表于 2018-4-19 16:02:55 | 显示全部楼层
插件内容我直接替换成lz你的了,配置是下面这个,就报错了
device_tracker: 
  - platform: mikrotik
    host: 192.168.1.2
    username: admin
    password: admin
    interface: LAN
    address_range: 192.168.1.1-192.168.1.254
    interval_seconds: 10 
    consider_home: 20
    new_device_defaults:
      track_new_devices : true
      hide_if_away: false
回复

使用道具 举报

8

主题

209

帖子

2229

积分

论坛技术达人

积分
2229
金钱
2020
HASS币
0
 楼主| 发表于 2018-4-19 20:17:37 | 显示全部楼层
guitengyue 发表于 2018-4-19 16:02
插件内容我直接替换成lz你的了,配置是下面这个,就报错了
[code]device_tracker: ...

device_tracker:
  - platform: mikrotik_netwatch
    host: 192.168.1.2
    username: admin
    password: admin
    interface: LAN
    address_range: 192.168.1.1-192.168.1.254
    interval_seconds: 10
    consider_home: 20
    new_device_defaults:
      track_new_devices : true
      hide_if_away: false

官方自带的是mikrotik,把脚本文件和名字改一下吧
回复

使用道具 举报

66

主题

779

帖子

4407

积分

论坛元老

Rank: 8Rank: 8

积分
4407
金钱
3623
HASS币
20
发表于 2018-4-19 21:46:02 | 显示全部楼层
kenlau 发表于 2018-4-19 20:17
device_tracker:
  - platform: mikrotik_netwatch
    host: 192.168.1.2

因为没办法把你的脚本上传到该文件夹内,于是我把脚本里面的内容替换掉了,其实就是你的脚本
回复

使用道具 举报

66

主题

779

帖子

4407

积分

论坛元老

Rank: 8Rank: 8

积分
4407
金钱
3623
HASS币
20
发表于 2018-4-19 22:53:37 | 显示全部楼层
本帖最后由 guitengyue 于 2018-4-19 23:04 编辑

重新上传了个文件,并改了名字,好像真的不一定了
现在报错这个,郁闷 QQ拼音截图未命名.png QQ拼音截图未命名1.png

-04-19 22:58:47 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/lib/python3.5/asyncio/tasks.py", line 241, in _step
    result = coro.throw(exc)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/components/device_tracker/__init__.py", line 744, in async_device_tracker_scan
    host_name = yield from scanner.async_get_device_name(mac)
  File "/usr/lib/python3.5/asyncio/futures.py", line 380, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.5/asyncio/tasks.py", line 304, in _wakeup
    future.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
    raise self._exception
  File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/components/device_tracker/mikrotik_netwatch.py", line 110, in get_device_name
    str(self._name_from_leases(mac)))
  File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/components/device_tracker/mikrotik_netwatch.py", line 123, in _name_from_leases
    lease = next((rec for rec in self.leases if rec['mac-address'] == mac), None)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/components/device_tracker/mikrotik_netwatch.py", line 123, in <genexpr>
    lease = next((rec for rec in self.leases if rec['mac-address'] == mac), None)
KeyError: 'mac-address'
2018-04-19 22:58:58 ERROR (Thread-14) [homeassistant.components.device_tracker.mikrotik_netwatch] Can't define 192.168.1.208 IP mac address, neither ip-scan, nor DHCP Server - Leases has this info.
2018-04-19 22:58:58 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/lib/python3.5/asyncio/tasks.py", line 241, in _step
    result = coro.throw(exc)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/components/device_tracker/__init__.py", line 744, in async_device_tracker_scan
    host_name = yield from scanner.async_get_device_name(mac)
  File "/usr/lib/python3.5/asyncio/futures.py", line 380, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.5/asyncio/tasks.py", line 304, in _wakeup
    future.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
    raise self._exception
  File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/components/device_tracker/mikrotik_netwatch.py", line 110, in get_device_name
    str(self._name_from_leases(mac)))
  File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/components/device_tracker/mikrotik_netwatch.py", line 123, in _name_from_leases
    lease = next((rec for rec in self.leases if rec['mac-address'] == mac), None)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/components/device_tracker/mikrotik_netwatch.py", line 123, in <genexpr>
    lease = next((rec for rec in self.leases if rec['mac-address'] == mac), None)
KeyError: 'mac-address'
2018-04-19 22:59:00 ERROR (Thread-21) [homeassistant.components.light.yeelight] Failed to connect to bulb 192.168.0.190, yeelight_rgb_34ce0084e2ce: A socket error occurred when sending the command.
2018-04-19 22:59:09 ERROR (Thread-20) [homeassistant.components.device_tracker.mikrotik_netwatch] Can't define 192.168.1.208 IP mac address, neither ip-scan, nor DHCP Server - Leases has this info.
2018-04-19 22:59:09 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/lib/python3.5/asyncio/tasks.py", line 241, in _step
    result = coro.throw(exc)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/components/device_tracker/__init__.py", line 744, in async_device_tracker_scan
    host_name = yield from scanner.async_get_device_name(mac)
  File "/usr/lib/python3.5/asyncio/futures.py", line 380, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.5/asyncio/tasks.py", line 304, in _wakeup
    future.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
    raise self._exception
  File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/components/device_tracker/mikrotik_netwatch.py", line 110, in get_device_name
    str(self._name_from_leases(mac)))
  File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/components/device_tracker/mikrotik_netwatch.py", line 123, in _name_from_leases
    lease = next((rec for rec in self.leases if rec['mac-address'] == mac), None)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/components/device_tracker/mikrotik_netwatch.py", line 123, in <genexpr>
    lease = next((rec for rec in self.leases if rec['mac-address'] == mac), None)
KeyError: 'mac-address'
2018-04-19 22:59:20 ERROR (Thread-8) [homeassistant.components.device_tracker.mikrotik_netwatch] Can't define 192.168.1.208 IP mac address, neither ip-scan, nor DHCP Server - Leases has this info.
2018-04-19 22:59:20 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/lib/python3.5/asyncio/tasks.py", line 241, in _step
    result = coro.throw(exc)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/components/device_tracker/__init__.py", line 744, in async_device_tracker_scan
    host_name = yield from scanner.async_get_device_name(mac)
  File "/usr/lib/python3.5/asyncio/futures.py", line 380, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.5/asyncio/tasks.py", line 304, in _wakeup
    future.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
    raise self._exception
  File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/components/device_tracker/mikrotik_netwatch.py", line 110, in get_device_name
    str(self._name_from_leases(mac)))
  File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/components/device_tracker/mikrotik_netwatch.py", line 123, in _name_from_leases
    lease = next((rec for rec in self.leases if rec['mac-address'] == mac), None)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/components/device_tracker/mikrotik_netwatch.py", line 123, in <genexpr>
    lease = next((rec for rec in self.leases if rec['mac-address'] == mac), None)
KeyError: 'mac-address'
2018-04-19 22:59:31 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/lib/python3.5/asyncio/tasks.py", line 241, in _step
    result = coro.throw(exc)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/components/device_tracker/__init__.py", line 744, in async_device_tracker_scan
    host_name = yield from scanner.async_get_device_name(mac)
  File "/usr/lib/python3.5/asyncio/futures.py", line 380, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.5/asyncio/tasks.py", line 304, in _wakeup
    future.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
    raise self._exception
  File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/components/device_tracker/mikrotik_netwatch.py", line 110, in get_device_name
    str(self._name_from_leases(mac)))
  File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/components/device_tracker/mikrotik_netwatch.py", line 123, in _name_from_leases
    lease = next((rec for rec in self.leases if rec['mac-address'] == mac), None)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/components/device_tracker/mikrotik_netwatch.py", line 123, in <genexpr>
    lease = next((rec for rec in self.leases if rec['mac-address'] == mac), None)
KeyError: 'mac-address'
2018-04-19 22:59:42 ERROR (Thread-18) [homeassistant.components.device_tracker.mikrotik_netwatch] Can't define 192.168.1.208 IP mac address, neither ip-scan, nor DHCP Server - Leases has this info.
2018-04-19 22:59:42 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/lib/python3.5/asyncio/tasks.py", line 241, in _step
    result = coro.throw(exc)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/components/device_tracker/__init__.py", line 744, in async_device_tracker_scan
    host_name = yield from scanner.async_get_device_name(mac)
  File "/usr/lib/python3.5/asyncio/futures.py", line 380, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.5/asyncio/tasks.py", line 304, in _wakeup
    future.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
    raise self._exception
  File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/components/device_tracker/mikrotik_netwatch.py", line 110, in get_device_name
    str(self._name_from_leases(mac)))
  File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/components/device_tracker/mikrotik_netwatch.py", line 123, in _name_from_leases
    lease = next((rec for rec in self.leases if rec['mac-address'] == mac), None)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/components/device_tracker/mikrotik_netwatch.py", line 123, in <genexpr>
    lease = next((rec for rec in self.leases if rec['mac-address'] == mac), None)
KeyError: 'mac-address'
2018-04-19 22:59:53 ERROR (Thread-9) [homeassistant.components.device_tracker.mikrotik_netwatch] Can't define 192.168.1.208 IP mac address, neither ip-scan, nor DHCP Server - Leases has this info.
2018-04-19 22:59:53 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/lib/python3.5/asyncio/tasks.py", line 241, in _step
    result = coro.throw(exc)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/components/device_tracker/__init__.py", line 744, in async_device_tracker_scan
    host_name = yield from scanner.async_get_device_name(mac)
  File "/usr/lib/python3.5/asyncio/futures.py", line 380, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.5/asyncio/tasks.py", line 304, in _wakeup
    future.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
    raise self._exception
  File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/components/device_tracker/mikrotik_netwatch.py", line 110, in get_device_name
    str(self._name_from_leases(mac)))
  File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/components/device_tracker/mikrotik_netwatch.py", line 123, in _name_from_leases
    lease = next((rec for rec in self.leases if rec['mac-address'] == mac), None)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/components/device_tracker/mikrotik_netwatch.py", line 123, in <genexpr>
    lease = next((rec for rec in self.leases if rec['mac-address'] == mac), None)
KeyError: 'mac-address'
2018-04-19 23:00:04 ERROR (Thread-20) [homeassistant.components.device_tracker.mikrotik_netwatch] Can't define 192.168.1.208 IP mac address, neither ip-scan, nor DHCP Server - Leases has this info.
2018-04-19 23:00:04 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/lib/python3.5/asyncio/tasks.py", line 241, in _step
    result = coro.throw(exc)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/components/device_tracker/__init__.py", line 744, in async_device_tracker_scan
    host_name = yield from scanner.async_get_device_name(mac)
  File "/usr/lib/python3.5/asyncio/futures.py", line 380, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.5/asyncio/tasks.py", line 304, in _wakeup
    future.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
    raise self._exception
  File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/components/device_tracker/mikrotik_netwatch.py", line 110, in get_device_name
    str(self._name_from_leases(mac)))
  File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/components/device_tracker/mikrotik_netwatch.py", line 123, in _name_from_leases
    lease = next((rec for rec in self.leases if rec['mac-address'] == mac), None)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/components/device_tracker/mikrotik_netwatch.py", line 123, in <genexpr>
    lease = next((rec for rec in self.leases if rec['mac-address'] == mac), None)
KeyError: 'mac-address'
2018-04-19 23:00:15 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/lib/python3.5/asyncio/tasks.py", line 241, in _step
    result = coro.throw(exc)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/components/device_tracker/__init__.py", line 744, in async_device_tracker_scan
    host_name = yield from scanner.async_get_device_name(mac)
  File "/usr/lib/python3.5/asyncio/futures.py", line 380, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.5/asyncio/tasks.py", line 304, in _wakeup
    future.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
    raise self._exception
  File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/components/device_tracker/mikrotik_netwatch.py", line 110, in get_device_name
    str(self._name_from_leases(mac)))
  File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/components/device_tracker/mikrotik_netwatch.py", line 123, in _name_from_leases
    lease = next((rec for rec in self.leases if rec['mac-address'] == mac), None)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/components/device_tracker/mikrotik_netwatch.py", line 123, in <genexpr>
    lease = next((rec for rec in self.leases if rec['mac-address'] == mac), None)
KeyError: 'mac-address'
2018-04-19 23:00:25 ERROR (Thread-9) [homeassistant.components.device_tracker.mikrotik_netwatch] Can't define 192.168.1.208 IP mac address, neither ip-scan, nor DHCP Server - Leases has this info.
2018-04-19 23:00:25 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/lib/python3.5/asyncio/tasks.py", line 241, in _step
    result = coro.throw(exc)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/components/device_tracker/__init__.py", line 744, in async_device_tracker_scan
    host_name = yield from scanner.async_get_device_name(mac)
  File "/usr/lib/python3.5/asyncio/futures.py", line 380, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.5/asyncio/tasks.py", line 304, in _wakeup
    future.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
    raise self._exception
  File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/components/device_tracker/mikrotik_netwatch.py", line 110, in get_device_name
    str(self._name_from_leases(mac)))
  File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/components/device_tracker/mikrotik_netwatch.py", line 123, in _name_from_leases
    lease = next((rec for rec in self.leases if rec['mac-address'] == mac), None)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/components/device_tracker/mikrotik_netwatch.py", line 123, in <genexpr>
    lease = next((rec for rec in self.leases if rec['mac-address'] == mac), None)
KeyError: 'mac-address'

回复

使用道具 举报

66

主题

779

帖子

4407

积分

论坛元老

Rank: 8Rank: 8

积分
4407
金钱
3623
HASS币
20
发表于 2018-4-19 23:42:11 | 显示全部楼层
单测一个ip,也报错。。。
回复

使用道具 举报

12

主题

114

帖子

1412

积分

金牌会员

Rank: 6Rank: 6

积分
1412
金钱
1298
HASS币
0
发表于 2018-12-25 00:13:56 | 显示全部楼层
报错哎

2018-12-25 00:11:52 ERROR (MainThread) [homeassistant.components.device_tracker] Error setting up platform mikrotik_netwatch
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/device_tracker/__init__.py", line 176, in async_setup_platform
    platform.get_scanner, hass, {DOMAIN: p_config})
  File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/device_tracker/mikrotik_netwatch.py", line 37, in get_scanner
    scanner = MikrotikDeviceScanner(config[DOMAIN])
  File "/config/custom_components/device_tracker/mikrotik_netwatch.py", line 58, in __init__
    from routeros_api import RouterOsApiPool
ModuleNotFoundError: No module named 'routeros_api'
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-11-24 17:35 , Processed in 0.640730 second(s), 32 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表