Websocket issues

@dsj @anon84912554 @WFmarketing I have been having some issues this evening with the websocket connection in the WeatherFlow PiConsole. Tracking down the issue hasn’t been easy, but it looks like the server at your end may no longer be sending a ‘connection_opened’ acknowledgement when the websocket connection is made. Thus the console is not being triggered into sending requests back to the server to start data streaming. Can you confirm if any change has been made server end, as otherwise I have an even bigger problem on my hands?!

@btst.online Is that maybe why btstWx Pro isn’t loading too?

I concur, however this is not a bug. It appears to be an AWS server issue.

I wonder if WeatherFlow has changed code in the API key…

Yep. Affecting all my services. Not getting the “connection-opened” response.

@peter @btst.online Are you using an API key issued to only you?

There is something weird here. The phone application uses the web socket and it is working.

Yes. I am.
And now for a few more characters to make the forum happy b

I use the web socket for the phone app and a few webpages. And all are failing.

This is really strange. Everything fails except the Smart Weather phone and web applications.

@GaryFunk, @btst.online glad it is not just me having the issues! I have tried both the api key specific to the wfpiconsole, and the general development api key and neither work.

The issue though is solely related to the lack of the ‘connection_opened’ acknowledgement. At present the console code waits for that acknowledgment before sending any request messages to start data streaming. If I tell the console not to wait for the acknowledgement though, and just blindly send the request messages, then everything works fine. I assume the Smart Weather phone and web applications must be coded to not wait for the acknowledgement message either. I’ve also tested the websocket using a Chrome plugin that requires you to manually connect and manually send the request messages, and all works fine for any api key.

If the message is gone for good, I can easily add a workaround, but would prefer some confirmation from WF before making the changes!

2 Likes

I suspect a software update on the server. I would like more information on the server before I point fingers but I can tell you the web socket application does not adhere 100% to the specification. I noticed months ago, if you ping the web socket it responds with a ping and not a pong.

So it’s not beyond belief that some update has broken the web socket protocol.

2 Likes

My Smartphone app, deployed to about 60 SWS users, relies solely on the WebSocket interface… so it is crucial to get this back up and running soon.

Of course, I will be looking into utilizing any alternative methods in the meantime.

–Sam

1 Like

I was hoping that @dsj or someone at @WFmarketing would at least comment.

Hi folks. Sorry for the delay responding and for this issue not being corrected sooner. After some research, we’ve confirmed that WS interface stopped providing a ‘connection_opened’ acknowledgement yesterday due to a glitch. Everything else seems to be working normally.

We will push a hot fix to restore that response as soon as possible! We’ll also get that particular response added to our unit testing process before the next API update.

6 Likes

Thank you, David. We can now relax and just wait for the fix to migrate.

One other note; The web socket server answers a ping with a ping instead of a pong.

@peter, @btst.online

Thank you, David! I’m connecting again.

This issue should be resolved now. Please let us know if you notice any others. Thanks!

3 Likes

@dsj It seems I’m getting “connection_opened” two times.

Also, seeing this returned by the server:

!{“type”:“ack”,“id”:“AR-00005119”}
{“type”:“ack”,“id”:“AR-00005119”}

Two acks one with a leading !

Disregard that. My mistake. :wink:

1 Like

Working again for my app.

3 Likes

Thanks for the fix. All working again for me too :smiley:.