Introduction
In this example, image and video resources are displayed in a WebIQ application, after download over REST API. This method can be used to update content on an HMI display without modifying the application code. A majority of the example is explained in the video below.
Prerequisites
REST API calls, HTTP server routing, and packaging of WebIQ assets are covered only at a high level. A deeper understanding of these topics may be required to modify this example.
Useful Links
Packaging Custom Libraries for WebIQ
Axios Documentation
Flask Documentation
Video Walk Through
Instructions
Step 1: Install WebIQ Packages and Widgets
Place the Axios library package and custom widget packages in the following location. %appdata%\webiq-designer\packages
At this point, the packages should be recognized when proceeding with step 2.
Step 2: Install WebIQ App
Install the WebIQ application attached at the bottom of this article through the WebIQ Designer.
Step 3: Run Python HTTP Server
The HTTP server code is attached at the bottom of this article. This can be run in a variety of ways, including as a system service on Linux machines or from VS Code as shown below. Update line 40 with the IP address of the machine running the server. At this point, resources can be placed in the /Resources folder to be served to the WebIQ application.
At this point, the WebIQ application should be capable of loading assets from the Python server.
Download Source Code
... View more