vmakeev / huawei_mesh_router

Huawei mesh router component for Home Assistant
MIT License
54 stars 7 forks source link

Сonnected device tags #8

Closed vmakeev closed 2 years ago

vmakeev commented 2 years ago

Discussed in https://github.com/vmakeev/huawei_mesh_router/discussions/5

In #3, it was proposed to add sensors for the number of devices connected to the guest network.

Unfortunately, Huawei routers allow guest devices to connect only to the primary router, and not to the entire mesh network, which makes it impossible to create triggers for the number of guest devices outside the coverage area of ​​the primary router (because guest devices will simply not connect to the network).

Perhaps an alternative would be to create device tags at the component level.

Tag name Tagged Devices
homeowners Michael's phone, Michael's laptop
visitors Victoria's phone, Eugene's phone

In this scenario, the sensors for the number of connected devices will provide the following attributes:

Sensor Attributes and values
sensor.huawei_mesh_3_clients_garage guest_clients: 0
hilink_clients: 0
wireless_clients: 1
lan_clients: 0
wifi_2_4_clients: 0
wifi_5_clients: 1
tagged_homeowners_clients: 1 // Michael's phone
tagged_visitors_clients: 0
sensor.huawei_mesh_3_clients_living_room guest_clients: 0
hilink_clients: 0
wireless_clients: 2
lan_clients: 0
wifi_2_4_clients: 0
wifi_5_clients: 2
tagged_homeowners_clients: 1 // Michael's laptop
tagged_visitors_clients: 1 // Victoria's phone
sensor.huawei_mesh_3_clients_primary_router guest_clients: 0
hilink_clients: 2
wireless_clients: 3
lan_clients: 0
wifi_2_4_clients: 0
wifi_5_clients: 3
tagged_homeowners_clients: 0
tagged_visitors_clients: 1 // Eugene's phone

The list of tags and the mapping of MAC addresses of devices to specific groups should be placed in the component's settings.

Multiple tags can be attached to each device.

vmakeev commented 2 years ago

@CosticaPuntaru

maybe this can help you?

https://github.com/vmakeev/huawei_mesh_router/tree/feature/device_tags#device-tags

vmakeev commented 2 years ago

@CosticaPuntaru

Tags can already be used in version 0.7.4. I hope this will be a sufficient alternative to an unusable guest network