Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New device_trackers only being added after reload of intergration #134

Open
buhito81 opened this issue Jan 3, 2023 · 14 comments
Open

New device_trackers only being added after reload of intergration #134

buhito81 opened this issue Jan 3, 2023 · 14 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@buhito81
Copy link

buhito81 commented Jan 3, 2023

Problem

As of recently new device_trackers are only being added when the intergration is manually reloaded

TP-Link Deco Version

M5, Hardware 3

Router Model

Firmware: 1.6.1 Build 20220818 Rel. 36456

Debugging Information

There's no error, so not sure what to debug

@Beer17HWAM
Copy link

Same here.

@amosyuen
Copy link
Owner

amosyuen commented Jan 6, 2023

Please check newly added entities are enabled.

  1. Find integration
  2. Click on 3 dots on bottom right
  3. Click on System options
  4. Make sure that Enable newly added entities is checked

Get debug logs. Enabled debugging for the component then get debug of list of clients:

  1. before device joined wifi
  2. after device joined wifi (make sure to wait till configured scan interval has passed)
  3. after reload

@amosyuen amosyuen added bug Something isn't working not_enough_data labels Jan 6, 2023
@buhito81
Copy link
Author

I'm not sure how to re-enact this scenario; how do i delete a device tracker once it has been created?

@buhito81
Copy link
Author

buhito81 commented Jan 16, 2023

home-assistant-after.zip
home-assistant-before.zip

Maybe this helps. The device I'm "adding" has MAC 28-F1-0E-1F-30-A3 but isn't added until after reloading of the integration. Enable newly added entities is on.

@amosyuen
Copy link
Owner

Confirmed from logs that the router is correclty returning that MAC. Not clear why it's not getting added. Some questions:

  1. Does this happen with all clients? some clients? only that client?
  2. How are you confirming the device was not added? e.g. searching developer states for MAC? Searching for specific entity name?

@buhito81
Copy link
Author

buhito81 commented Jan 17, 2023

  1. Does this happen with all clients? some clients? only that client?

Yes, with all clients.

  1. How are you confirming the device was not added? e.g. searching developer states for MAC? Searching for specific entity name?

Both searching developer states and searching for specific entity name.

I'm not sure how to re-enact this scenario; how do i delete a device tracker once it has been created?

Still not sure on how to do this though, would make debugging and reproducing a lot easier.

@buhito81
Copy link
Author

buhito81 commented Feb 2, 2023

Is there anything I can do to further help reproducing this?

@amosyuen
Copy link
Owner

amosyuen commented Feb 3, 2023

Sorry for delay. I can't really tell why it's not working. I added some more logging in https://github.com/amosyuen/ha-tplink-deco/releases/tag/v3.1.3 so we can try and verify the function for adding entities is getting called.

Could you try adding the entity again while debug logging is enabled and look for logs with that mac address of that entity.

@Gferretta
Copy link

Same problem here.
V3.1.4 and "master"

@buhito81
Copy link
Author

buhito81 commented Feb 7, 2023

Sorry for delay. I can't really tell why it's not working. I added some more logging in https://github.com/amosyuen/ha-tplink-deco/releases/tag/v3.1.3 so we can try and verify the function for adding entities is getting called.

Could you try adding the entity again while debug logging is enabled and look for logs with that mac address of that entity.
homeassistant.log

E4-A4-71-38-85-1A, see attached log.

@buhito81
Copy link
Author

buhito81 commented Feb 7, 2023

Sorry for delay. I can't really tell why it's not working. I added some more logging in https://github.com/amosyuen/ha-tplink-deco/releases/tag/v3.1.3 so we can try and verify the function for adding entities is getting called.

Could you try adding the entity again while debug logging is enabled and look for logs with that mac address of that entity.

And again this time with different MAC; 70-EE-50-75-B3-D2
homeassistant.log2.txt

See attached log for reference.

@amosyuen
Copy link
Owner

amosyuen commented Feb 9, 2023

@buhito81 your logs does not show list client call from before 70-EE-50-75-B3-D2 joining.

@BobvdBrink22
Copy link

I have the same problem with my Deco M4.
The newly connected device has MAC address: 42-D4-0A-1A-2A-68
Here is the log file:
home-assistant_tplink_deco_2023-04-20T00-08-09.863Z.log.txt

It does contain "Found new client" at line 1117:
2023-04-20 02:01:43.217 DEBUG (MainThread) [custom_components.tplink_deco.coordinator] _async_update_data: Found new client mac=42-D4-0A-1A-2A-68

@amosyuen
Copy link
Owner

amosyuen commented Apr 23, 2023

From @BobvdBrink22 logs I see add_untracked_clients: Adding client mac= which indicates the integration is correctly calling "async_add_entities()" with the new client. Not clear why that isn't adding the entity.

@amosyuen amosyuen added help wanted Extra attention is needed and removed not_enough_data labels Apr 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

5 participants