Skip to content
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

WS v2, StreamDeck Plus WS Socket not Stable #28

Open
n61ab opened this issue Feb 18, 2023 · 20 comments
Open

WS v2, StreamDeck Plus WS Socket not Stable #28

n61ab opened this issue Feb 18, 2023 · 20 comments

Comments

@n61ab
Copy link

n61ab commented Feb 18, 2023

I installed your update v2 to use with my StreamDeck Two+ Dials. Thank you for the update.

At first, all was good. But, when I created a new SD profile and copied the Dial to the second profile, the WS Socket connection disconnected.

I could not get "Reconnect" even after removing the second profile/dial.

A new connection was made with a new Web Socket path (a new configuration node).

I repeated the new profile and copy button, and the same problem with WS Socket disconnecting.

StreamDeck buttons work just fine; the problem is isolated to StreamDeck Dials.

Alan Blind

@ybizeul
Copy link
Owner

ybizeul commented Feb 20, 2023

Thanks Alan,
@pakerfeldt did you experience something similar ?

@pakerfeldt
Copy link
Contributor

Sorry for late reply. I've been on vacation.

I just created a new profile. Copied one of my WSProxy dials from my main profile and pasted it in the new profile. Both are still working fine. Cannot seem to reproduce this issue.

@n61ab
Copy link
Author

n61ab commented Feb 24, 2023

pakerfeldt

Thank you for taking a look. I moved my Node-Red to a different device; now everything appears good.

Sorry for the false alarm.

Alan

@n61ab
Copy link
Author

n61ab commented Feb 24, 2023

Well, I spoke too soon. I was able to create the issue on the second Node-Red instance.

I built three dials, each with a WS path and configuration node. Good so far.

On the fourth dial, again with a unique WS, the Web Socket connected just fine at first. Then when I moved to a second profile on the SteamDeck, the Web Socket disconnected, as expected. The problem was, when I returned to the profile, with dial four, the Web Socket refused to re-connect. Nothing I did would get it to re-connect.

Then, I removed the Node-Red configuration node for the problem WS path and built a new WS path, all was good again, up to when I changed the SD profile, then the problem repeats.

The other SD dials continued to work just fine.

The SD Buttons all work great, in all combinations. The Web Socket refusing to reconnect is isolated to Dials.

Alan

@pakerfeldt
Copy link
Contributor

I'm not entirely sure what I do differently but I cannot seem to reproduce.

This is what I did. Added a new page on my default profile. Added four new dials with path streamdeck1, 2, 3, 4. All with the same IP (to my Node-RED instance). Added four new websocket in nodes in Node-RED. All of which are using its own dedicated path as configured previously. Now if I switch back and forth between my pages in the default profile I can see how the nodes gets connected and disconnected in Node-RED as expected.

Now, I also created a new profile. Copied one of the dials from the default profile. When I'm on the new profile, the related websocket in node shows Connected. When I jump back to the default profile. All nodes show connected. If I switch to a completely separate page (with no websocket dials) they all turn disconnected in Node-RED. Then back connected when I go back to the correct page again.

So, all in all. I can't really seem to reproduce this. FWIW, I'm running Node-RED v2.2.2 and node-red-contrib-websocket 0.1.0.

@n61ab
Copy link
Author

n61ab commented Feb 24, 2023 via email

@n61ab
Copy link
Author

n61ab commented Feb 24, 2023 via email

@pakerfeldt
Copy link
Contributor

Not sure, but your screenshots does not appear in this issue it seems.

Anyway, could you perhaps try installing the contrib websocket package and see it that works differently?
https://flows.nodered.org/node/node-red-contrib-websocket

@n61ab
Copy link
Author

n61ab commented Feb 24, 2023 via email

@pakerfeldt
Copy link
Contributor

pakerfeldt commented Feb 24, 2023

I have a modbus package that didn't let me upgrade to NR v3. However, I think they might have sorted that out so perhaps I'm unblocked.

I'm running NR in docker so I can quite easily create a separate instance with just vanilla NR v3 and try this out. Hopefully I get some time in the weekend to try.

@n61ab
Copy link
Author

n61ab commented Feb 24, 2023 via email

@n61ab
Copy link
Author

n61ab commented Feb 24, 2023 via email

@pakerfeldt
Copy link
Contributor

Alright. I think I know what's going on, but I don't know how to fix it, simply because I'm not accustomed to the source code yet.
The problem is that Dial 1 seem to share WS resources with the button on row 0, column 0. Dial 2, share WS resources with button on row 0, column 1. Dial 3 on row 0, column 2 and Dial 4 on row 0, column 3. I.e. dials seem to conflict with the four buttons on the first row.

Maybe @ybizeul would have an idea of why that is? I might be able to spend some time on this eventually, but not tonight.

@n61ab
Copy link
Author

n61ab commented Feb 24, 2023 via email

@ybizeul
Copy link
Owner

ybizeul commented Feb 25, 2023

Great job guys ! So I’ll take a deeper look later, but if I understand correctly, dials and button shouldn’t share the same WebSocket ?
Unique WS urls are maintained in an array and referenced for each button or dial, and I thought it wouldn’t be an issue but maybe it is…

I’ll take a look and update here.

@xnaron
Copy link

xnaron commented Mar 7, 2023

I have connection issues as well with the plugin. Sometimes it works and sometimes it doesn't. I think it doesn't try to reconnect. Running Streamdeck + with latest software as of todays date,

@xnaron
Copy link

xnaron commented Mar 7, 2023

Did some more testing and it definitely seems like there is a reconnection issue in play. If I close the stream deck app and relaunch it the ws connects but won't reconnect if the connection is lost.

@royaltongue
Copy link

I think I'm also running into this issue. If I mess around making/editing buttons in the Stream Deck software, eventually the WebSocket will disconnect. The only way I've found to get it to reconnect is to quit and relaunch the Stream Deck software.

I'm running Stream Deck software version 6.3.0.18948, Node Red version 3.0.2 through Docker, and node-red-contrib-streamdeck-ws version 0.9.4
I'm also using the Stream Deck mobile app, no physical hardware yet.

@ybizeul
Copy link
Owner

ybizeul commented Aug 14, 2023

Can someone confirm this is only related to StreamDeck Plus ? Or having this issue with regular StreamDeck as well ?

@n61ab
Copy link
Author

n61ab commented Aug 14, 2023

Yes, I can confirm this issue only occurs on the StreamDeck Plus when using the Node-Red Web Socket Node.

I have a StreamDeck XL and a 15 button StreamDeck, both work just fine with your plugin and Node res WebSocket Node.

Alan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants