This is mostly for the remote imagers.
Say you have a PDU, the defacto standard is: Digital Loggers Web Powerswitch, and you control it via its ASCOM driver, and NINA accesses it via SWITCHES.
Then say you have another switch like a PEGASUS box. 
NINA can only access one switch at a time. You cannot connect to multiple switches.
This is a problem.

A solution is to access the PDU through a python script. Then NINA Switches is freed for the PEGASUS box.
Here is how to flip on a switch on the PDU via a NINA script command, and how to flip it off.
A further advantage versus the ASCOM driver is that PDU root access is not needed for the script.
And here is how to execute a python script in NINA (last instruction).

Depending on your PDU model and age, you may need to configure the following: 

Go to the PDU admin page and change:
Allow legacy plaintext login methods (enable)
Then also allow this if the outlet cannot be changed by the script:
Allow legacy state-changing GET requests
And save. Then verify it saved properly.

Hope this helps.
Like