-
Notifications
You must be signed in to change notification settings - Fork 1
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
Failed to connect with virtual comport #4
Comments
I have no experience with tcp2serial, maybe you can try enabling logging and get more details of the error? Add these lines to your configuration.yaml to enable logging:
|
Ok, thanks.
Totally fine, no unexpected thing with an non-existing port. But, if I put in my up-n-running |
Are you using the Home Assistant Operating System? |
No, it is a debian and an unsupervised home assistant installation. |
Yes it does, but the serial port detection is done in the HA integration, not in the BenQ library. If you're a bit familiar with Python you could have a look at the The Baud rate you should be able to find in your projector configuration, but I don't know if that's a thing if you're using a virtual com port. What hardware do you use for the serial port at the projector side, some ESP based device? Would be great if you can make it work an I could add your method to the Readme |
On line 104 of |
Ok, I'll try it next weekend.
Nope, actually not, this is only relevant on the other end of the TCP connection.
Yes, I welded in an ESP8266 into the projector (TX, RX, GND and 3.3 V are taken direktly from the main board). So, the projector provides an WiFi interface now, interfacing with the serial port of the projector. On the ESP I use ESPlink-Firmware. |
I've got a couple of ESPs laying around, so might play a bit with that too if I have time |
Btw. I already use it inside home assistant for 6 months with a shell command launched from home assistant. From my
|
That's great. This integration is going to give you a bunch more options and also keeps up with the real status of your projector so you can use the remote. So I think if you can make it work you're going to have a better integration. According to the BenQ documentation the projector uses port 8000 to control network enabled projectors. Somewhere in the future networked projectors might be supported by the integration although I don't have such projector. If you would use port 8000 on your ESP this would follow the BenQ standard and a future integration might work without the virtual com ports |
Exactly, that's why I wanted to switch to Your integration and was happy to find it.
But I think the projectors who use network protocol directly have a different command language anyway? |
To my understanding network enabled BenQ projectors support both their proprietary command set (which this integration uses) on port 8000 and the PJLink protocol on port 4352 |
Do you have a picture of your ESP installation? I'm quite interested on applying this myself |
As a matter of fact, I didn't make photos. I'll make some, in case I have to reopen the device again. Do You also have an W1100? |
As a matter of fact, I didn't make photos. I'll make some, in case I have to reopen the device again. Do You also have an W1100? |
No, I've got the W1110, but it's always good to get some inspiration. But if you have to solder straight to the chip I don't know if I find that worth the risk since I got it now working over serial. I did order a rs232 to TTL converter on Ali, so when I get that I can build an ESP to serial ESPLink device |
In the meantime I have got a schematic of the W1100 (at that time I didn't have one), and I think, it's possible to find other pads to get to TX and RX signal than directly on the tiny chip pads. |
Ok, so I'm looking into it. Since I am no developer, nor have a development environment, I just tried |
Hi! Great debugging command, I didn't think if that. For me I do get serial ports listed |
Ok, thank You. So, that's a giant leap towards narrowing down the error. |
Yes, good work! |
What command/tool/instruction are you using to create the virtual serial port on you server? |
See first posting, first line. |
Ich managed now to get a external USB2serial device listed, as well on the gui of the integration setup, as on the CLI with |
I mentioned line 104 of |
on a python console, I do:
So (of course, somehow) the path exists, also for python. Already that I can pipe my echo output into it (see first comment) shows, that it exists. What can it make it "not exist" inside the setup routine? |
You could also try to use the BenQ library directly without HA
After installing use the CLI to connect For |
This works somehow: only the model number is read out correctly. But it's a proof, that the connection works.
|
Excellent! You can add |
Not much meaningful to me. Do You think the failed setup inside home assistant is connected to the obvious communication errors I see here? Like the |
Well, actually that looks very promising. The library is not detecting the status of the other features because the w1100 features are not yet known by the library, so that explains why the state of those in None. If you use the command |
Thank you |
The known commands can be found in |
Ok, I figured some stuff out and made a configuration for my model. I'll push it to the repo (or make a pull request) if ready.
But in general the |
@pkoevesdi, Thanks for your detailed investigation. Thanks for creating a new issue for the regex part of your findings. Maybe also one for the menu command not working? (I already have a response for that) Please make a pull request in the benqlibrary.py repository with the configuration for your projector. My proposal is to first make the library work and then focus on the integration. What did you do to to get the external USB2serial device listed in Python? |
Any progress on making the integration work with your virtual com port? Today I'm receiving some parts to build an esp-link device myself, so I'm going to play a bit with that too |
No real news. |
I use
socat pty,link=/dev/virtualcom0,raw tcp:beamerctl:23
on my home assistant installation to make a tcp connection to a tcp2serial converter (hostname "beamerctl") on my Benq W1100.Everything works, I can send commands with
echo -e "\r*pow=?#\r" > /dev/virtualcom0
and receive answers from projector withcat /dev/virtualcom0
in a different terminal.But when I try to give
/dev/virtualcom0
into the device settings of the device assistant of homeassistant-benqprojector, I always get "Failed to connect" or "Unexpected error" (for instance when trying/dev/virtualcom0/
instead of/dev/virtualcom0
).What am I doing wrong?
What is the right way of giving a (pty) serial port?
What would be the right baud rate to choose, if it is a pty serial port?
The text was updated successfully, but these errors were encountered: