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

[benqprojector] Fix response processing for newer projectors #18009

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

mlobstein
Copy link
Contributor

@mlobstein mlobstein commented Dec 31, 2024

Resolves #17996. The current implementation does not work at all with some newer projectors possibly due to an unexpected carriage return in the projector's response. This PR fixes the issue and also an issue where the off command needed to be sent twice to make the projector turn off.

Test build: https://github.com/mlobstein/openhab-addons/releases/download/v4.3.0-snapshot/org.openhab.binding.benqprojector-4.3.0-SNAPSHOT.jar

@mlobstein mlobstein added the bug An unexpected problem or unintended behavior of an add-on label Dec 31, 2024

// some projectors need the off command twice to switch off
if (value == Switch.OFF) {
sendCommand("pow=off");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't this be a bit cleaner/clearer?

if (value == Switch.ON) {
    sendCommand("pow=on")
} else {
    sendCommand("pow=off");
    sendCommand("pow=off");
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Signed-off-by: Michael Lobstein <[email protected]>
@mlobstein mlobstein changed the title [benqprojector] Fix message processing for newer projectors [benqprojector] Fix response processing for newer projectors Dec 31, 2024
@mlobstein mlobstein added the rebuild Triggers Jenkins PR build label Jan 2, 2025
@jlaur jlaur added rebuild Triggers Jenkins PR build and removed rebuild Triggers Jenkins PR build labels Jan 2, 2025
Signed-off-by: Michael Lobstein <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An unexpected problem or unintended behavior of an add-on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Benq Projector] Serial Port will not connect. May be sending incorrect command
3 participants