The short version: I believe the answer to your question is that I want to send the commands as actions in a scene, when the scene enters the preview window, actually.
The longer version: Here's my situation. I currently set up a fairly long sequence of scenes to record a weekly church service. The scenes proceed in sequence, and I transition them manually at the appropriate times. (I use studio mode and Advanced Scene Switcher to pull each subsequent scene into the preview window as each scene goes into the program window.) Whenever the next scene calls for a camera change (including changing to a new preset), I include a browser source in the scene that sends an http: command to the appropriate camera. Unfortunately, there are no browser commands for the settings I need in order to adjust the various exposure and color settings of the camera. Only VISCA commands exist for these. Also unfortunately, the lighting and camera positioning in the church is such that I can only achieve the best result if I'm able to adjust the camera settings with each camera preset, so I'd like to be able to send the VISCA commands with each appropriate scene in the same way I'm currently sending http: commands. In fact, I'd like to switch to using VISCA commands to move the cameras to the desired presets, as well, since your plugin doesn't require an extra "refresh browser in preview" source to make it execute while the scene is still in the preview window.
Although it might look nice, there's no need for you to build menus for all the exposure and color settings that exist as VISCA commands for PTZOptics cameras. I have access to the list of commands, and I certainly don't mind entering the codes myself. I'm just looking for an easy way to send those codes as a source in a scene. Based on what your excellent script already does, I thought it might not be too difficult for you to add something like this.
By the way, I do have an advanced degree in computer science, though I don't have your familiarity with the inner workings of OBS and Lua and whatever other knowledge you used to write your script. Still, if there's anything I can do to help, just ask.