After some very long hours, many you tube videos, and reading countless pointless forums. I completely gave up looking for help and decided to start from scratch. Trial and error my friends! For all looking to control a projector screen based on Standby Status here you do. Screen goes up on Pin3 when the system goes into standby. Screen comes down when the system wakes up.
import xapi from 'xapi';
function screenControl(Standby)
{
if (Standby == 'Off')
{
xapi.Command.GPIO.ManualState.Set(
{Pin3: "Low", Pin4: "High" });
}
else
{
xapi.Command.GPIO.ManualState.Set(
{Pin3: "High", Pin4: "Low" });
}
}
xapi. Status . Standby . State .on(screenControl)