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
Websocket immediately Closing again with protocol parameter #441
Comments
@PoltoS : The following basically doesn't work, unless I remove the "toptron-protocol":
(I don't know if I really need to manually close the socket, but this doesn't seem to be the problem in the moment. ) What I also found strange is, that (if I remove the protocol paramter) I am not really able to send subsequent websocket-messages without having wait for a disconnect first. Results in a websocket-debugging-log like this:
|
see also detailed steps to reproduce this problem here: |
@PoltoS, I installed the debian package version 2.3.8-rc8 on stretch but the issue still exists. You may be aware of this since this issue is still open. However, according to the following release notes it should work: |
Hi, I am trying to use a code-device to access a external websocket server.
So entered one simple line of code as follows:
var ws = new sockets.websocket("ws://192.168.1.61:23456/","toptron-protocol"); ws.onopen = function() { ws.send ("ping"); setTimeout(10000); ws.send("set:LIGHT_OUT1=%%"); };
Basically a connection from the UI to the external websocket server is being successfully established, but it's immediately closed again, before able so send actual commands.
Maybe because of a missing ping? However my actual ws.send command or ws.send ping command is not even getting through, because the connection has already closed down again.
Is there a way to set a timeout or generate a ping in different ways to make this work?
The text was updated successfully, but these errors were encountered: