-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
regex seems too harsh for W1100 #6
Comments
@pkoevesdi, the regex is used to validate the response. According to the BenQ documentation the response should be
The |
Mine also has only manual optical zoom, but also a serial-controllable digital zoom, which ist |
Ok, digital zoom is actually nice to have. Does it give any feedback on zoom level? Are there fixed steps for zooming in and out. If I give the |
It gives the zoom level only on the screen, not via serial. The serial response is only the command i gave itself. The steps are fixed in both directions. So, I guess, You could count internally the successfull commands and keep a variable with the current zoom level, if that's what You were thinking of. |
Ah, one more thing: |
Hey @rrooggiieerr, I used to use a more primitive BenQ serial integration that was modified from the original Acer one in home assistant. They used |
@c1em3ntchua I agree that the library used a strict regex to validate the command responses. In my philosophy validation should be done as strict as possible and as loose as needed. The problem is some responses diverge from what is documented by BenQ. Spaces are introduce, leading The current regex in the library now works with above cases and works with responses which include the
Then there are responses which don't include the
Here the I see these response more as an acknowledgement that command has executed successfully than that I see them as a real representation of the projector state. If I'm navigating the onscreen menu using What's important for detecting the supported commands is that I can receive the actual state of the projector so I can go back to that state after running the detection. For instance if I'm trying to detect the supported aspect ratios I first request the current aspect ratio, then loop trough al known aspect ratios to detect which ones are supported and then set the projector back to it's original aspect ratio. If I would like to detect if I hope this makes a bit more clear how the communication with the projector works and how I have designed the library to work accordingly. And also why detecting all the supported features is not really 100% possible. Then about your proposed regex, that one is actually more strict than the one currently implemented in the library because it expects an ending |
I created a function to send raw commands. This way the mentioned commands but also future commands which are not (yet) supported by the library can still be send. The HA integration will have a service to send raw commands to the projector so that's also covered. Do you think this is a workable solution? I also improved the |
Hi @pkoevesdi , I'm guessing the items mentioned in this issue are now resolved/covered so I can close the issue? Please reopen if you think that's not the case. Thanks! |
Similar to #7 (comment): |
In line 117 in
benqprojector.py
the regex seems too harsh for my W1100.=
, for instance\r*auto#\r
,\r*zoomi#\r
,\r*zoomo#\r
,\r*up#\r
,\r*down#\r
,\r*left#\r
,\r*right#\r
,\r*enter#\r
.=
, for instance the answers for all the above.#
, for instance the answer for\r*ltim=?#\r
, see lamp time cannot be processed on W1100 #5I'm not sure, whether this regex is only used on detecting command echos or also on responses?
The text was updated successfully, but these errors were encountered: