I just updated to v.0.15.0 and noticed that the original temperature sensor entities are now unavailable, but new sensors (currently disabled by default) are available. Screenshot attached below shows the unavailable entities in yellow, and the new entities in blue.
Am I to delete the old entities and activate the new ones to use in their place?
Yes, seems that such a problem might happen on the update. Unfortunately, you would need to remove the old entities and enable new ones. In case you are using them in automations / frontend, you can assign the same entity_idās as before as soon as the unavailable entities are removed.
Seems like now there will be 3 integrations for Asus routers:
AsusRouter custom integration (<-- you are here).
AsusWRT built into HA Core (the stock integration).
AsusWRT custom by one of the stock integration maintainers, which just got added to HA brands. Apparently, this means, it is heading to be added to the HACS default integrations list. Before it was ājust for testing purposesā. The difference with the stock - is the added HTTP API support (the one which is used by AsusRouter) for which PR to the HA core is stale for many months.
Apparently, AsusRouter is doing something right
since the library behind the ānewā custom integration just borrowed our temperature sensor parsers and regular expressions - the ones needed to support different values templates between FW versions 374.x, 380.x, 386.x and 388.x
AsusRouter is staying with you and becoming even better
Regardless of the success of the stock and the new custom integrations, AsusRouter is going to stay with you as a feature-full and customizable integration.
Do you like AsusRouter? Let the word about it get to other users of Asus devices. Maybe, they donāt yet know about the better alternative to AsusWRT core integration.
This release is not bringing many new features and some of the changes will not be visible to the end users. But it is here to improve both - your experience of using AsusRouter (keeping all the settings as consistent inside the integration as possible) and my work on the new features and bug fixes.
Features
Improved hiding of protected values from the entities attributes
Security-protected attributes are hidden from the binary_sensor entities
Move all the control/no-control features from the library to the integration
The confirmation step is removed from the options flow as obsolete - there is no need anymore to manually reload the integration after changing its settings
Bug fixes
Fixed Device is connected in no-control mode. Sending commands is blocked when in no-control mode, raised by the update entity.
Fixed bug with missing timemaps in parental control rules (report #369)
Breaking
Services asusrouter.adjust_wlan and asusrouter.device_internet_access are available only in control mode of the integration - which would be the correct expected behaviour.
Thinking of buying a new Asus router to use with AsusRouter integration? Check the compatibility list in our Docs. If you will use any of the Amazon Associate links, I might get a small (1-3%) bonus from Amazon (usage of the associate links does not change the price of the items for you)
Thank you so much for this. My phone gps isnāt reliable so use this as a primary tracker.
Recently (maybe since the latest merlin update?) my phone isnāt updating as Away (always Home). I noticed in the attributes the last Activity is updating even though I have been away from home WiFi for an hour. I confirmed the MAC is correct.
Definitely enjoy the holiday vs thinking about this though!
I wouldnāt rely on the gps integration in ha, as it seems to āfallbackā to the āphone operatorsā basic infoā¦ showing me āpermanentlyā more than 200km south of my āHomeā , i have no problems with the GPS on the phone, if f.ex. driving my car after a google or other ārouteā maps ā¦ AsusRouter are the first instance to discover my phone , halfway up my driveway ( on a good day )
EDIT: to ha-gps defense i should maybe mention that i live on the countryside, surrounded by high trees, and a āspotā (consumer/revenue) neglected by most phone-companies here.
Yeah, this is a lifesaver for automation sanity. My GPS is just bad no matter what (defective is the best way to describe it) as even in Maps it shows me off the road.
I really wish HA zones could be configured to accept ssids as criteria also. Off topic I know
Just checked again on the attributes and my phone ālast activityā is still updating though I am 100 miles away.
Actually it almost ākilledā me, after initially using trackers created by default-ha integrations ( latest ASUSWRT ) and switching to AsusRouter ( well actually after when i got my Asus-Router-Hardware, last December ) , my heart jumped when suddenly my courtyard was lighted up before i entered
No surprise but looks like this was a problem with my router. I tried to access the web interface and it wouldnāt connect. Rebooted it and back to working now. Keep up the great work!
This happens to my router from time to timeā¦ This is my second ASUS router and the previous one was even worse. It happens more frequently when I change settings, like adding new entries to the DHCP reservation table.
In the end Iāve set an automation to power cycle (cut power for 30s and then power on again, using a smart switch) the router when I donāt receive data on the integration for a certain time.
Could you please check the full log, whether it shows any more info except for those error messages? They just mean the sensors were not able to update on the scheduled time. Since all 5 are at almost the same time, I suppose the integration got disconnected from the router.
Did sensors recover after the errors or did they stuck in some state?
Were there any more of the same errors afterwards?
Can you connect to your device via Web UI?
If all the sensors recovered, there might have been some random bug in the device API, so it did not reply for some time.
If not and your device can be accessed via Web UI, you would probably need to reload the integration and check whether it will be able to connect correctly.
If the Web UI cannot be reached, you will probably need to reboot your router.
Let me know, what you will find.
About some cases of device_tracker entities being stuck home
I know about this issue and trying to solve it. Unfortunately, it is not easy to track:
it happens with some devices only
there is no correlation with the FW type or version
even though it happens more with Merlin, some devices with the stock FW also experience it
Soon enough, devices with newer FW (386+) will get the possibility to use another API endpoint for device tracking. Hopefully, this will help with the issue.
Iāve started seeing errors at startup, Iāve tried removing my custom switch definitions but the errors still occur. Any thoughts on what Iām missing greatly appreciated.
Log Details (ERROR)
This error originated from a custom integration.
Logger: custom_components.asusrouter.router
Source: helpers/update_coordinator.py:201
Integration: AsusRouter ([documentation](https://asusrouter.vaskivskyi.com/), [issues](https://github.com/Vaskivskyi/ha-asusrouter/issues))
First occurred: 18:56:08 (1 occurrences)
Last logged: 18:56:08
Error fetching gwlan data: ("Wrong value deny of type <class 'str'>", None)
and
Log Details (ERROR)
Logger: homeassistant.components.switch
Source: custom_components/asusrouter/entity.py:125
Integration: Switch ([documentation](https://www.home-assistant.io/integrations/switch), [issues](https://github.com/home-assistant/home-assistant/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+switch%22))
First occurred: 18:56:08 (2 occurrences)
Last logged: 18:56:09
* Error adding entities for domain switch with platform asusrouter
* Error while setting up asusrouter platform for switch
Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 428, in async_add_entities await asyncio.gather(*tasks) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 615, in _async_add_entity original_icon=entity.icon, File "/config/custom_components/asusrouter/entity.py", line 132, in icon if self.is_on: File "/config/custom_components/asusrouter/entity.py", line 125, in is_on return self.coordinator.data.get(self.entity_description.key) AttributeError: 'NoneType' object has no attribute 'get'
Here is data from the full log, hopefully itās helpful.
2022-12-29 00:42:43.508 ERROR (MainThread) [custom_components.asusrouter.router] Error fetching gwlan data: ("Wrong value deny of type <class 'str'>", None)
2022-12-29 00:42:43.622 INFO (MainThread) [homeassistant.components.device_tracker] Setting up device_tracker.asusrouter
2022-12-29 00:42:43.658 ERROR (MainThread) [homeassistant.components.switch] Error adding entities for domain switch with platform asusrouter
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 428, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 615, in _async_add_entity
original_icon=entity.icon,
File "/config/custom_components/asusrouter/entity.py", line 132, in icon
if self.is_on:
File "/config/custom_components/asusrouter/entity.py", line 125, in is_on
return self.coordinator.data.get(self.entity_description.key)
AttributeError: 'NoneType' object has no attribute 'get'
2022-12-29 00:42:43.662 ERROR (MainThread) [homeassistant.components.switch] Error while setting up asusrouter platform for switch
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 289, in _async_setup_platform
await asyncio.gather(*pending)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 428, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 615, in _async_add_entity
original_icon=entity.icon,
File "/config/custom_components/asusrouter/entity.py", line 132, in icon
if self.is_on:
File "/config/custom_components/asusrouter/entity.py", line 125, in is_on
return self.coordinator.data.get(self.entity_description.key)
AttributeError: 'NoneType' object has no attribute 'get'
and
2022-12-29 02:52:43.848 ERROR (MainThread) [custom_components.asusrouter.router] Error fetching wan data: None
2022-12-29 02:52:44.849 ERROR (MainThread) [custom_components.asusrouter.router] Error fetching vpn data: None
2022-12-29 02:53:13.848 ERROR (MainThread) [custom_components.asusrouter.router] Error fetching wlan data: None
2022-12-29 02:53:13.850 ERROR (MainThread) [custom_components.asusrouter.router] Error fetching parental_control data: None
2022-12-29 02:53:13.853 ERROR (MainThread) [homeassistant.helpers.template_entity] TemplateError('TypeError: 'NoneType' object is not iterable') while processing template 'Template("{{ state_attr("switch.rt_ac86u_parental_control", "list") | list | count > 0 }}")' for attribute '_attr_available' in entity 'switch.internet_DEVICENAME'
2022-12-29 02:53:13.862 ERROR (MainThread) [homeassistant.helpers.template_entity] TemplateError('TypeError: 'NoneType' object is not iterable') while processing template 'Template("{% set ns = namespace(
name = "DEVICENAME",
list = state_attr("switch.rt_ac86u_parental_control", "list"),
internet = true
) %} {# Find whether #} {% for element in ns.list %}
{% if element.name == ns.name and element.state == "block" %}
{% set ns.internet = false %}
{% endif %}
{% endfor %} {{ ns.internet }}")' for attribute '_state' in entity 'switch.internet_DEVICENAME'
2022-12-29 02:53:13.864 ERROR (MainThread) [homeassistant.helpers.template_entity] TemplateError('TypeError: 'NoneType' object is not iterable') while processing template 'Template("{{ state_attr("switch.rt_ac86u_parental_control", "list") | list | count > 0 }}")' for attribute '_attr_available' in entity 'switch.internet_DEVICENAME2'
2022-12-29 02:53:13.865 ERROR (MainThread) [homeassistant.helpers.template_entity] TemplateError('TypeError: 'NoneType' object is not iterable') while processing template 'Template("{% set ns = namespace(
name = "DEVICENAME2",
list = state_attr("switch.rt_ac86u_parental_control", "list"),
internet = true
) %} {# Find whether #} {% for element in ns.list %}
{% if element.name == ns.name and element.state == "block" %}
{% set ns.internet = false %}
{% endif %}
{% endfor %} {{ ns.internet }}")' for attribute '_state' in entity 'switch.internet_DEVICENAME2'