tomaae / homeassistant-mikrotik_router Goto Github PK
View Code? Open in Web Editor NEWMikrotik router integration for Home Assistant
License: Apache License 2.0
Mikrotik router integration for Home Assistant
License: Apache License 2.0
I got the following error:
Fri Dec 20 2019 13:23:45 GMT+0300 (Москва, стандартное время)
Error setting up entry Mikrotik_R for mikrotik_router
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 192, in async_setup
hass, self
File "/config/custom_components/mikrotik_router/init.py", line 48, in async_setup_entry
await mikrotik_controller.async_update()
File "/config/custom_components/mikrotik_router/mikrotik_controller.py", line 160, in async_update
self.get_nat()
File "/config/custom_components/mikrotik_router/mikrotik_controller.py", line 391, in get_nat
self.data['nat'][uid]['name'] = "{}:{}".format(entry['protocol'], entry['dst-port'])
KeyError: 'dst-port'
To Reproduce
Software (please complete the following information):
Hass.io / Home Assistant version: Hassio v193 / HA v 0.103.2
Mikrotik Hardware: hAP ac²
Mikrotik Software version: v6.46.1
Describe the bug
A clear and concise description of what the bug is.
On integration setup page there is a select option for unit of mesurement. Regardless of what is selected unit is always default Kbps. Only when you go into integration options can you make real changes that are propagated to all sensors.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Selected unit of mesurement is used
Software (please complete the following information):
Additional context
Mikrotik controller is using config_entry.options variable to pull UNIT_OF_MEASUREMENT, it seems this is not filled with data on integration setup, only when to options are changed. I could be wrong tho, I'm not really expirienced with HA's config flows..
@property
def option_traffic_type(self):
"""Config entry option to not track ARP."""
return self.config_entry.options.get(
CONF_UNIT_OF_MEASUREMENT, DEFAULT_TRAFFIC_TYPE
)
I've installed your plugin from HACS. I have restarted HA but I never get the option to add the Mikrotik Router in Configuration --> Integrations --> Add. I have uninstalled and reinstalled a few times with no luck. I'm not getting any errors and I'm running the newest version of HA supervised in docker off the offical image. What info do I need to provide you to troubleshoot this further as I'd really like to use this plugin.
I have a static route I sometimes turn on when my main ISP fails (quite often actually) I have a script to enable the route and another script to disable it when connection works again.
How can I tell from HA if this route is enabled?
While I'm writing this I am thinking... there is also a NAT rule which I could deactivate (not necessary) when I activate the route rule so I could use this as workaround, but not ideal. In any case if this is a FR could instead there be access to read variables in mikrotik from HA? Or in any case do scripts support returning a value?
Disabled DHCP leases are added to the list of availailable HA devices for the integration.
Disabled Mikrotik objects (DHCP leases, etc) should not be exposed by the integration.
Describe the bug
Following error appears in the log, everything seems to work fine.
Expected behavior
No errors in the log.
Log details
Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/config/custom_components/mikrotik_router/mikrotik_controller.py", line 57, in force_update
await self.async_update()
File "/config/custom_components/mikrotik_router/mikrotik_controller.py", line 135, in async_update
await self.hass.async_add_executor_job(self.get_interface_client)
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/mikrotik_router/mikrotik_controller.py", line 239, in get_interface_client
mac2ip, bridge_used = self.update_arp(mac2ip, bridge_used)
File "/config/custom_components/mikrotik_router/mikrotik_controller.py", line 267, in update_arp
if entry['interface'] == "bridge":
KeyError: 'interface'
Software (please complete the following information):
Describe the bug
No device or entity is added from the given router. The log has the following entries:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 216, in async_setup
hass, self
File "/config/custom_components/mikrotik_router/init.py", line 34, in async_setup_entry
await controller.async_update()
File "/config/custom_components/mikrotik_router/mikrotik_controller.py", line 359, in async_update
await self.hass.async_add_executor_job(self.get_dhcp)
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/mikrotik_router/mikrotik_controller.py", line 857, in get_dhcp
self.data["dhcp"][uid]["server"]
KeyError: 'unknown'
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Regardless of the DHCP Server value the devices should be detected/added.
Screenshots
If applicable, add screenshots to help explain your problem.
Software:
Additional context
When processing the response of the API query: /ip/dhcp-server/lease
Example with DHCP Server set to one of the DHCP servers:
2020-04-12 21:57:10 DEBUG (SyncWorker_10) [custom_components.mikrotik_router.helper] Processing entry {'.id': '*77', 'address': '192.168.XX.15', 'mac-address': 'XX:XX:XX:XX:XX:XX', 'client-id': '1:XX:XX:XX:XX:XX:XX', 'address-lists': '', 'server': 'default-LAN', 'dhcp-option': '', 'status': 'waiting', 'last-seen': '262w2d16h39m54s', 'host-name': 'hostname', 'radius': False, 'dynamic': False, 'blocked': False, 'disabled': False, 'comment': 'comment'}
Example with DHCP Server set to 'all':
2020-04-12 21:57:10 DEBUG (SyncWorker_10) [custom_components.mikrotik_router.helper] Processing entry {'.id': '*B5', 'address': '192.168.XX.20', 'mac-address': 'YY:YY:YY:YY:YY:YY', 'client-id': '1:YY:YY:YY:YY:YY:YY', 'address-lists': '', 'dhcp-option': '', 'status': 'waiting', 'last-seen': '2w2d9h35m4s', 'host-name': 'hostname2', 'radius': False, 'dynamic': False, 'blocked': False, 'disabled': False, 'comment': 'comment'}
So in the second example the 'server' entry is missing.
Device tracking stops working after a few hours/days after all tracked devices go offline and stay offline.
The tracked devices would remain in Away state even after they are visible in the DHCP leases on Mikrotik side. After a HA restart it suddenly starts working again. Happens with wired and wireless devices as well.
Similar to problems described in #24.
Not clear. Maybe the following:
The device would move to Home state.
Did not see any errors or warnings in the HA log. Changed log level to debug, but so far the issue has not appeared. Once the issue comes again, I'll recheck the logs.
Do you have any idea how could I debug this issue?
Hi! Can you add support for virlual wlan switches? I want to turn on and off my guest wifi network :)
Describe the bug
Getting an error, not sure what's missing.
To Reproduce
Expected behavior
No errors.
Screenshots
Error while setting up platform mikrotik_router
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 150, in _async_setup_platform
await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, in wait_for
return fut.result()
File "/config/custom_components/mikrotik_router/switch.py", line 89, in async_setup_entry
update_controller()
File "/config/custom_components/mikrotik_router/switch.py", line 83, in update_controller
update_items(inst, mikrotik_controller, async_add_entities, switches)
File "/config/custom_components/mikrotik_router/switch.py", line 107, in update_items
switches[item_id].async_schedule_update_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 432, in async_schedule_update_ha_state
self.hass.async_create_task(self.async_update_ha_state(force_refresh))
AttributeError: 'NoneType' object has no attribute 'async_create_task'
Software (please complete the following information):
Additional context
Add any other context about the problem here.
Please add support for Icelandic language is_IS. Native name Íslenska ( which means Icelandic)
Thanks
Samúel Jón Gunnarsson
You do a fine job modifying and tuning the librouteros library. If one day this integration becomes official, it would need to be published to pypi.
Describe the solution you'd like
Either contribute back the improvements to the original librouteros (unlikely because there would be breaking changes AFAIK) or publish your own fork.
Describe alternatives you've considered
NA
Check for duplicate NAT entries and disable them.
Check for a way to make entries more unique since there is no permanent unique ID available for NAT entry.
Entity initialization fails when device is offline during hass boot
Could you improve the documentation on this project? It leaves a lot of unanswered questions:
Refers to the built-in Mikrotik integration (Configuration -> Integrations -> Add -> Mikrotik), however, there's no clarity on whether this code is the same as the built-in integration. e.g. the built-in integration only produces device tracking (no scripts, interfaces visibility, etc - unless there is something wrong with my setup).
Assuming there's a difference in the code, what is the installation steps? Assuming copying of the code to custom_components, but what about configuration.yaml?
Sample howto describing triggering a script or disabling an interface would also be appreciated
Thanks
The devices from the Sonos integration have their name, manufacturer and model overwritten by the Mikrotik integration. This makes it hard to identify devices since they are now all called SonosZP.
All my Sonos devices show in the device overview the following information (which comes from Mikrotik) instead of the original information.
name: SonosZP
manufacturer: MikroTik
model: RB4011iGS+5HacQ2HnD
area: Zolder
integration: Mikrotik Router, Sonos
I just added the Mikrotik Router integration to my setup that already had the Sonos integration.
Information provided by "main" integration is left alone.
No errors
Nothing to add
sensor temperatura not working
Hi, I think that will be very useful, to use hotspot to validate into the Hassio
The idea is to login in hotspot and redirect and validate directly to HA
This solution will solve the user unfriendly of HA and permit all functionalities of hotspot
Thanks for your works!
The switch entities for the individual queues are not updated when the queue is disabled or enabled. It can write the state, but not read (the other switches e.g. on interfaces or NAT work fine). In the integration, the switch is on all the time, when I turn it off, it will disable the queue, but the switch state will shortly change back to on (but the queue will stay disabled).
Or, if I enable/disable the queue, the switch will stay on all the time.
Configure a simple queue on the router, Enable/disable the queue and observe the related switch in HA.
The switch should reflect the state of the queue and can be used to enable/disable queue
mikrotik_router: the '.translations' directory has been moved, the new name is 'translations', starting with Home Assistant 0.111 your translations will no longer load if you do not move/rename this (but this is not related I suppose - they made a change in 0.109.0 (should have created another bug for that)
And You are using a custom integration for mikrotik_router which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant, which is a default.
No other errors.
No
Adding support for Kid Control, with possibility to pause/resume/enable/disable and view current status.
/ip kid-control
For now I create a mikrotik scipt for each kid and use the current script execution support. But I have no sollution to retrieve current status.
Is your feature request related to a problem? Please describe.
Not really a problem, HA release 0.105 will include librouteros version 3.0.0.
Describe the solution you'd like
Remove the included librouteros library. Mostly revert commits related to #2.
Hi @tomaae ,
Congrats for the hard work, looks like you’ve done a lot here.
One question from me is related to using this component with a read-only user in Mikrotik. I’m just planning to get some system stats from multiple Mikrotik routers/APs that I have, as well as device-tracker functionality (hopefully roaming between monitored Mikrotiks will work). No fancy features like interface graphing, queue graphing etc. is required for me (as I already get them through the Dude and don’t want to overload HA with additional data).
I tried to install it, but I get constant and repeated errors, especially with accounting.
Thanks in advance...
hassio 0.102.3
RB2011UAS-2HnD version 6.22
hassio log:
Traceback (most recent call last):
File "/config/custom_components/mikrotik_router/mikrotik_controller.py", line 86, in force_update
await self.async_update()
File "/config/custom_components/mikrotik_router/mikrotik_controller.py", line 156, in async_update
await self.async_fwupdate_check()
File "/config/custom_components/mikrotik_router/mikrotik_controller.py", line 144, in async_fwupdate_check
self.get_firmare_update()
File "/config/custom_components/mikrotik_router/mikrotik_controller.py", line 452, in get_firmare_update
data = self.api.path("/system/package/update")
File "/config/custom_components/mikrotik_router/mikrotikapi.py", line 125, in path
tuple(response)
File "/config/custom_components/mikrotik_router/librouteros_custom/api.py", line 103, in iter
yield from self('print')
File "/config/custom_components/mikrotik_router/librouteros_custom/api.py", line 108, in call
**kwargs,
File "/config/custom_components/mikrotik_router/librouteros_custom/api.py", line 27, in call
self.protocol.writeSentence(cmd, *words)
File "/config/custom_components/mikrotik_router/librouteros_custom/protocol.py", line 181, in writeSentence
self.transport.write(encoded)
File "/config/custom_components/mikrotik_router/librouteros_custom/connections.py", line 16, in write
self.sock.sendall(data)
2020-08-22 15:22:02 ERROR (MainThread) [homeassistant.util.logging] Exception in update_controller when dispatching 'mikrotik_router-update-Mikrotik': ()
Traceback (most recent call last):
File "/config/custom_components/mikrotik_router/device_tracker.py", line 91, in update_controller
update_items(
File "/config/custom_components/mikrotik_router/device_tracker.py", line 142, in update_items
tracked[item_id].async_schedule_update_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 426, in async_schedule_update_ha_state
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 274, in async_write_ha_state
raise RuntimeError(f"Attribute hass is None for {self}")
RuntimeError: Attribute hass is None for
2020-08-22 15:22:02 ERROR (MainThread) [homeassistant.util.logging] Exception in update_controller when dispatching 'mikrotik_router-update-Mikrotik': ()
Traceback (most recent call last):
File "/config/custom_components/mikrotik_router/switch.py", line 89, in update_controller
update_items(inst, mikrotik_controller, async_add_entities, switches)
File "/config/custom_components/mikrotik_router/switch.py", line 138, in update_items
switches[item_id].async_schedule_update_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 426, in async_schedule_update_ha_state
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 274, in async_write_ha_state
raise RuntimeError(f"Attribute hass is None for {self}")
RuntimeError: Attribute hass is None for
It's just simple appears in the HA log periodically.
No exceptions.
Hello there,
I use the device tracking funktion, but some reason, i not use CapsMAN. I monitor your integration two AP, but if one miss the connection and connect it to other one (move in the house) the person state went to "away" It is a big problem in my case, because i control it this the alarm system auto on/off. So it this case, the alarm system go to "away" mode and trigger the alarm.
I read that the timeout is not working on wireless mode, so i don't know how to solve it.
Any idea?
Is your feature request related to a problem? Please describe.
NA
Describe the solution you'd like
There is another custom Mikrotik component that implements service calls for scripts. It would be nice if that feature gets integrated in this component as well. Perhaps other service calls too? (e.g. check for updates so users can automate it, the component should not check itself at an interval).
Describe alternatives you've considered
Use the other custom component as well.
Additional context
Linkt to the custom component: https://github.com/pilotak/homeassistant-mikrotik
Hey, I could start working on retrieving accounting information (/ip accounting) from Mikrotik and calculate TX/RX throughput per host for given interval.
I have something like that in my custom component link.
Now, I created the component that it need predefined local networks (ex. 10.0.0.0/24) so it can know which IP address is considered local, so it can differentiate between local->wan (upload), wan->local (download) and local->local (local) traffic. This could be fixed with retrieving local addresses from (/ip address).
I have in mind creating a device called "Traffic" (?) and dynamically creating sensor as the local host is found in accounting information. This could enable monitoring real traffic per host. I know you have created traffic monitoring per interface, but I am working with small RB450G which is connected to a switch, so everything is connected on one Mikrotik interface :).
Also, this would be optional feature, in homeassistant integration page there would be check box to enable/disable this feature.
If you see this as notable feature I can start working on it, if not I think about creating AppDaemon app which would replace this (maybe the AppDaemon is the right path for this functionality, I'm not really sure tbh).
Describe the bug
it just "hangs"... im seeing data right after restart HA, but some time later it just hangs...
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Software (please complete the following information):
0.103.5
v1.2
RB2011UiAS-2HnD
6.46.1
Additional context
Add any other context about the problem here.
Hi!
it works very well. Thanks!
can be Ethernet RX-TX to show the value in kilobytes.
thanks!
** the bug**
Log Details (ERROR)
Logger: custom_components.mikrotik_router.mikrotikapi
First occured: 2:37:34 PM (1368 occurences)
Last logged: 3:13:35 PM
Mikrotik 192.168.XXX.XXX error while path unknown
To Reproduce
Steps to reproduce the behavior:
Software (please complete the following information):
Hass.io / Home Assistant version: Home Assistant 0.106.6
HA Mikrotik Router integration version: v1.3.1
Mikrotik Hardware: 951G-2HnD
--
Mikrotik Software version: [e.g. v6.42]
Bug: Temperature sensor is not working correctly , most of the times it stacks to a value , i check on 2 different installation of HA and mikrotiks with same issue
Hi!
unfortunately, mikrotik integration always freezes
https://ibb.co/3Y1BmzB
sometimes it goes for 12 hours, sometimes only for a few hours
in which case I get an identities unavailable message
https://ibb.co/DCQRFZV
I have 2 such routers at home. each gives such a message
if i delete the integration then add it again and configure it will go (hours)
as if the mikrotik would ban it after a while.
there are no firewall rules set in the router !!
SW
Mikrotik router 1.5.6
Home Assistant 0.109.6
Mikrotik HapAC2 os ver. 6.46.5
Thank you!
After enablig this integration, my Homeassistant becomes flooded with devices imported from Mikrotik - but I only need to monitor status of some ports and VPN tunnels, not more.
I would appreciate, if we have option to selectivly enable/disable publishing groups of entities from Mikrotik.
Especially disable publishing client devices would be extremely useful.
From my point of view, all exports should be disabled by default.
adding sensor tempertura of mikrotik devices
Find and document required user access rights needed for all integration features
I am not sure what is going on here.
But it seems that this integration is not working as it should.
All of my devices are being marked as "unavailable" in HA (See attached screenshot)
But it seems they are also, momentarily (I assume this is when the scanning is happening) - they do appear, but they quickly go back to being unavailable.
Devices will appear available and tracked properly, counters & gauges tracked properly as well.
master
from HACS)Debug log of integration, https://gist.github.com/jwshields/eda18b7c64684cf243ac1561953ceadc
Not sure if I am missing any configurations or settings here, but any help would be appreciated.
Entity id's missing during take on of Mikrotik router
This issue can be seen in the logs right after adding the device info to the configuration ie. IP, Username, Password etc
After adding the config, to scan the device (Mikrotik router) and add the entities to HA
Mikrotik xxx.xxx.xxx.xxx error while building list for path : unknown.
Exception in update_controller when dispatching 'mikrotik_router-update-MyRouter ': () Traceback (most recent call last): File "/config/custom_components/mikrotik_router/sensor.py", line 149, in update_controller update_items(inst, mikrotik_controller, async_add_entities, sensors) File "/config/custom_components/mikrotik_router/sensor.py", line 174, in update_items sensors[item_id].async_schedule_update_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 443, in async_schedule_update_ha_state self.async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 294, in async_write_ha_state f"No entity id specified for entity {self.name}" homeassistant.exceptions.NoEntitySpecifiedError: No entity id specified for entity MyRouter Temperature
Exception in update_controller when dispatching 'mikrotik_router-update-MyRouter ': () Traceback (most recent call last): File "/config/custom_components/mikrotik_router/binary_sensor.py", line 48, in update_controller update_items(inst, mikrotik_controller, async_add_entities, sensors) File "/config/custom_components/mikrotik_router/binary_sensor.py", line 71, in update_items sensors[item_id].async_schedule_update_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 443, in async_schedule_update_ha_state self.async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 294, in async_write_ha_state f"No entity id specified for entity {self.name}" homeassistant.exceptions.NoEntitySpecifiedError: No entity id specified for entity MyRouter Firmware update
Connecting to the router via API on port 8728 not using SSL and with a Admin account that has full and all rights. Also tried with a restricted account that was created as per die setup / config page of the homeassist-mikrotik-router page.
Some of the devices exposed by the integration are just mac addresses. E.g. 84:25:DB:E4:8F:0E and it is unclear what the device is as there is no other information. Manufacturer and model just show Mikrotik and my router model.
I wish the information exposed by the integration is closer to what it actually is.
Now I look up the mac address (for example with https://macvendors.com/) and it shows "Samsung Electronics Co.,Ltd" so I at least know it is a Samsung device and I guess it is my old phone that I turned on recently again.
Instead of showing Mikrotik as manufacturer for all devices in HA show a manufacturer based on mac address lookup (or something else, but I guess mac is all there is to work with). Only for "external" devices, the router ports etc... of course stay Mikrotik manufacturer.
Maybe something similar for model. It shows the Mikrotik router model for all devices while actually the integration does not know the model. It might be clearer to leave it out when not known.
Could not think of anything else.
Can't think of anything
Is this possible? Thanks :)
I saw the following card on one HA setup:
and would like to implement something similar on my Mikrotik setup, for example how many devices connected via cable or wifi, to which subnet etc.
Is there any possibility to build with the current code with templates for example, or requires some development?
Thanks!
The IP address is correct. Winbox works Fine in the same address.
API port and winbox ports are default mikrotik ports.
Homeassistant
109.4
Plugin inteled (HACS)
1.5.5
Thanks in advanced.
Describe the bug
I can't add the mikrotik router integration.
To Reproduce
Expected behavior
The integration for mikrotik is added.
Log
Error handling request
Traceback (most recent call last):
File "/config/custom_components/mikrotik_router/mikrotikapi.py", line 57, in connect
self._connection = librouteros.connect(self._host, self._username, self._password, **kwargs)
File "/usr/local/lib/python3.7/site-packages/librouteros/__init__.py", line 48, in connect
TypeError: 'str' object is not callable
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/aiohttp/web_protocol.py", line 418, in start
resp = await task
File "/usr/local/lib/python3.7/site-packages/aiohttp/web_app.py", line 458, in _handle
resp = await handler(request)
File "/usr/local/lib/python3.7/site-packages/aiohttp/web_middlewares.py", line 119, in impl
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/real_ip.py", line 40, in real_ip_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 73, in ban_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 136, in auth_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 123, in handle
result = await result
File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 163, in post
return await super().post(request, flow_id)
File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 48, in wrapper
result = await method(view, request, *args, **kwargs)
File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 90, in post
result = await self._flow_mgr.async_configure(flow_id, data)
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 89, in async_configure
result = await self._async_handle_step(flow, cur_step["step_id"], user_input)
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 132, in _async_handle_step
result: Dict = await getattr(flow, method)(user_input)
File "/config/custom_components/mikrotik_router/config_flow.py", line 72, in async_step_user
if not api.connect():
File "/config/custom_components/mikrotik_router/mikrotikapi.py", line 61, in connect
librouteros.exceptions.ConnectionClosed,
AttributeError: module 'librouteros.exceptions' has no attribute 'ConnectionClosed'
Software (please complete the following information):
Additional context
Add any other context about the problem here.
Describe the bug
I just got this log in HA. Do not know if it is an error or not...
Log Details (ERROR)
Logger: homeassistant.util.logging
Source: util/logging.py:176
First occurred: 4:58:50 PM (30 occurrences)
Last logged: 5:13:36 PM
Exception in update_controller when dispatching 'mikrotik_router-update-Mikrotik': () Traceback (most recent call last): File "/config/custom_components/mikrotik_router/switch.py", line 77, in update_controller update_items(inst, mikrotik_controller, async_add_entities, switches) File "/config/custom_components/mikrotik_router/switch.py", line 109, in update_items switches[item_id].async_schedule_update_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 447, in async_schedule_update_ha_state self.async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 290, in async_write_ha_state raise RuntimeError(f"Attribute hass is None for {self}") RuntimeError: Attribute hass is None for
Connection lost. Reconnecting…
Software (please complete the following information):
Additional context
Add any other context about the problem here.
I'm always frustrated when connection errors happen, this is mostly because of the library (librouteros) used. This integration does a fine job managing its own version of the library. However, the component in HA itself (which provides device tracking) does not. It would be awesome if your integration can handle this as well.
Describe the solution you'd like
The custom mikrotik router integration can do device tracking.
Describe alternatives you've considered
Try to fix the official mikrotik integration.
Additional context
There is currently an issue with entities disappearing when devices are offline on HA restart, instead of being marked away.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.