@Roth_Brent
Yes you can absolutely handle the on-off status with the Flexy scripting engine. Essentially we would just need a timer and a tag that would watch for the digital input switch.
INIT Section:
d% = 600 REM 10 minutes (value in seconds)
ONCHANGE "Switch","goto DoSwitch"
EnableVPN:
rem Enable VPN
if Switch@ <> 0 THEN
TSET 1, d%
ONTIMER 1, "goto DisableVPN" REM call our disable vpn function after 10 minutes
Setsys COM,"load"
Setsys COM,"VPNCnxType","2"
Setsys COM,"save"
Print Time$;" Connection opened"
ENDIF
DisableVPN:
rem Close vpn connection
Setsys COM,"load"
Setsys COM,"VPNCnxType","0"
Setsys COM,"save"
Print Time$;" Connection closed"
TSET 1, 0 REM disable our timer