-
Notifications
You must be signed in to change notification settings - Fork 34
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
tcp-connection-endpoint.js does not correctly handle the VBus-over-TCP handshake #93
Comments
Hi @pdbjjens ! Thanks for that suggestion! I'll take a look at this and get back to you! Best regards, Daniel |
Hi @pdbjjens ! I have adapted your suggestion. Thanks again! Best regards, |
Hello @danielwippermann Alas, due to some other priorities I will not be able to test the new functionality until mid November. Anyway, I will come back to you here to report on the outcome of my tests. |
HI @pdbjjens !
Yeah, that's perfectly fine for me! Have a nice weekend, Daniel |
@danielwippermann However, I have one issue regarding how the password is passed to tcp-connection-endpoint.js: Currently I use a workaround in my vbus-gateway by requiring all vbus passwords to be the same. However I would appreciate it very much if you could implement a "password-per-channel" in one of your next releases. Best Regards, Jens |
Hi @pdbjjens ! Thanks for the suggestion. But putting the password into the channels does not really work, since the VBus-over-TCP protocol requires to send the password first and the channel later since the order of commands it pretty much set in stone. But I have an alternative suggestion: a new constructor option Basically something like this:
Best regard, Daniel EDIT: changed initial |
@danielwippermann |
Hi @pdbjjens !
No, a single DL3 uses the same password for all its VBus channels. I have prepared a backwards-compatible extension to the I'll land it on a feature branch today for further discussion / testing. Best regards, |
@danielwippermann Nevertheless I dare to propose another addition to tcp-connection-endpoint. Cheers, Jens |
Hi @pdbjjens ! Great suggestion. But I won't name it Best regards, |
Hi @danielwippermann 2024-01-21 10:29:39.406 - info: vbus-gw.0 (6424) starting. Version 0.0.4 in C:/iob-dev/ioBroker.vbus-gw/.dev-server/default/node_modules/iobroker.vbus-gw, node: v18.16.0, js-controller: 5.0.12 Thank you again for your excellent support. I am looking forward to your publishing the Cheers, Jens |
Hi @pdbjjens ! Thank you for the kind feedback! The version 0.29.0 has been published to the NPM registry: https://www.npmjs.com/package/resol-vbus/v/0.29.0 Best regards, |
Hi @danielwippermann However, I have one more question regarding your example serial-to-tcp gateway.
And one more question regarding the DL3 in general. Have a good day, Jens |
Hi @pdbjjens ! Thanks, good catch! I changed that in commit d176d65 to (partially) emulate a DL3.
Yes, afaik that still is true. Channel 0 is part of the downloadable recorded data, but is not accessible as a "live" bus using VBus-over-TCP. Best regards, Daniel |
Current behaviour
Currently the tcp-connection-endpoint.js always answers to the commands CHANNEL and PASS with +OK
In the case of the CHANNEL command, this leads to endless connection request loops if the requested channel is unknown in tcp-connection-endpoint.js
Requested behavior
The CHANNEL command should respond with -ERROR: "Error: Channel not available" if the requested channel is not included in options.channels
The PASS command should respond with -ERROR: "Error: Password mismatch" if the password is not matching. For this password check either the default VBus password "vbus" should be used or a new option options.password should be implemented.
Proposal
The requested behaviour can easily be added to tcp-connection-endpoint.js by extending the code in function processLine() L151 and L163:
NOTE: The password check is performed against the default password here. Of course it would be desirable to add a new option options.password to tcp-connection-endpoint.js and check against that.
The text was updated successfully, but these errors were encountered: