home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.07k stars 29.73k forks source link

Synology SRM integration inconsistency in case of multiple APs set up as access points #40962

Closed mspinolo closed 3 years ago

mspinolo commented 3 years ago

The problem

Use case with Synology SRM integration is a configuration where multiple Synology routers are present: one is setup as main router and DHCP server, the other are AP (not in mesh configuration). In case integration is setup to retrieve information from all the routers (this can be useful, for example, to extract RSSI data for all connected device: in fact doing it only for main router will result in WiFi connected devices reported as "wired") the same device tracker sensor swap between informations provided from a router or the other.

For example for a given device tracker this is intermittently reported as "wired" or "wifi connected" depending which router in that moment in time is used to retrieve informations

Environment

Problem-relevant configuration.yaml

device_tracker:
 - platform: synology_srm
    host: 192.168.1.254
    password: YOUR_ADMIN_PASSWORD
  - platform: synology_srm
    host: 192.168.1.256
    password: YOUR_ADMIN_PASSWORD

Traceback/Error logs

Additional information

A workaround would consist in making such that integration creates a different device tracker per every AP, for example appending a suffix definable in configuration.yaml like:

probot-home-assistant[bot] commented 3 years ago

Hey there @aerialls, mind taking a look at this issue as its been labeled with an integration (synology_srm) you are listed as a codeowner for? Thanks! (message by CodeOwnersMention)

mspinolo commented 3 years ago

Hi,

adding some info as it looks like more bugs are present when this setup is used. In particular I see my iPhone being always listed as "home" and "online" even if it is turned off.

This is what I get

source_type: router latitude: REMOVED longitude: REMOVED gps_accuracy: 0 scanner: SynologySrmDeviceScanner connection: ethernet dev_type: phone hostname: REMOVED ip6_addr: REMOVED ip_addr: REMOVED is_banned: false is_beamforming_on: false is_high_qos: false is_low_qos: false is_manual_dev_type: false is_manual_hostname: false is_online: **true** is_parental_controlled: false is_qos: false is_wireless: false mac: REMOVED mesh_node_id: -1 friendly_name: iPhone

Reason I believe is it is marked as "ethernet" connected so when it was switched off it was connected to an AP and information retrieved from main router, therefore resulting in ethernet connection.

github-actions[bot] commented 3 years ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

mspinolo commented 3 years ago

Issue is still present

zigomatichub commented 3 years ago

Hi, I was observing this but found that is due to my CPL wifi on my cave... Do you have any wifi access point on your network outside synology device but connected via cable on one of your synology device ?

Also check that you have mesh all AP synology into one network.

mspinolo commented 3 years ago

Hi,

all my APs are synology but they are not in mesh setup but configured as access point (2xMR2200AC as APs, 1x2600AC as main router). Reason to not mesh them is that if you mesh you can’t select a different wifi channe for the different APs and this leads to a very less robust network due to channel congestion.

I think adding a bit more configurability to SRM integration would be great

zigomatichub commented 3 years ago

@mspinolo Same configuration as you RT2600AC as router + 2 MR2200AC as wifi mesh (connected by cable) You should consider to regroup all into one Wifi network with intelligent mode ON. I don't observe any issues with all my devices. Also checked with analiti (android app), there are well divided.

mspinolo commented 3 years ago

@zigomatichub I migrated to current setup from a mesh setup and I can confirm mesh setup has issues in my use case. WiFi stability greatly depends on how many clients, signal strength, bandwidth used, etc...so there isn't a single answer to which configuration is best: for you mesh setup can work very well, for other could not.

Modifying the integration would give more flexibility to the user :-)

github-actions[bot] commented 3 years ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.