NOALBS / nginx-obs-automatic-low-bitrate-switching

Simple app to automatically switch scenes in OBS based on the current bitrate fetched from the NGINX stats page.
http://noalbs.com
MIT License
358 stars 77 forks source link

Feature Request: Error Messaging #111

Closed jgaull closed 2 years ago

jgaull commented 2 years ago

Today I was attempting to install v2, but I did not realize that I was running the incorrect version of obs-websockets. The only indication I got that OBS was not connected was when I tested the !switch command. This produced the following logs:

2022-07-23T21:15:11.456270Z  INFO noalbs::chat::chat_handler: [bikecurious] bikecurious executed command: LiveScene
2022-07-23T21:15:11.456516Z ERROR noalbs::chat::chat_handler: Unable to connect to OBS

I also see this log related to establishing a connection to OBS:

2022-07-23T21:14:45.472610Z  INFO noalbs::broadcasting_software::obs_v5: Connecting

It would be nice if there were an error message surfaced after this log. Ideally:

Error: Your version of obs-websocket is less than the required version 5.0.0

But even a timeout message would be nice:

Error: Failed to connect to obs-websocket in 30 seconds
715209 commented 2 years ago

Hi @jgaull ,

Thanks for creating an issue, I wasn't aware this was happening.

Normally you would be getting messages just like those you've suggested, but since OBS-WebSocket v5 uses a new protocol it seems that when the connection gets created it gets stuck waiting for a message during the handshake (Hello (OpCode 0)).

jgaull commented 2 years ago

Glad I could help 🙂

715209 commented 2 years ago

The issue with getting stuck waiting on the handshake has been fixed. You'll now see this message when connection to OBS-WebSocket 4:

WARN noalbs::broadcasting_software::obs_v5: Unable to connect due to: failed to execute the handshake with obs-websocket

The version check will only happen when actually using OBS-WebSocket 5.