rrooggiieerr / homeassistant-benqprojector

Home Assistant integration for BenQ projectors over the serial (and network?) interface.
Apache License 2.0
25 stars 3 forks source link

"Failed to connect" error #22

Open manwithpowers opened 5 hours ago

manwithpowers commented 5 hours ago

I'm trying to connect my BenQ W700 projector via this integration and keep getting a "Failed to connect" error. In the logs all I see is Failed to get projector command prompt, is your projector properly connected? (Looks like this is the source of the error Source: custom_components/benqprojector/config_flow.py:157)

I have tested using minicom and I'm able to communicate with the projector (on, off, modelname), I've made sure the baud rate is the same on the projector as I'm entering here, and I've tested with the projector both on and off already.

The one thing that sticks out to me is that it's timing out very quickly - almost immediately after clicking "Submit" when adding the projector, I get the above error.

Let me know if there's any other info I can provide to help troubleshoot this and thanks in advance for any help!

Screenshot 2024-10-27 at 18 08 29
rrooggiieerr commented 4 hours ago

Can you show me a screenshot of the minicom session?

manwithpowers commented 4 hours ago

Sure thing:

Screenshot 2024-10-27 at 18 49 55

I also tested using benqprojector.py directly and got this

Screenshot 2024-10-27 at 18 54 36
rrooggiieerr commented 4 hours ago

Ok, minicom output looks exactly like it should

Can you add the --debug argument to the benqprojector CLI?

rrooggiieerr commented 4 hours ago

Sorry, getting back to the minicom output, it actually doesn't look like it should. I'm expecting to see *POW=ON# and *MODELNAME=W700# returned on the commands

manwithpowers commented 4 hours ago

Here's the debug output:

Screenshot 2024-10-27 at 19 11 42

Minicom does actually show *POW=ON# response but for whatever reason in my terminal that gets overwritten when I type a new line (here it is on it's own):

Screenshot 2024-10-27 at 19 12 16

Response to *modelname=?# is however just W700

Thanks for the quick replies!

rrooggiieerr commented 4 hours ago

Is the warning message consistent when you run the benqprojector CLI command a couple of times?

manwithpowers commented 3 hours ago

It's now slightly different than that first run using --debug but is now consistent:

Screenshot 2024-10-27 at 19 28 51
rrooggiieerr commented 3 hours ago

Are you sure the baudrate is correct? You can find the baudrate in the on screen menu of your projector

manwithpowers commented 3 hours ago

Yes, it's definitely correct IMG20241027193501

rrooggiieerr commented 3 hours ago

Can you set it higher and see if that helps? Maybe there is indeed a timeout in the code that exceeds with low baud rates. I run my serial connection on 115200 baud

manwithpowers commented 3 hours ago

Yeah, 115200 is what I had mine set to originally, as well. I dropped it down based on some feedback I got elsewhere when I was just testing the cable. Tested again at 115200 and at 57600 a few times and unfortunately still no dice:

Screenshot 2024-10-27 at 20 03 16
rrooggiieerr commented 2 hours ago

Could you try from a different machine?

manwithpowers commented 2 hours ago

Using benqprojector CLI? Yeah, I can give that a shot from my laptop tomorrow. I tested the cable and projector connection using my laptop & minicom first so I know that part works. Thanks for all the help!