[Custom component] AsusRouter integration

I don’t know if it’s related, But Yesterday i got the “same” message for various “entities” during a “re-setup” of “Tuya Local” ( there it said, no longer provided by Tuya-Local ), where i have my wifi-switches, i was about to get frustrated because the devices where indeed there, and visible in router, and working in mobile-app , i rebooted etc. etc. and those i had re-integrated in “Tuya Local” were greyed-out (not working) on and off, totally crazy evening.

How ever the Tracker-entities were all there during that, and working fine as usual … which got me to the conclusion that it might not be latest AsusR update, but maybe latest Core update … anyway 3-4 reboot during yesterday eve, i eventually got All wifi switches reinstall in “Tuya-Local”, and the switches working again.( not greyed out )

@automateitall, I will check with Node-Red flows and publish something on using AsusRouter services a bit later today

@poudenes, please, try reloading AsusRouter using the Reload button on the integrations page

image

It might be, that the result will be different from just rebooting all the HA - don’t ask why - it just happens. In general, the restart_firewall entity should become active again. If not, please open an issue on GitHub.

With my dump head I removed the entity. So it will not show up again. Have to remove the integration and reinstall it again I think

Actually, you don’t need to remove and set up the integration. If everything works as expected, the entity will just appear again after restarting integration / HA

after HA restart its not coming back.

Do you have the integration settings set to the router mode or any other?

image

Since I use the integration its on router mode.

I did reconfigure this part (nothing changed) and confirm. Now the entity is back :slight_smile:

Ok. Strange. But good that it works now

@automateitall,

In your data put the following JSON:

{
    "entities": [
        "device_tracker.device_name"
    ],
    "state": "block"
}

or

{
    "entities": [
        "device_tracker.device_name"
    ],
    "state": "disable"
}

to block or disable internet access for device with an entity device_tracker.device_name.

You can also use MAC addresses and give a devicemap to the service.

{
    "devices": [
        {
            "mac": "01:23:45:67:89:01",
            "name": "Device/1"
        },
        {
            "mac": "01:23:45:67:89:02"
        },
        {
            "mac": "01:23:45:67:89:03",
            "name": "Device/3"
        }
    ],
    "state": "disable"
}

You don’t have to specify the name for each device, just mac. In case name is specified - it will be shown in parental control rules. If not - mac will be shown instead of the name.

Details on the service itself - in the docs. Just be careful, for Node-Red you need to properly format JSON (like in is shown in code snippets here).

Since upgrade to 0.18.1, all the devices that I have been tracking are all showing as home, all the time (even if these are offline). I have reloaded and restarted the integration and rebooted HA few times, but same behaviour.
AX11000 with Merlin latest.

@neeu2,

Did you try rebooting the device itself?

What is happening with the connected devices sensor? Does it show the correct value of connected devices? The same question for the latest connected sensor, which shows when the last time any device was connected as well as the list of the last connected devices.

Thank you so much. I was able to get this working perfectly with the entity id’s. I briefly tried using the MAC addresses. This did not seem to work for me, but I did not tinker with it at all since I had it working already.

Great, that works! If you would like to go with MACs, just let me know what does not work properly or on which step it fails and I will help you :slightly_smiling_face:

Did a full Aimesh reboot and just seen the first device shown correctly as Away . Many Thanks

Is anyone else getting non ASUS devices showing up in this integration? See screenshot showing TP_Link and Microsoft devices. I have tried uninstalling and reinstalling and the same thing occurs.

image

@jonathonp,

Hello. AsusRouter is creating device_trackers for the connected to the router devices. In case the MAC address of the connected device is already known to HA and there is a registered device for it, the device tracker will be attached to this device by HA. This is the default Home Assistant behaviour and cannot be changed from the integration. You would see these devices from both integrations providing entities for them (on the right you see e.g. saying both TP-Link and AsusRouter for your TP-Link devices)

So this is not a new device. Just a device tracker attached to the already existing devices in your HA

Thanks for the quick reply and the explaination.

I’m checking my router temperatures, so i wonder, would it be possible to have mesh points temperatures shown in HA? Now only connection status is shown, and temperatures of main router. Checking mesh temps is not easy, since i must ssh into mesh and see temp with command.

Hello,

Getting temperature from the AiMesh nodes requires a direct connection to them. You can do it by just setting up one more AsusRouter instance with your node IP as host (username and password for all the nodes is the same as for the main AiMesh router). When setting up, select AiMesh node mode - it will only create sensors useful for nodes (including CPU, RAM, temperature monitoring), but will not create any duplicated device trackers and so on.

image

1 Like

Ahh… so easy it is! And i’ve been already wondering where is above window with device mode selection (i searched, but didn’t find in my existing router settings), but i didn’t want to “annoy” you with that… now i see that it’s part of initial router adding… I didn’t add anything because HA found my mesh points by itself, but only connection status was created. Now all sensors are there.

So, it’s best to manually add each router/mesh i have in my network…

Many thanks for explanation!