Skip to content

Unknown mac error during TPLink Kasa device discovery #135648

Closed
@hooks88

Description

The problem

Following upgrade to core-2025.1.2 I get frequent errors in core log "Error doing job: Task exception was never retrieved (None)"

Also when using device discovery in the TP-Link Smart Home integration I get "Unknown error occurred".

What version of Home Assistant Core has the issue?

core-2025.1.2

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

TP-Link Smart Home

Link to integration documentation on our website

https://www.home-assistant.io/integrations/tplink

Diagnostics information

No response

Example YAML snippet

Anything in the logs that might be useful for us?

2025-01-15 13:59:14.877 DEBUG (MainThread) [kasa.discover] Discovered 5 devices
2025-01-15 13:59:14.878 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved (None)
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/tplink/__init__.py", line 127, in _async_discovery
    if discovered := await async_discover_devices(hass):
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/tplink/__init__.py", line 118, in async_discover_devices
    discovered_devices[dr.format_mac(device.mac)] = device
                                     ^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/kasa/iot/iotdevice.py", line 61, in wrapped
    return f(*args, **kwargs)
  File "/usr/local/lib/python3.13/site-packages/kasa/iot/iotdevice.py", line 577, in mac
    raise KasaException(
        "Unknown mac, please submit a bug report with sys_info output."
    )
kasa.exceptions.KasaException: Unknown mac, please submit a bug report with sys_info output.

Additional information

I notice that device discovery is finding 5 devices.
I have 4 smart plugs and one KC100 camera (unsupported by the integration) on my network.
If I turn off the KC100 camera the errors stop.

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions