-
-
Notifications
You must be signed in to change notification settings - Fork 6
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/benqprojector.py - fixed telnet network support (te… #22
Conversation
…sted on w4000i/ht4550i)
THanks for getting involved! I just updated the library to be asynchronous so you might want to try the new library first. Also I don't see what you're trying to solve. '*' is part of the response message, not any whitespace or control characters. Is your model not returning any newlines or carriage return at the end of the response? Are you using a RS232 to WiFi bridge or the network connection of your projector? |
For sure i know "*" is part of the response But over network projector directly there is no any response "sign" for the response like Its only the response msg directly And than detecting the response with the first char of the response, which is "*" always And yes, im not over RS232 to WiFi bridge Thanks |
Interesting. I think you're the first one who is actually using the native network connection instead of a serial to WiFi bridge. I'd like to understand this a bit better. If you telnet to the projector and send commands, how does it behave? Is it all just in a continuous stream or are there different lines for the command and response? |
Just some follow up questions: Is the port number indeed 8000 to communicate with the projector? It would be interesting to implement auto discovery, does the device support SSDP or Zeroconf? Otherwise DHCP discovery would be possible, for this the projector would have to use a mac address that's linked to the manyfacturer (BenQ) or use a default hostname |
Getting back to your solution, I think it would make more sense to trigger on the |
Yes exactly nothing else first i tried telnet via putty and saw that if i write its working and im getting response |
Yes its on port 8000 About the auto discovery im not sure |
Of course you know better than me whats working for the serial port and be more generic |
Could you give the latest GitHub code a try? |
I'll try later this week But from what I saw fastly But i'll try yes |
Actually, it also accepts
and
|
@yellow1234, is the latest version working for you now? |
Using 0.1.2, I'm still having issues:
_detect_prompt is working correctly, however the debug line is not correctly idented (and will never trigger): Oops it's corrected in main, I see it |
In _read_response, I replace the readline call since there is no CR It's working properly now. |
Ok, good point about I think I need to create a wrapper around that in the |
Since I use read(100), it's reading directly 100 bytes. Most responses are actually like 10 bytes long so it could be reduced. However, I am getting immediate results, see below:
|
Is that also the case when using a serial connection? The implementation uses a different library to communicate with serial connections (serial_asyncio_fast) than it does with networked connections (socket). |
@omelettedufromagee I made changes to the library which I think should work for native networked projectors and also work on serial and serial to network bridges (I tested both). If you could confirm it works on your networked projector that would be great! |
@rrooggiieerr it's working worderfully!
I added the w4000i config file as well for the testing. I'll be able to test on HA once you update the pip package because I don't know how to modify it on HA OS. I only know I can change the json manifest to change version if you want me to test. Thank you for your time! |
Wonderfull! I'll be releasing a new version in the upcoming days then. Thanks for the feedback |
@omelettedufromagee I updated the HA integration to use the latest library, could you give that a try? To install the latest main branch from GitHub run the following action form Developer tools > Actions:
|
fixed telnet network support
i tried the home assistant integration and got "connection failed error"
than tried that module which also didnt work
so i fixed that my self and its not now working
its tested on w4000i/ht4550i
thanks