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

Can't send commands - curtain #22

Open
bakman2 opened this issue Nov 25, 2020 · 2 comments
Open

Can't send commands - curtain #22

bakman2 opened this issue Nov 25, 2020 · 2 comments

Comments

@bakman2
Copy link

bakman2 commented Nov 25, 2020

sudo python3 switchbot_py3.py -s
Scanning for bluetooth low-energy devices
Discovering Switchbot services
 * Found Switchbot service on device F1:E2:0A:F3:6C:56 handle 13
Found 1 devices: ['F1:E2:0A:F3:6C:56']
Enter the number of the device you want to control:
	0	F1:E2:0A:F3:6C:56
0
Connected!
Traceback (most recent call last):
  File "switchbot_py3.py", line 178, in <module>
    main()
  File "switchbot_py3.py", line 173, in main
    driver.run_command(opts.command)
  File "switchbot_py3.py", line 122, in run_command
    return req.write_by_handle(self.handles[command], self.commands[command])
gattlib.GATTException: Characteristic value/descriptor operation failed: Invalid handle
sudo python3 switchbot_py3.py -d F1:E2:0A:F3:6C:56 -c open
Connected!
Command execution successful

sudo python3 switchbot_py3.py -d F1:E2:0A:F3:6C:56 -c close
Connected!
Command execution successful

Yet nothing happened, is there supposed to be error handling here ?

@DavidCooperWCU
Copy link

If you haven't calibrated the switchbot curtain, then it won't move with the commands provided.

@SwitchBot-Wonderlabs
Copy link
Member

Try python2 - switchbot.py or python3 - switchbot_py2topy3.py.
switchbot_py3.py has some bugs.

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

No branches or pull requests

3 participants