Websockets in 2.0.3

It looks like todays update brought us websockets. Will there be any documentation posted soon on how to implement them? I would love to resume my work on ArloPilot for Hubitat. The lack of websocket support in SmartThings is on ene of the reasons why I stopped working on it.

Thanks!

No official documentation yet. Waiting on that.

But you can take a look at the following driver to get an idea of how it works. This is the only driver I know of to implement it yet.

Some of the key things to look at is the websocketConnect method in the initialize method and the parse method that handles all of the responses from the websocket. webSocketStatus will handle connection messages from the websocket and sendWebSocketMessage is used to send a message.

Its really pretty simple. I was told that is pretty much it in terms of the websocket methods.

Hopefully this gets you started for now until official documentation comes out.

2 Likes