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

Documentation is too old to be understandable and need some review #42

Open
BroZer8360 opened this issue Dec 28, 2022 · 3 comments
Open
Assignees
Labels

Comments

@BroZer8360
Copy link

BroZer8360 commented Dec 28, 2022

Current Situation

I just bought a switchbot... And thought the API will be very quick to use but was not.
Can you do a total review of your readme.md to make it more understandable to people, according to your code ?

Tooks many minutes to understand that :

  • To work, you have to check if bluetooth is active : sudo systemctl start bluetooth.service
  • To work, the command shown in readme.md doesn't work, you have to use this one :
    sudo python2 switchbot.py <mac_adress> <component_type> <action>
    eg :
    sudo python2 switchbot.py <mac_adress> Bot Turn On

As python3 script and basic python doesn't work really well on Rpi even following your step and review .o in dependant libraries.

And then, show to people how to get easily mac adresse without scanning with the app on the phone (with a screenshot for exemple).

Logs

$ sudo python switchbot.py <mac_adress> Turn On
Usage: "sudo python switchbot.py [mac dev_type cmd]" or "sudo python switchbot.py"
Preparing to connect.
Connection successful.
Unsupported operations
Complete

Configuration

Well all configuration is OK, this is a bug from documentation and message shown using the script, it's not the good command that is asked to.

Environment

  • OS: Raspbian
  • Software: none
  • Node: none
  • npm: none

Additional Context

No response

@dcarrion87
Copy link

@BroZer8360 did you actually get it to work?

I'm on an RPi4 and although I can connect I am getting nothing but Invalid handle errors when firing commands. Even when using gattool directly. E.g.:

gatttool -t random -b XX:XX:XX:XX:XX:XX --char-write-req -a 0x0016 -n 570101
Characteristic Write Request failed: Invalid handle

Are you using an alternate external bluetooth adapter? Or any other settings you adjusted?

My bot is on firmware version 5.0.

@BroZer8360
Copy link
Author

Well what's your error message when you do :
sudo python2 switchbot.py <mac_adress> Bot Turn On
This example is for a Switch bot.

And no i'm using Rpi native bluetooth : i just review link for .o in my python lib but depends of error message and version of python2

@dcarrion87
Copy link

I've stopped attempting to use this project and using this one instead: #43 (comment)

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

No branches or pull requests

8 participants