Disable WAN with Digital Input

To whom it may concern,

We are using two different ewons as our standard devices (
EW46201 4005cd and EC51410 cosy141). We have customers that would like to have a selector switch to disable the WAN port and the ewon device. Then have an indicator light to show when it is enabled and connected to the internet (ready for remote connection).

I would like some support on programming each of the two devices to disable the WAN port on the ewon, when DI is off, and enable it when DI input on ewon is on. Then have DO output of the ewon to turn on when the WAN port is enabled and is connected to internet.

If a step by step procedure could be given on this setup for each of the two devices, that would be much appreciated.

Thank you,

@Ryan_Nordhus

Cosy 141 - DI / DO

To configure the digital input, you can do this through the internet wizard as seen by our getting started video step 2 (180 seconds): https://youtu.be/viQR6U2qMHU?t=180

The digital output for the cosy 141 is limited to the VPN tunnel only as seen by our manual on page 10:


When the VPN tunnel is established then the digital output will be in an ON state. This is still a good check on whether you have internet because the eWON will disconnect/connect from the VPN tunnel if the WAN connection is disconnected / connected as well.

eWON CD/Flexy DI/DO

In the eWON CD / Flexy device, you’ll have to use scripting to achieve these results.
First, you’ll need to create an ‘EWON’ tag under tag setup for your digital input and digital output in your eWON CD.

DI tag address = DI1
DO tag address = DO1

Lets say we name our tags the following:
Switch (the digital input tag address)
Digital_Output (the digital output tag address)

Once the tags are created, we can now use BASIC scripting in the eWON CD to enable your modem connection based on the digital input

In the Init Section :
ONCHANGE "Switch","goto DoSwitch"


DoSwitch:
If (Switch@<>0) Then
rem Open Internet connection
Setsys COM,"load"
Setsys COM,"WANCnx","1"
Setsys COM,"WANPermCnx","1"
Setsys COM,"save"
Print Time$;" Connection opened"
Digital_Output@ = 1
else
rem Close Internet connection
Setsys COM,"load"
Setsys COM,"WANCnx","0"
Setsys COM,"save"
Print Time$;" Connection closed"
Digital_Output@ = 0
endif

The instructions to limit a WAN or VPN connection via a Digital input on the eWON that I described above are located in the document below, however I did edit the WANCNX parameter for a modem connection and added a digital output tag as described:

1 Like