This is the one I have. I am not sure why I can't control it.

DIN-Relay-2.jpg
This is the code at the start of the startup script

var FSO; // FileSystemObject used in several functions
var SWID = "ASCOM.DigitalLoggers.Switch"; // ID of power switch driver (e.g. DigitalLoggers)
var SWT = null; // [sentinel] ASCOM Switch driver


function main()
{
var i;


FSO = new ActiveXObject("Scripting.FileSystemObject");


Console.LogFile = Prefs.LocalUser.DefaultLogDir + "\\Scheduler\\StartupObs-" +
Util.FormatVar(new Date().getVarDate(), "yyyymmdd") + "@" +
Util.FormatVar(new Date().getVarDate(), "HhNnSs") + ".log";
Console.Logging = true;


// ================================================== ===
// HERE IS WHERE YOU ADD CODE TO TURN POWER ON AS NEEDED
// ================================================== ===


// Sample for Digital Loggers Ethernet Power Controller using the
// ASCOM.DigltalLoggers.Switch driver, available on the ASCOM Initiative
// website at http://ascom-standards.org/Downloads/SwitchDrivers.htm
// See the function definition in the Utility Functions section below
// Set the SWID variable above for the ID of the specific switch driver.
//
TurnOnPower(1, "Black Box");
TurnOnPower(2, "PWI Accessory Power");
TurnOnPower(5, "L600 Mount");
TurnOnPower(8, "FLI Camera and Filter Wheel");



This is the code for a bit further down the script

// Turn on a switch using the ASCOM switch driver
// Errors are fatal to the script, right?
//
function TurnOnPower(switchNumber, switchName)
{
if (SWT === null) {
SWT = new ActiveXObject(SWID);
if (!SWT.Connected) SWT.Connected = true;
}
if(!SWT.GetSwitch(switchNumber)) {
SWT.SetSwitch(switchNumber, true);
Console.PrintLine("...powered on " + switchName);
} else {
Console.PrintLine("..." + switchName + " already powered up");
}
}