Can a Flexy query a SQL DB and post the query to an API?

Details: The site has multiple Silos that store raw material. The type of material in each Silo is not constant and the only place that indicates what material is in a Silo is on the Batching server, not the PLC. The only thing the PLC reads is level’s.

This entire system is isolated behind an Ewon Flexy 201.

The site would like to provide Silo levels to their vendor so that they can maintain the levels in the silos to prevent the plant from running out of material.

Originally it was suggested that we could use the M2Web API, but unfortunately the Material ID is not stored in the PLC. So all we could do with the API and PLC would be to give a level with no indication of what the material is.

Is there a way to use a ewon to query the Database, and then forward those results to Data-Mailbox or the Web API?

If not do you have any suggestions?

The ewon can make http “Get”, “Post”, “Put”, “Patch”, “Delete”,“Options”, “Head” or “Purge” request to servers. If the data is available via web calls then you should be able to have the Flexy request the data.

You will need to find out what options are available for getting data out of the SQL database. The ewon does not have direct SQL query support and it is not standard for a device to directly query a database. Typically a web server, running server side with the database, would be accessing the data and responding to web request.

w2schools.com might give you some idea on how to access data from a SQL server.

Deryck

Ok. Can the Flexy forward emails?

The SQL server is isolated behind the ewon so it can not contact a mail server, but can the ewon forward emails from the sql server?

Hi @abrannon . It can send emails but I am not sure how it would forward an email since it can not receive emails.

You could set the ewon up to act as a gateway and then let the server have internet access though it.
This doc will explain the settings that need to be changed to allow this. https://hmsnetworks.blob.core.windows.net/www/docs/librariesprovider10/downloads-monitored/manuals/knowledge-base/kb-0068-00-en-access-internet-via-cosy-beside-talk2m-vpn.pdf

Deryck

Topic closed due to inactivity.