Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

kasa.exceptions.SmartDeviceException: Communication error on system:set_relay_state #965

Copy link
Copy link
@OutsourcedGuru

Description

@OutsourcedGuru
Issue body actions

kasa, version 0.6.2.1
Exception: Communication error on system:set_relay_state
Python 3.9.7
MacOS 12.6.3

Example code:

import asyncio
from kasa import SmartPlug
from pprint import pformat as pf

charger = "192.168.11.65"
plug = SmartPlug(charger)
# plug.timeout = 20
asyncio.run(plug.update())
# print("Hardware: %s" % pf(plug.hw_info))
# print("Full sysinfo: %s" % pf(plug.sys_info))
if (plug.is_on):
    asyncio.run(plug.turn_off())
else:
    print("Plug was already OFF")

If the plug is off then it simply displays the print() statement as expected. Uncommenting out the two print() statements before this works as expected. If the plug is off then the turn_off() method throws the exception as indicated. Adding a timeout of 20 seconds doesn't change this condition.

Things work fine using the kasa CLI.

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.