How to run a local program remotely?

Hello all,
I’m fairly new to the UR so apologize if this is very basic! So, I have a UR program that moves a colorimeter (a devices which measures color) onto a sample tile. It then writes a high signal to analog output #1. The idea is, I want to use a python code to register that signal, and respond to the UR program, letting it know that it can continue. My problem is the easiest way I’ve found to do this is to setup a Python Socket and set the UR into remote mode. However, I still need to run that locally stored script. I’ve gotten everything to connect and can pass script commands from the computer to the UR but I don’t know how to run the program itself. Sorry if this is a silly question.

tl;dr
How do I run a locally stored script via a remote python socket?

Hi,

The link below has a section about loading locally stored programs in the robot via Dashboard server (Port 29999).

https://www.universal-robots.com/articles/ur/interface-communication/remote-operation-of-robots/

Dashboard server manual in the link below. There are commands to play, stop, pause programs, and do other things.
https://www.universal-robots.com/articles/ur/dashboard-server-e-series-port-29999/

Best,
Zafar