Git Product home page Git Product logo

Comments (17)

amosyuen avatar amosyuen commented on June 17, 2024

Could you clarify, by disabled, do you mean state is unavailable or do you mean "Enable Entity" is off)?
image

I think there are a couple of things going on here:

  • Since the log said "First occurred: 8:11:05 AM (1 occurrences)" sounds like the timeout only happened once. If it's happening a lot then that's a problem, but once is fine.

  • The custom components logs looks like an actual bug, but that's unrelated to the timeouts and disabled entities. I'll send a fix for that, but should be unrelated as it only happens when the integration is removed.

from ha-tplink-deco.

ctkcoding avatar ctkcoding commented on June 17, 2024

from ha-tplink-deco.

ctkcoding avatar ctkcoding commented on June 17, 2024

629ECE69-A697-4EE9-91AA-F00AC208A028
80B9E2A5-55A9-4AB7-ACAB-98E43D8167A1
0524BC49-7067-4FF6-8943-25644FD14151
It looks like the email upload didn’t work. I’m also adding a screenshot from my ha integrations page to show the difference between the and device’s counts

from ha-tplink-deco.

amosyuen avatar amosyuen commented on June 17, 2024

Hmm, that is quite strange, because there shouldn't be any devices, only entities. My code doesn't specify any device_info, so there should not be any associated devices.

My integration view:
image

I'm curious what the devices look like? Could you get a screenshot? Particularly interested in:

  • How are they named and does it look correct (e.g. Chris Laptop)?
  • What entities connected to the devices?

from ha-tplink-deco.

ctkcoding avatar ctkcoding commented on June 17, 2024

from ha-tplink-deco.

amosyuen avatar amosyuen commented on June 17, 2024

So I'm using the mac address as the entity unique ID, there's a good chance that the other Kasa integration is also doing that. In that case, HA is maybe merging them or something. I think the solution is for me to use a different unique ID.

from ha-tplink-deco.

amosyuen avatar amosyuen commented on June 17, 2024

Looks like that is the case at https://github.com/home-assistant/core/blob/f72bf2145b7e310f34f23ad34f8294d8fe1360ce/homeassistant/components/tplink/__init__.py#L243

from ha-tplink-deco.

ctkcoding avatar ctkcoding commented on June 17, 2024

from ha-tplink-deco.

ctkcoding avatar ctkcoding commented on June 17, 2024

I just manually enabled some of the “unavailable” entities and they look ok now. Ok as in they are displaying the attributes that your deco integration says should be picked up from the deco wifi. Did I miss something in the readme about manually enabling the entities for wifi clients I want to track? It seems like I just got mixed up with how to manage on the ui, and the code is all good. If this needs an update on readme I can write something out and add an image or two for future users reference

from ha-tplink-deco.

ctkcoding avatar ctkcoding commented on June 17, 2024

Just to be clear I do not have an issue with the mac address id overlap causing devices to show up, because those actually were working immediately. The ones without Mac id overlap are the ones that were problematic but now knowing to manually enable those entities it seems like it’s all working fine. I can make a PR to automatically track the entities and/or update the readme to explain for new users if they encounter a similar issue

from ha-tplink-deco.

amosyuen avatar amosyuen commented on June 17, 2024

You shouldn't need to manually enable the entities, they should be enabled by default. Not really sure why they are disabled.

Could you confirm if the entities that were disabled are the non-merged ones?

Assuming it's not really a problem, I'll probably leave the unique_id alone then.

from ha-tplink-deco.

scooper1 avatar scooper1 commented on June 17, 2024

I have a similar problem with all entries almost immediately going unavailable
M4r in access point mode and openwrt main router

edit:-
removed integration rebooted and added back - appears to working second time around

from ha-tplink-deco.

TTLucian avatar TTLucian commented on June 17, 2024

I'm not sure if it's related but all devices are unavailable and error in log

This error originated from a custom integration.

Logger: homeassistant
Source: custom_components/tplink_deco/coordinator.py:72
Integration: TP-Link Deco (documentation, issues)
First occurred: 5 February 2022, 15:23:02 (1 occurrences)
Last logged: 5 February 2022, 15:23:02

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/config/custom_components/tplink_deco/__init__.py", line 130, in update_listener
    await async_reload_entry(hass, entry)
  File "/config/custom_components/tplink_deco/__init__.py", line 116, in async_reload_entry
    await async_setup_entry(hass, entry)
  File "/config/custom_components/tplink_deco/__init__.py", line 82, in async_setup_entry
    hass.data[DOMAIN][entry.entry_id] = await async_create_coordinator(hass, entry, api)
  File "/config/custom_components/tplink_deco/__init__.py", line 61, in async_create_coordinator
    coordinator = TplinkDecoDataUpdateCoordinator(
  File "/config/custom_components/tplink_deco/coordinator.py", line 72, in __init__
    update_interval=timedelta(seconds=scan_interval_seconds),
TypeError: unsupported type for timedelta seconds component: NoneType

from ha-tplink-deco.

amosyuen avatar amosyuen commented on June 17, 2024

That's unrelated, not sure how you got into that state, but looks like I need to make those values required in the config.

from ha-tplink-deco.

amosyuen avatar amosyuen commented on June 17, 2024

I've had trouble reproing, so I'm not enitrely sure, but I suspect that the initial query is failing and so the integration is loaded in a failed state, which might cause all the entities to be added as unavailable.

In https://github.com/amosyuen/ha-tplink-deco/releases/tag/v1.0.1 I've added a retry for expired auth and timeouts which should help mitigate this.

from ha-tplink-deco.

ctkcoding avatar ctkcoding commented on June 17, 2024

from ha-tplink-deco.

amosyuen avatar amosyuen commented on June 17, 2024

Closing the issue as haven't received further reports

from ha-tplink-deco.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.