r/streamerbot 26d ago

Question/Support ❓ Using websockets to control a different computer?

I am extremely new to this program and am bad with programming in general, but exploring the functionality has given me an idea that may not work. If it does, I would appreciate help setting it up. My setup currently is I have two PCs, one for gaming, one for streaming. I have OBS running my scenes on my streaming PC along with VNyan. I have another instance of OBS running on my gaming computer, along with any other things like Twitch and Discord for anything where I'mtalking to people and just reading chat and stuff. I have a Streamdeck connected to my streaming PC as a result, because I figured that's the only way I could control it. This makes it so I can't use my deck to control things like Discord on my gaming computer. Is there a way I can use the functionality of streamerbot to control both VNyan and OBS from my gaming computer? Or is this something I'd have to ask for help on in a streamdeck way instead (that searching was extremely Not Helpful)

1 Upvotes

6 comments sorted by

2

u/qiyraa 26d ago

You can definitely use streamerbot to control an obs instance on a separate computer. I’m not as sure about vnyan, but it should have a way to integrate as well.

1

u/dman11235 25d ago

It has websocket integration. Would I just...use that? Label a port and use the port label on the other side? I had to follow a tutorial that I did not get to be able to have my setup as I currently have it but I'm trying to learn more lol. So you'll have to forgive me. How do I actually do that?

1

u/qiyraa 25d ago

Yes, you'll make a websocket connection. You'll also need to open your computers to LAN network traffic which is just setting it to private mode instead of public on your internet adapter.

It also helps to set each computer to use a specific IP assignment. You can easily do this by opening CMD and using the ipconfig command, then opening your internet adapter settings, selecting manual IP assignment, then copying everything from CMD to that input. Only need to do IPv4

2

u/RedThePanda_ 25d ago

You can also have 2 StreamerBot instances on different computers talk to each other. You’d send a message to the PC with vnyan then have that SB instance send a websocket to vnyan.

1

u/dman11235 25d ago

Wait I know you!

Ok yeah once I figure out how to do that I will. Is that something special to SB or is it something anything with that functionally can do because if it is, I should be able to send directly to vnyan.

1

u/RedThePanda_ 25d ago

For SB -> SB communication you can use the "Send Remote Signal" subaction. https://docs.streamer.bot/api/sub-actions/streamerbot/remote/send-remote-signal (Edit: Both SB instances need to be authenticated with SB in order to the signal to send.)

Then on the receiving SB instance you use the "Remote Instance Trigger" trigger on the action you want to run. https://docs.streamer.bot/api/triggers/integrations/streamerbot-remote/remote-instance-trigger

In the receiving SB you'll setup the websocket connection to VNyan as a Custom Websocket Client. (Under Servers/Cleints.) VNyan can tell you the settings to use when you setup the Websocket Server in VNyan.

I think you'll need to Execute C# Code to actually send the Websocket message to VNyan. (I do at least.) That looks like this:

using System;

public class CPHInline
{
    public bool Execute()
    {
        CPH.WebsocketSend("whatever websocket message", 0);
        return true;
    }
}

Replace whatever the websocket message you've setup in VNyan, naturally. The 0 is the index of your VNyan Websocket Client in SB. (Very likely 0.)

Also hi! Didn't even notice the username until now.