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

Blind Tilt - tilt position in info query is incorrect #23

Closed
ndbeals opened this issue Apr 24, 2023 · 6 comments
Closed

Blind Tilt - tilt position in info query is incorrect #23

ndbeals opened this issue Apr 24, 2023 · 6 comments
Assignees
Labels
bug Something isn't working stale

Comments

@ndbeals
Copy link

ndbeals commented Apr 24, 2023

Analysis

The self reported tilt position when querying the device with the 0x5702 command is incorrect

Expected Behavior

The tilt position is correctly reported

Steps To Reproduce

The easiest way would be to use https://github.com/Danielhiversen/pySwitchbot and run the script I've provided:

MAC = "<YOUR BLINDTILT MAC HERE>" -- in the form of XX:XX:XX:XX:XX:XX"

async def main():
    ble_device = await BleakScanner.find_device_by_address(MAC, timeout=20)
    device = SwitchbotBlindTilt(ble_device,scan_timeout=20)
    info = await device.get_basic_info()
    print("info: ",info,"\n")

if __name__ == "__main__":
    try:
        loop = asyncio.get_event_loop()
        loop.run_until_complete(main())
    except KeyboardInterrupt:
        print("Quit")

Generally the steps are:

  1. Use the aforementioned library to query the device data
  2. Note that the tilt is wrong when the tilt != 0 or tilt != 100

Logs

Not any useful logs, but here are some examples of what the reported tilt is, and the correct value

Actual value, Reported Value
10		12
50		59
75		79
86		89

Configuration

Blindtilt is on Firmware version 2.0
Blind tilt has been calibrated.

Environment

  • OS: Raspberry Pi OS
  • Software: pySwitchBot library

Additional Context

When the device advertises, the tilt value in the advertisement is correct.

It's only the tilt value from the info query (0x5702) that is wrong.

@ndbeals
Copy link
Author

ndbeals commented Apr 25, 2023

I'm realizing this repo may not be the correct place to put this issue, please advice where the right place is if so.

@github-actions
Copy link

github-actions bot commented May 5, 2023

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 github-actions bot added the stale label May 5, 2023
@ndbeals
Copy link
Author

ndbeals commented May 5, 2023

not stale

@github-actions github-actions bot removed the stale label May 5, 2023
@github-actions
Copy link

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 github-actions bot added the stale label May 15, 2023
@github-actions
Copy link

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

@ndbeals
Copy link
Author

ndbeals commented May 19, 2023

not stale

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale
Projects
None yet
Development

No branches or pull requests

6 participants