core: Mikrotik hub is broken?
Home Assistant release with the issue: 0.103.5
Last working Home Assistant release (if known): N/A, this is my first attempt to configure mikrotik
Operating environment (Hass.io/Docker/Windows/etc.): Python virtualenv on debian testing installed as systemd container
Integration: https://www.home-assistant.io/integrations/mikrotik/
Description of problem:
Can’t get to work mikrotik hub. Getting following error:
Error during setup of component mikrotik
I’m using 6.46.1 routeros.
Problem-relevant configuration.yaml
entries and (fill out even if it seems unimportant):
mikrotik:
- host: 192.168.1.1
username: secret
password: secret
login_method: plain
port: 8728
Traceback (if applicable):
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/setup.py", line 176, in _async_setup_component
component.setup, hass, processed_config # type: ignore
File "/usr/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/mikrotik/__init__.py", line 94, in setup
api.connect_to_device()
File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/mikrotik/__init__.py", line 163, in connect_to_device
self.hostname = self.get_hostname()
File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/mikrotik/__init__.py", line 169, in get_hostname
data = self.command(MIKROTIK_SERVICES[IDENTITY])
File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/mikrotik/__init__.py", line 179, in command
if not self.connect_to_device():
<lots of repeated lines>
File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/mikrotik/__init__.py", line 151, in connect_to_device
self._host, self._user, self._password, **kwargs
File "/srv/homeassistant/lib/python3.7/site-packages/librouteros/__init__.py", line 48, in connect
method(api=api, username=username, password=password)
File "/srv/homeassistant/lib/python3.7/site-packages/librouteros/login.py", line 25, in login_plain
api('/login', **{'name': username, 'password': password})
File "/srv/homeassistant/lib/python3.7/site-packages/librouteros/api.py", line 79, in __call__
return self.rawCmd(cmd, *words)
File "/srv/homeassistant/lib/python3.7/site-packages/librouteros/api.py", line 90, in rawCmd
self.protocol.writeSentence(cmd, *args)
File "/srv/homeassistant/lib/python3.7/site-packages/librouteros/connections.py", line 137, in writeSentence
encoded = self.encodeSentence(cmd, *words)
File "/srv/homeassistant/lib/python3.7/site-packages/librouteros/connections.py", line 23, in encodeSentence
encoded = b''.join(encoded)
File "/srv/homeassistant/lib/python3.7/site-packages/librouteros/connections.py", line 36, in encodeWord
return Encoder.encodeLength(len(word)) + encoded_word
File "/srv/homeassistant/lib/python3.7/site-packages/librouteros/connections.py", line 46, in encodeLength
if length < 128:
RecursionError: maximum recursion depth exceeded in comparison
Additional information:
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 29 (14 by maintainers)
Yup, it works! Also:
Great job! Thanks.