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

TP-Link Smart Home with switch P105 can't control #133573

Open
aalizzwall opened this issue Dec 19, 2024 · 2 comments
Open

TP-Link Smart Home with switch P105 can't control #133573

aalizzwall opened this issue Dec 19, 2024 · 2 comments

Comments

@aalizzwall
Copy link

The problem

I can't use ha to control plug switch.

What version of Home Assistant Core has the issue?

core-2024.12.4

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Supervised

Integration causing the issue

No response

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

2024-12-17 21:30:38.236 WARNING (MainThread) [kasa.protocols.smartprotocol] Device xxx.xxx.xxx.xxx received unknown error code: -1012
2024-12-17 21:30:38.251 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [281472674714752] Unexpected exception
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/tplink/entity.py", line 101, in _async_wrap
    await func(self, *args, **kwargs)
  File "/usr/src/homeassistant/homeassistant/components/tplink/switch.py", line 97, in async_turn_off
    await self._feature.set_value(False)
  File "/usr/local/lib/python3.13/site-packages/kasa/feature.py", line 271, in set_value
    return await attribute_setter(value)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/kasa/smart/smartdevice.py", line 650, in set_state
    return await self.protocol.query({"set_device_info": {"device_on": on}})
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/kasa/protocols/smartprotocol.py", line 94, in query
    return await self._query(request, retry_count)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/kasa/protocols/smartprotocol.py", line 155, in _query
    raise ex
  File "/usr/local/lib/python3.13/site-packages/kasa/protocols/smartprotocol.py", line 99, in _query
    return await self._execute_query(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
        request, retry_count=retry, iterate_list_pages=True
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/local/lib/python3.13/site-packages/kasa/protocols/smartprotocol.py", line 286, in _execute_query
    self._handle_response_error_code(response_data, smart_method)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/kasa/protocols/smartprotocol.py", line 361, in _handle_response_error_code
    raise DeviceError(msg, error_code=error_code)
kasa.exceptions.DeviceError: Error querying device: xxx.xxx.xxx.xxx: INTERNAL_UNKNOWN_ERROR(-100000) for method: set_device_info (error_code=INTERNAL_UNKNOWN_ERROR)

Additional information

Device Info

P105
by TP-Link
Firmware: 1.4.5 Build 20240514 Rel. 36508
Hardware: 1.0.0
@home-assistant
Copy link

Hey there @rytilahti, @bdraco, @sdb9696, mind taking a look at this issue as it has been labeled with an integration (tplink) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of tplink can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign tplink Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


tplink documentation
tplink source
(message by IssueLinks)

@rytilahti
Copy link
Member

Device xxx.xxx.xxx.xxx received unknown error code: -1012 is the relevant part. We don't know what that error code means, but it is something the device is reporting.

You could try to reboot the device to see if that helps, maybe the device is in some unknown state.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants