Skip to content

Can't send "Press" to Bot #40

Description

@tojannaon

Current Situation

Although the same Bot can be controlled successfully via the app no response occurs when using sudo python switchbot.py. Note that the device is discovered and connects just fine. It's just that nothing happens on the Bot (no Press).

After many hours of trying various methods to send this command via BLE I have come to the conclusion that this recent firmware has changed the command structure as even this simple script will not work:

https://gist.github.com/mugifly/a29f34df7de8960d72245fcb124513c7

Logs

pi@raspberrypi:/python-host $ sudo python switchbot.py
Usage: "sudo python switchbot.py [mac dev_type cmd]" or "sudo python switchbot.py"
Scanning...
Scan timeout.
(' 0', [u'd9:31:3b:81:03:56', 'Bot', 'Press'])
Input the device number to control:0
[u'd9:31:3b:81:03:56', 'Bot', 'Press']
Preparing to connect.
Connection successful.
Complete

Configuration

Bot firmware version 6.3

Environment

  • OS: Raspbian
  • Software: Jessie
  • Node: v10.19.0
  • npm: 6.13.4

Additional Context

No response

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions