Skip to content

Issues due to not waiting for responses #38

@TomFaulkner

Description

@TomFaulkner

Given the way this library is communicating with the fan, specifically the receiving messages after sending a command portion, very quickly polling after sending a command can result in receiving the response to the command rather than the response to the poll, and attempting to return that.

Workarounds are being used for the two most likely methods where this would become evident, speed and brightness.

Documented in issues #19, #37.

While it would be slower, the proper way to fix this is probably to wait for the response to the command, and returning based on that rather than fire and forget. Another option would be to verify that the received response to any query is actually a response to that query. This would be faster, but might be more effort.

Both probably need to happen, assuming the former doesn't slow things down much, which I don't think it will.

A fix for this may lead to breaking changes and a major version bump.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions