Combo box with to configure static/dhcp address of WAN port

I want insert in viewon pag a combo box where it is possible to set the DHCP / Static IP addressing.
I create a Viewon analog tag ‘WAN_Conn’ and I use it using “send a measure” in action tab.
In this way when I change the value in combo box the ‘WAN_Conn’ change its value according with the selection in combo box.
I would like that when display where there is this combo box is open the variabile ‘WAN_Conn’ is set with the value of UseBOOTP2 COM parameter.
I am able to read in Viewon the value of this parameter with script: GETSYS COM,"UseBOOTP2 but I don’t know how to set my viewon tag with this value.

Hi @mxmptr,

Here’s a short example I made that goes over changing the LAN IP address of the Ewon, you can modify this to be able to change the WAN connection or change it to DHCP by changing the code around.

Just as a warning though, you’ll want to make sure that if you’re changing your WAN settings that you don’t set the WAN IP address to be in the same subnet as the LAN address or the Ewo will have a LAN/WAN conflict and go offline.

Here’s my Viewon/Basic IDE example:

On the Ewon’s tag section create a string tag called new_ip (this needs to be done because there’s currently no way to send variables through combo boxes. you can only write to tags with combo boxes) and a boolean tag called change_ip. Once that’s done, import the tags into your ViewON project.

Create a combo box and go to actions then go to send string

Once this is done create a button that will write the data to your Ewon

Once this is done, push the project to your Ewon and then you can enter the script below into your BASIC IDE to get this to run

change ip address.txt (687 Bytes)

Hi @Tim_hms ,
thank you for your quick reply.
It is possible to do what you indicate using a Viewon tab instead of Ewon tag and using the script code inside viewon project?

I thought that at first there might be a way to do this but it doesn’t look Viewon tags only support analog and digital values. I don’t think that we have a way to create ViewON string tags that can be pulled into the Basic script. If we change it from a combo box to a text box, we can send it through as a variable instead of as a tag. The only difference there would be that you’d need to manually write the IP address instead of having a dropdown box to select.

I believe that in the future they should be trying to fix this combo box issue, but right now it’s a bug that we need to work around.

Thank you very much.

You’re welcome, let me know if you have more questions