Ewon web Server

Hi,
I am trying to use the ewon as a web server however; I am stuck on a couple of things and I need some guidance.

  1. When using the ewon as web server; how will the webpages be accessed through the internet? The best option for me will be to get the user have a kind of address or domain name they can type in their browser and acces the webpage hosted by the ewon; Is it possible to do that? If yes, please how should I proceed
  2. When developing the website, can I use development tools such as PHP and JAVASCRIPT?
  3. I also wish to know if there is any way to access the device connected to my Ewon without passing through Ecatcher or any other software; that is accessing the devices simply by typing an address on the web Browser?
    Please this project is time sensitive; I will appreciate your help as soon as you can. Thanks

Hello,

The ewon Flexy can act as a web server. The set up you describe could happen but it is not a typical set up and does requite you making changes to its security settings. Can you elaborate on what exactly you are looking to accomplish? You might be able to use our M2web service. http://m2web.talk2m.com/ This allows you to remote into the Flexy anywhere from a browser while keeping maintaining a secure connection though our talk2m services.

You would not be able to run a php server. You can use JavaScript in your webpage.

You can access the LAN though the WAN side of the device you would need to make the same changes needed to access the web server from the WAN. This includes setting the WAN Protection to Allow All and to allow WAN IP forwarding.
image

Yes, I already did all those configurations. Now, what address should I enter in the web Browser to be able to access the ewon? like to access facebook, i type facebook.com on my browser; is there a similar way to access the ewon once its WAN has been configured?

We use the ewon on our machines for data collection and monitoring. However, our customer finds it cumbersome and inefficient to logging through eCatcher each time they want to view their data. That’s why we want to customize a website for each customer; a website hosted by their ewon and we want the customer to access the website without having to logging through anything that is by simply typing the address we will give in his web browser, and view the data. Is what am saying making any sense? whats the different between m2Web and ecatcher?

@afotso1,

You would be required to register a domain name and point that at the public IP address of the Flexy. This would typically require a static IP address. We also offer the ability to publish the IP address to a Dynamic DNS service such as no-ip.com or dyndns.org.

There are many security risks in just opening up the eWon to the public. The security changes allow access without going though our talk2m service the eWon has no firewall or protection. This allows unwanted access to the eWon and LAN network.

For browser only access we recommend m2web. This keeps the eWons access limited to only connections though our VPN keeping in place all the security features we offer. Though m2web you can view webpages hosted on the eWon and you can add routes to the LAN devices itself. We also offer a service to view hmi’s though a cloud hosted VNC client.

For increased granularity for more control over what devices users have access to you might be interested in the pro account features. This allows you to group users and devices limiting their access scope. For details I would recommend contacting sales. @us_sales

Deryck

So, If I get this straight, we can host the website on the ewon and have the user access the web pages through m2web right? If that’s yes, How can we limit the user access just to the website, because we don’t want them to have access to the eWon configuration page and modify our scripting or some other important configurations we did.

Since the eWon Web server doesn’t support PHP scripting; What server side scripting language is being used to develop the web pages? Please don’t tell me basic because that language sucks.

When developing these web-pages; is it possible to have ewons from different sites to communicate with each other? Because some of our customer uses our machines in their different locations through out the country. So, it will make more sense to have one website gathering the information from all the other ewons than to have multiple websites for multiple ewons of the same customer.

You would be restricting user access though the user on the eWon itself. I would also recommend using viewOn to create your webpage it would allow you to incorporate the ewon user permissions into the web page. Meaning you could have some webpages that are restricted to admins only. Check out page 34 of the viewon user guide for details.

On the Flexy the unfortunate primary option is BASIC. You also could utilize the Java engine available but that has its disadvantages as well. I would again recommend checking out the tools built into viewOn that you can utilize for running Basic scripts and Java.

There are a few options for sharing data with different sites. Here is a post that covers 2 primary options. How to share data between 2x Flexy

Deryck

Thanks for your help, I will get started on this and try the best I can. The view On seems very useful. However, I have some few more questions. Is it possible to use javascript on ViewOn? or its just limited to Html5 and Css? The Ewon being a web server, does it have a database system that I can use to develop my web Page? if No, How can I connect a database like Mysql to the ewon for data storage?

By javaScript I also mean it’s library like Ajax, Jquery, Angular Js, etc…

However, I have some few more questions. Is it possible to use javascript on ViewOn? or its just limited to Html5 and Css?

With Viewon 4 it utilizes HTML5 and Javascript. You can also include css as needed. You can choose to build/write the entire page building on the ViewOn functionality.
Javascript and tools such as Ajax and Jquery are handled client side, this in turn means they are completely server independent and are more web browser dependent. So in a nutshell, anything client side (Javascript, Ajax, Jquery, CSS, etc) can be handled on the eWON webserver.

The Ewon being a web server, does it have a database system that I can use to develop my web Page?

There is no built in sql style data base, but you might be able to use tags and the built in logging depending on the use case. Based on the questions you are asking you might be interested in hosting the site somewhere else and interfacing with the Flexys though the m2web API.
Additionally, for tools such as Angular, you may be able to get them to work. Angular would work as for the most part it is entirely handled browser side and doesn’t require much backend influecnce. However, frameworks such as Ember.JS, Node.JS and tools like PHP will be unsupported as we cannot embed their runtime environments onto the eWON.

if No, How can I connect a database like Mysql to the ewon for data storage?

If you were to host the SQL database else where you would most likely need to make request client side. For showing on the eWon web page. If you were to do this I would recommend offloading the entire site and just accessing the ewon though the API.

To get data off of the eWon you have a few options. The API as stated above, eSync, and the datamailbox.

You have quite a bit of power at your disposal however you must ensure you are following through with normal web development conventions. As such, natively you will be unable to send data directly to a database as we will have no backend to directly interface with said database. It may be possible to develop a JAVA program to interface with a tertiary database, though that will require quite a bit of testing and is currently unsupported.

Thanks so much, I will weight the different options I have. and based on my application, I will see if i will move forward with view on or simply offload the entire site. Is it possible for me to get back to you at anytime If i face a major issue? Thanks
The main reason why I am trying to run away from basic is that my application involves loading and parsing files that are stored on my HMI. unfortunately, Basic doesn’t have nice java functions like split, stringtokenizer, or buffer reader to ease the parsing of files. That’s why I was thinking about PHP to do this. Do you think of any other way to go about it? If not it’s fine, you’ve given me enough information to build up a plan on how I need to go about this.

If you respond to this thread I will receive a notification.

I would need to know more info about how you are pulling the data off the Flexy to really advise in this case. How do you plan on pulling in the data?

As previously stated there is a Java engine and you can make calls to java Methods from basic. I would probably need to pull in someone who knows the Java engine we offer to give more details on that.

Deryck

I will go in details in what I want to do; Please any input from you will be appreciated. Currently, we use basic scripting to get the machine report for each month, and through excel we manually clean that report before sending it to the customer. The following lines is a sample of the raw data we get:
1192,3371,Small Straight Truck,9168917,5675,2018,5,1,6,56,
1192,3371,Small Straight Truck,9168917,5675,2018,5,1,6,57,
1193,3371,Small Straight Truck,9168917,5675,2018,5,1,7,2,
1194,0110,Small Straight Truck,9168307,5675,2018,5,1,7,44,
1195,3371,Small Straight Truck,91602666,5675,2018,5,1,10,6,
1196,0110,Small Straight Truck,9123355,5675,2018,5,1,10,36,
1197,3371,Tractor Only,164514,5675,2018,5,1,10,47,
1198,3371,Small Straight Truck,91603981,5675,2018,5,1,11,47,
Now, the customer doesn’t want to wait till the end of the month before viewing his data and in addition to that, he wants to view his data whenever he wants. That’s why we want to build a website. The website will get the file containing the customer data, process and clean up the file and display it on a table for the customer to view whenever he logs in. besides just displaying; we need to provide a button that will enable him to download a clean pdf/exxcel copy of that wash data.
Like I said earlier, the file is stored in the HMI, and the ewon access it through ftp server, here is how we get It:

f$="/SDMemory/"+m$+"/document.html"
GETFTP f$,"/usr/Penske_SoMilwaukee.html"

As you can see from the data above, we need to process line by line and the functions given by basic for such data processing are very inefficient.
Java would have been perfect for this task unfortunately; the Java ewon development tool kit has been deprived of all those nice functions which are useful for data processing.
The database was meant to be able to make the pdf or excel copy of the report that is each line we process is orderly stored in the DB; then we retrieve it to build our pdf when requested. Please, if you think of anything that can help me please let me know.
I have a quick question, If I host my website on a server different from EWON, will I bbe able to use the API you mentioned earlier to grab those files from the HMI?

Hello @afotso1,

This does sound like it would be difficult to do in basic but I would not say impossible. Depending on the amount of data it might be to much of a load for the Flexy and cause some issues slowing it down briefly.

Through the API you can make calls to LAN devices and should be able to pull the file though that. See page 14 of the m2web api guide. You could also cache it on the Flexy and pull it from there. You should be able to utilize this to get the file and run the cleaning workload on a remote server in what ever language you chose.

Deryck

I also think that going through the API will be the best way to go about this project. Thanks for your help

Hi Deryck,
I am a little bit confused on the syntax used to import the file found on the ftp server of my HMI. As a reminder, here is how I imported the file from my HMI to my ewon:

f$="/SDMemory/"+m$+"/document.html"
GETFTP f$,"/usr/Penske_SoMilwaukee.html"

here is the syntax given by m2web api:
t2mapi/get//proxy//?&t2msession=…

Can you please tell me what I need to put in place of query to be able to import that file from the HMI FTP, to my remote server? Thanks

@afotso1

Here is an example API call that I used on my device that allowed me to grab a file from the root /usr directory.

FTP Server: 192.168.100.200
File Name: file.txt

API Call:

https://m2web.talk2m.com/t2mapi/get/mydevicename/proxy/192.168.100.200/usr/file.txt&t2mdeveloperid=DEVELOPERID&t2maccount=ewonusa&t2musername=username&t2mpassword=password&t2mdeviceusername=adm&t2mdevicepassword=adm

Can you give an API call like this a test?

2 Likes

I already tried that. It says resources does not exist.
404 - Resource [/5900/195.0.0.10/SDMemory/May/document.html] does not exists on device [EWONName]

Here is My request:

I wish to highlight that the device 195.0.0.10 is an HMI connected to the ewon, and I am trying to access the ftp from that HMI.

@afotso1

Can you provide me with your direct account information so I can test this on my own?
Additionally if there is there a password and username for the FTP server I will need those as well.

Also I notice in your API call the proxy is formatted incorrectly. It should be: /EwonName/Proxy/195.0…0.10, drop that 5900.

Hi Jordan,
Yeah sure, Really need help

The Lan address for the ewon is 195.0.0.2
The Lan address for the device having the ftp server is: 195.0.0.10
There is no password for the ftp server.

I tried with the proxy, and it still didn’t work. Thanks for your help

@afotso1

Are you certain that FTP server is currently running? I can’t ping the device at 195.0.0.10 nor can the eWON get the file directly. If you look in the event logs it is full of FTP errors.

Can you check that it is connected and powered up?