Skip to content

Intermittent Operation-Sometimes Not Working #24

@Keno48

Description

@Keno48

Thx for the effort! Am new user, just started a few days ago. Am trying to control SwitchBOT mini plugs (smart plugs); am using only a few commands to: [1] set up the codes for my devices, [2] control the ON/OFF state of selected devices using Python (Windows 11 in CMD Window).
Sometimes it works, and other times it does not.

When it works I can see the illuminating LED on the plug, and I have control of it. I can alternate from ON to OFF on demand.

When it does not work, no change is seen in the LED and the python script shows nothing (no error: the cmd window just appears ready for any new input command)

Can I obtain intermediate information for diagnosing my problem ? - eg, other commands ? I'm only using

from switchbot import SwitchBot
switchbot = SwitchBot(token=api_token,secret=secret_key)
device = switchbot.device(id='########')
device.command('turn_on')

or, 'turn_off' in the last command above

I have the correct parameters for the token, secret key & devide ID; else it would not work at all.

Is there any information on the code ?, or must I trace it myself to understand the various operations so that I can inject diagnostics ?

Any help is deeply appreciated.
Again, many thanks for your effort to provide easy access to SwitchBot API programming methods.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions