Control scs by http request

General topics regarding SCS
Post Reply
alFlash
Posts: 5
Joined: Sat Sep 28, 2024 10:20 am

Control scs by http request

Post by alFlash » Sat Sep 28, 2024 7:15 pm

Hello, I 'm new at this forum, but a scs user for many years.
Would be great to help me in the following case:
We send a http request to scs. And then the cue list should go to the next cue.
SCS only prompts "Remote app connection successful"

We used this request/ command "http://localhost:58000/ctrl/go"

But the cue list doen't make the next step.
Any suggestions?

Sorry for my bad english!
Thank You

dee99
Posts: 119
Joined: Thu Nov 30, 2006 10:14 am
Location: Cambridge, UK
Contact:

Re: Control scs by http request

Post by dee99 » Sun Sep 29, 2024 12:57 am

Try using the PC's IP rather than Localhost, if you need to do it on the same machine you can load the Microsoft loopback adaptor and give it it's own network address, I use 192.168.10.1

To install the Microsoft Loopback Adapter by using the Hardware Wizard, follow these steps:
In Control Panel, double-click Add Hardware, and then click Next
Click Yes, I have already connected the hardware, and then click Next.
At the bottom of the Installed hardware list, click Add a new hardware device, and then click Next.
Click Install the hardware that I manually select from a list, and then click Next
In the Common hardware types list, click Network adapters, and then click Next.
In the Manufacturers list box, click Microsoft.
In the Network Adapter list box, click Microsoft Loopback Adapter, and then click Next.
Click Next to start installing the drivers for your hardware.
Click Finish.
Click Start, click Settings, and then click Network Connections to verify that the Microsoft Loopback Adapter has been installed.
Dee
http://www.tokkan-fx.co.uk
Acoustic Magic From Sound Thinking.
P.A. Hire, Sound effects, Lighting, Special effects
Ely, Uk

alFlash
Posts: 5
Joined: Sat Sep 28, 2024 10:20 am

Re: Control scs by http request

Post by alFlash » Sun Sep 29, 2024 3:18 am

Ok. Thank you!

Now I have installed the loopback adapter.

Now I have in scs Settings/RemoteAppInterface the IP: 169.254.247.147 port 58000

in th cue control settings I have tried these
A 169.254.247.198
B 127.0.0.1

I used this request/ command "http://localhost:58000/ctrl/go"
http://localhost:58000/ctrl/go
http://169.254.247.198:58000/ctrl/go

All variants causes the same like before: "Remote app connection successful"
No action in my cuelist...

Is my https request right?
Are my settings right?

Thank You
André

dee99
Posts: 119
Joined: Thu Nov 30, 2006 10:14 am
Location: Cambridge, UK
Contact:

Re: Control scs by http request

Post by dee99 » Sun Sep 29, 2024 4:20 am

You cannot use http to send osc requests. use "Packet sender" a free tool, or you could use "TouchOSC"
See attached screenshot for Packetsender example.
https://packetsender.com/
https://hexler.net/touchosc
Attachments
packet_sender.jpg
packet_sender.jpg (201.2 KiB) Viewed 8410 times
Dee
http://www.tokkan-fx.co.uk
Acoustic Magic From Sound Thinking.
P.A. Hire, Sound effects, Lighting, Special effects
Ely, Uk

alFlash
Posts: 5
Joined: Sat Sep 28, 2024 10:20 am

Re: Control scs by http request

Post by alFlash » Sun Sep 29, 2024 7:31 am

Thanks for the food for thought.
I have now written a small php script for my local server that carries out this task. Here is a little code that illustrates the principle.

Greetings and thanks!
Andre

Code: Select all

<?php

    function sendOSCMessage($address, $port, $message) {
        // prepare OSC message
        $oscMessage = buildOSCMessage($message);

        // build socket 
        $socket = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);

        if (!$socket) {
            echo "Error while bilding sockets: " . socket_strerror(socket_last_error()) . "\n";
            return;
        }
        // send message
        $result = socket_sendto($socket, $oscMessage, strlen($oscMessage), 0, $address, $port);

        if ($result === false) {
            echo "Error while sending message: " . socket_strerror(socket_last_error()) . "\n";
        } else {
            echo "Message sended!\n";
        }
        // close socket  
        socket_close($socket);
    }

    function buildOSCMessage($path) {
        $message = $path . "\0";
        $message .= str_repeat("\0", 4 - (strlen($path) % 4)); // OSC-padding on 4 Bytes

        return $message;
    }

// config adress and port
    $oscAddress = "127.0.0.1";
    $oscPort = 58000;
    $oscMessage = $response;
// send OSC message
    sendOSCMessage($oscAddress, $oscPort, $oscMessage);

dee99
Posts: 119
Joined: Thu Nov 30, 2006 10:14 am
Location: Cambridge, UK
Contact:

Re: Control scs by http request

Post by dee99 » Sun Sep 29, 2024 8:19 am

OK, looks interesting. May I ask what the project is? My guess would be amusment park or escape room?
Dee
http://www.tokkan-fx.co.uk
Acoustic Magic From Sound Thinking.
P.A. Hire, Sound effects, Lighting, Special effects
Ely, Uk

alFlash
Posts: 5
Joined: Sat Sep 28, 2024 10:20 am

Re: Control scs by http request

Post by alFlash » Sun Sep 29, 2024 10:29 am

We are multimedia and theatre artists.

As in each of our pieces, we deal with multimedia interaction with the audience. This time the audience is asked questions about topics from the play at certain points. You can cast with your smartphone. The answers are converted live in real time using a voice AI into the voice of the protagonist and interwoven with the text of the piece. Since the answers logically have different lengths, I need a response from our external voice server about how long the files are so that our light and video control, which runs via scs, can behave accordingly. This is very complex and I've been doing these things for over 20 years. A bit nerdy ;-). Information about the piece and our other projects can be found here: https://disdanceproject.de/bau, but in German.

Kind regards

dee99
Posts: 119
Joined: Thu Nov 30, 2006 10:14 am
Location: Cambridge, UK
Contact:

Re: Control scs by http request

Post by dee99 » Sun Sep 29, 2024 7:05 pm

Wow that looks interesting, you know that we have a full OSC API that might help?
If you need a copy please email support@showcuesystems.com and I will forward a copy on to you.
Dee
http://www.tokkan-fx.co.uk
Acoustic Magic From Sound Thinking.
P.A. Hire, Sound effects, Lighting, Special effects
Ely, Uk

alFlash
Posts: 5
Joined: Sat Sep 28, 2024 10:20 am

Re: Control scs by http request

Post by alFlash » Mon Sep 30, 2024 7:39 pm

Oh thank you!
I got the document SCS OSC V4-1.pdf a few weeks ago from Mike. Did you mean this?

Post Reply