Hello,
I want to implement a new binding for the yio remote (see yio-remote.com)
therefore I started today with the implementing of a simple websocket code
The protocol is stated here:
https://community.yio-remote.com/t/ir-tv-remote-integration/414/27
try {
URI uri;
uri = new URI("ws://" + config.yiodockhostip + ":946");
try {
YIOremoteBindingConstants.yiodockwebSocketClient.start();
} catch (Exception e) {
logger.warn("Web socket start failed", e);
// throw new IOException("Web socket start failed");
}
try {
YIOremoteBindingConstants.yiodockwebSocketClientSession = YIOremoteBindingConstants.yiodockwebSocketClient
.connect(this, uri, new ClientUpgradeRequest()).get();
} catch (Exception e) {
logger.warn("Web socket connect failed " + uri.toString(), e);
// throw new IOException("Web socket start failed");
}
} catch (URISyntaxException e) {
logger.debug("Initialize web socket failed", e);
}
if (YIOremoteBindingConstants.yiodockwebSocketClientSession != null) {
updateStatus(ThingStatus.ONLINE);
} else {
updateStatus(ThingStatus.OFFLINE);
}
but it always can’t connect even I checked the URI is correct any suggestion what I am doing wrong?