SwitchBotAPI-BLE icon indicating copy to clipboard operation
SwitchBotAPI-BLE copied to clipboard

SwitchBot Blind Tilt

Open donavanbecker opened this issue 2 years ago • 13 comments

Current Situation

Add support for SwitchBot Blind Tilt

Proposed Change

Add support for SwitchBot Blind Tilt

Additional Context

No response

donavanbecker avatar Jan 07 '23 18:01 donavanbecker

There is a PR in progress https://github.com/Danielhiversen/pySwitchbot/pull/181 that might be helpful to provide some insight

bdraco avatar Jan 12 '23 21:01 bdraco

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] avatar Jan 22 '23 22:01 github-actions[bot]

Is there a reason why the position information is now only available by BLE request instead of being sent in the Service Data section of the Advertisement, like it is for the curtains? Having it advertised in the service data is a perfect system as it means no lengthy BLE requests need to be made and an near instant response is just there. I can't really see it is a power saving feature as the advertainments are being sent anyway with the battery data.

Would it be possible to make it the same a the Curtain device as that works so well?

AdyRock avatar Feb 24 '23 09:02 AdyRock

Could we get some documentation on packet of the basic information response? pySwitchbot is currently reporting incorrect tilt data from a get_basic_info() (0x5702) request. Interesting to note, listening to advertisements and parsing the advertisement data from the blind tilt does give the correct tilt value.

ndbeals avatar Apr 20 '23 23:04 ndbeals

So, are you saying that you are seeing the blind tilt position in the advertisement data? If so where are you finding that?

AdyRock avatar Apr 21 '23 06:04 AdyRock

OK, so update my Blind Tilt to version 2 firmware and I now see the position data in the Manufacturer data. So, no longer need a time consuming BLE command to get the position. Thanks to the SwitchBot team for doing that.

Could the format of the Manufacturer data be published to make it easier to decode all the information?

AdyRock avatar Apr 21 '23 12:04 AdyRock

@AdyRock here's code documentation from pySwitchbot of the advertisement data: https://github.com/Danielhiversen/pySwitchbot/blob/34125596d12a94a052cbcb6701778c48a20f8a83/switchbot/adv_parsers/blind_tilt.py#L5

ndbeals avatar Apr 24 '23 23:04 ndbeals

If someone builds the doc, I will accept it as a PR on here.

donavanbecker avatar Apr 25 '23 01:04 donavanbecker

Is that a joke?

How is anyone going to build the doc without the needed documentation about the Bluetooth commands and data structures that only SwitchBot, your employer, has?

ndbeals avatar Apr 25 '23 10:04 ndbeals

@ndbeals I don't work for SwitchBot. I just maintain these repos for them.

donavanbecker avatar Apr 25 '23 11:04 donavanbecker

I see, that's nice of you, thanks for the community contributions. Am I understanding correctly that this organization, OpenWonderLabs, is not affiliated with switchbot?

The 2.0 firmware possibly has a bug (#23) and there not being any official info, I'm not sure how feasible it is for anyone to make documentation.

FWIW I don't even know how the guy over at pySwitchBot even came up with the code he does have. Was he just attempting trial and error to figure out the binary format of the Bluetooth messages? Or maybe he has access to switchbot documentation.

ndbeals avatar Apr 25 '23 12:04 ndbeals

Possibly trial and error as that is how I decoded the position information. Basically just moved the blinds to different known positions and watched the data to spot the patterns.

AdyRock avatar Apr 25 '23 12:04 AdyRock

@ndbeals This is the official SwitchBot organization, but they only monitor when the have updates from what I have experienced.

donavanbecker avatar Apr 25 '23 13:04 donavanbecker