homeassistant-mikrotik_router
homeassistant-mikrotik_router copied to clipboard
[Bug] Wireless clients always shows 0
Describe the issue
Wireless clients always shows 0.
How to reproduce the issue
Expected behavior
Screenshots
Software versions
- Home Assistant version: 2023.10.1
- Mikrotik Router integration version: 2.1.4
- Mikrotik Hardware: hAP ac^2
- RouterOS version: 7.11.2 (stable)
Diagnostics data
Traceback/Error logs
Additional context
pretty sure I seen someone reporting this already. do you have host tracking enabled?
pretty sure I seen someone reporting this already. do you have host tracking enabled?
https://drive.google.com/file/d/1bjrSpBEMembYDgHJ3HZed5ZnBKmUIww0/view?usp=sharing
It seems to be all inclusive
ok, can you attach integration diagnostics data?
config_entry-mikrotik_router-82bc866e19f82f6526cf6c88002acda9.json.txt
ok, can you attach integration diagnostics data?
thats because you dont have any wireless clients on that device. "wireless": {}, "wireless_hosts": {},
thats because you dont have any wireless clients on that device. "wireless": {}, "wireless_hosts": {},
I cannot repro:
Unfortunately the docu says little about what sensor in the config is for what, but if I am not mistaken your need "Port tracker sensors" enabled to get these statistics.
I cannot repro:
Unfortunately the docu says little about what sensor in the config is for what, but if I am not mistaken your need "Port tracker sensors" enabled to get these statistics.
I have this option enabled
Only other Sensor that I have enabled besides Device Tracker is "Environmental Variable Sensors". Have you tried this?
Might not sound very logic at first, but as it gives the overall number of Wifi Clients, not seperated by the different Ports, Interfaces or Networks, it must be a very global source sensor.
Only other Sensor that I have enabled besides Device Tracker is "Environmental Variable Sensors". Have you tried this?
Might not sound very logic at first, but as it gives the overall number of Wifi Clients, not seperated by the different Ports, Interfaces or Networks, it must be a very global source sensor.
when this sensor is turned on, the integration stops working
That sounds, that there is something seriously wrong. Have you tried uninstalling/reinstalling the integration?
Same here, I never get wifi clients in homeassistant with this integration ( 2 years ago), I think is same diferent configuration in mikrotik like dhcp manual config or arp, but I dont know... I need investigate how get the wifi clients to found the problem.
Hi,
I solved it yesterday, I made a couple of changes in Mikrotik and reload the mikrotik integration in HA and works.
1, Fix permissions in mikrotik following tutorial ( I had too much permissions, strange but... )
2, Remove Acl by Mac in Wireless devices (really useless today).
And.. ready!
I hope help you @DIMMonchik !!
Hi,
I solved it yesterday, I made a couple of changes in Mikrotik and reload the mikrotik integration in HA and works.
1, Fix permissions in mikrotik following tutorial ( I had too much permissions, strange but... )
2, Remove Acl by Mac in Wireless devices (really useless today).
And.. ready!
I hope help you @DIMMonchik !!
unfortunately this is not my case
No idea what is happening in your case. Can you run integration in debug? we should find out more that way.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
This issue was closed because it has been stalled for 5 days with no activity.
I have the same issue with RouterOS 7.12, 7.12.1 and alos 7.13. I'm using CapsMan for all Wireless devices, and in the "Registration Table" I have ~10 Devices.
HA-Settings:
Mikrotik-Group-Permissions:
Has someone an idea, what's the reason? br
I need those debugs to figure out whats wrong also include diagnostics taken right after debugs (in same ha session)
Hallo,Could you Tell me which Logs you Need, because I‘m New With HomeAssistant.BR TomAm 18.12.2023 um 01:22 schrieb Tomaae @.***>: I need those debugs to figure out whats wrong
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>
Sure. First, follow instruction here to enable debug logs for integration and restart home assistant afterwards: https://github.com/tomaae/homeassistant-mikrotik_router?tab=readme-ov-file#enabling-debug
Let it run for about 2 minutes, then download diagnostics: https://github.com/tomaae/homeassistant-mikrotik_router?tab=readme-ov-file#diagnostics
Download /config/home-assistant.log file from you HA.
Afterwards revert debug config changes and restart HA again.
I activated the logging and downloaded the file. Could I mail this directly to you, because there a IP/MAC/etc. inside. BR Tom
I activated the logging and downloaded the file. Could I mail this directly to you, because there a IP/MAC/etc. inside. BR Tom
I had a look at the logs and found the following:
2023-12-20 21:23:55.231 ERROR (MainThread) [custom_components.mikrotik_router.coordinator] Unexpected error fetching MyRouter-AC3 data: '*1'
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 300, in _async_refresh
self.data = await self._async_update_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/mikrotik_router/coordinator.py", line 599, in _async_update_data
await self.hass.async_add_executor_job(self.get_wireless)
File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/mikrotik_router/coordinator.py", line 1967, in get_wireless
self.ds["wireless"][uid][tmp] = self.ds["wireless"][
^^^^^^^^^^^^^^^^^^^^
KeyError: '*1'
Hope this helps. br Tom
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
Do you need something Else from my Site?
it might be related to this issue: a Chateau running 7.12 only shows wireless clients at the 2ghz wireless interface, and the clients from the 5ghz are not included in the wireless count
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
Hello, I also don't see the wireless clients. I tried enabling the Enviromental Variable Sensor (which is probably the fix) but that breaks the integration and gives me this error in the log:
Logger: custom_components.mikrotik_router.mikrotikapi
Source: custom_components/mikrotik_router/mikrotikapi.py:95
Integration: Mikrotik Router ([documentation](https://github.com/tomaae/homeassistant-mikrotik_router), [issues](https://github.com/tomaae/homeassistant-mikrotik_router/issues))
First occurred: February 2, 2024 at 22:52:07 (37 occurrences)
Last logged: 01:37:40
Mikrotik 192.168.88.1 error while building list for path /caps-man/registration-table : no such command or directory (caps-man), no such command prefix
Mikrotik 192.168.88.1 error while building list for path /system/script/environment : not enough permissions (9)
I have AX3 using RouterOS 7.13.3 with the wifi-qcom package
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.


