Websocket Client

No idea. What is that?

Glad you got it working. I love happy endings to these mysteries.

There is an additional method you need to define that should give you some connection information, its called webSocketStatus. I've documented it on our wiki:

https://docs.hubitat.com/index.php?title=Websocket_Interface

1 Like

Thank You.

I suspect the problem was me not updating my Hubitat driver code or forgetting to do a device "Save Preferences". I'm dealing with 4 interacting modules in three languages, Javascript, Groovy and PHP on my Wamp server, along with using Maker API, and bumping into Javascript CORS issues.

Apparently not. I'm getting what appears to be an empty message every 30 seconds that causes issues on the socketserver. What is the expected response?

I've also tried stopping the ping with this that creates an error message
InterfaceUtils.webSocketConnect(device, "ws://192.168.0.101:9000/cz/shmdelay/SocketChat.php', [pingInterval:0])

and this that does not stop it
InterfaceUtils.webSocketConnect( [pingInterval:0], device, "ws://192.168.0.101:9000/cz/shmdelay/SocketChat.php)

tag @chuck.schwer

Set it to -1 to disable

When a default map is the first parameter of a method, it means that you can add named parameters after the defined parameters, so the call would look like this:

InterfaceUtils.webSocketConnect(device, "ws://192.168.0.101:9000/cz/shmdelay/SocketChat.php', pingInterval:-1)

The expected response to a ping is a pong.

1 Like