Coder Social home page Coder Social logo

Comments (8)

buhito81 avatar buhito81 commented on July 23, 2024

home-assistant.log

from ha-tplink-deco.

amosyuen avatar amosyuen commented on July 23, 2024

Looks like the code needs to filter out empty string ip addresses

from ha-tplink-deco.

amosyuen avatar amosyuen commented on July 23, 2024

Please give https://github.com/amosyuen/ha-tplink-deco/releases/tag/v2.1.2 a try

from ha-tplink-deco.

buhito81 avatar buhito81 commented on July 23, 2024

Wow, that's fast, Almost, I guess (this is 2.1.2):

Logger: homeassistant.helpers.event
Source: components/dhcp/init.py:155
First occurred: 10:02:57 (1 occurrences)
Last logged: 10:02:57

Error while processing event <Event state_changed[L]: entity_id=device_tracker.wlan0_3, old_state=None, new_state=<state device_tracker.wlan0_3=home; source_type=router, ip=, mac=38-1F-8D-34-A0-B7, connection_type=band2_4, interface=main, down_kilobytes_per_s=0.0, up_kilobytes_per_s=0.0, deco_device=Living Room, deco_mac=74-DA-88-FE-C5-34, device_class=client, icon=mdi:lan-connect, friendly_name=wlan0 @ 2022-07-20T10:02:57.960839+02:00>> for domain device_tracker
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/event.py", line 419, in _async_dispatch_domain_event
hass.async_run_hass_job(job, event)
File "/usr/src/homeassistant/homeassistant/core.py", line 546, in async_run_hass_job
hassjob.target(*args)
File "/usr/src/homeassistant/homeassistant/components/dhcp/init.py", line 311, in _async_process_device_event
self._async_process_device_state(event.data["new_state"])
File "/usr/src/homeassistant/homeassistant/components/dhcp/init.py", line 331, in _async_process_device_state
self.async_process_client(ip_address, hostname, _format_mac(mac_address))
File "/usr/src/homeassistant/homeassistant/components/dhcp/init.py", line 155, in async_process_client
made_ip_address = make_ip_address(ip_address)
File "/usr/local/lib/python3.10/ipaddress.py", line 54, in ip_address
raise ValueError(f'{address!r} does not appear to be an IPv4 or IPv6 address')
ValueError: '' does not appear to be an IPv4 or IPv6 address

from ha-tplink-deco.

buhito81 avatar buhito81 commented on July 23, 2024

home-assistant.log

from ha-tplink-deco.

amosyuen avatar amosyuen commented on July 23, 2024

On closer look, it seems like the error is coming from the homeassistant DHCP component. It might be merging the state because both device_trackers have the same MAC. But I don't think there's much more I can do here. I would recommend filing a bug to home assistant core.

What also might be worth investigating is why your client has no IP address.

from ha-tplink-deco.

buhito81 avatar buhito81 commented on July 23, 2024

Thanks for your reply. A few things that crossed my mind:

  • Does (the) TP-LINK (integration) assume that there is only one DHCP acting in the network? I.e. if the DHCP is lease is not from the TP-LINK DHCP server, is the IP therefor not available via the TP-LINK api?
  • This error appears to have started to occur after firmware update 1.6.0 Build 20220525 Rel.48298 (coincidentally, that also about the time HA 2022.7.x came out)

from ha-tplink-deco.

amosyuen avatar amosyuen commented on July 23, 2024

The TP-Link integration has no assumptions about DHCP because it doesn't use it. All the TP-Link integration knows is the data it gets from the router API call.

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.