OpenWonderLabs / SwitchBotAPI-BLE

SwitchBot BLE open API
98 stars 9 forks source link

SwitchBot bot executes OFF action on unsupported command #35

Closed orcagami closed 6 months ago

orcagami commented 7 months ago

Analysis

When setting the mode of the SwitchBot bot to either Switch or Custom Mode and then sending the bluetooth command for the press action, the bot replies with the error code for unsupported command but still triggers the OFF action.

Expected Behavior

An unsupported command should not trigger any mechanical action. If the bot replies with the unsupported command error code but still executes a mechanical action, it leaves whatever the bot is triggering in a potentially unknown state.

Steps To Reproduce

  1. Set bot to Switch or Custom Mode
  2. Connect to bot via nRF connect
  3. Send write command 0x570100

Logs

/

Configuration

/

Environment

Additional Context

I stumbled across this because I was hoping to enable 3 separate actions (single, double and triple press) of the bot by setting the 2 custom actions to double and triple press respectively, and then still sending the 0x00 action command via bluetooth to trigger single press. Is there a reason the custom mode does not allow setting all three actions?

github-actions[bot] commented 6 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] commented 6 months ago

This issue has been automatically closed because it has not had recent activity. Thank you for your contributions.