By dave | April 14, 2022

Control menus with embedCONTROL.JS from a webserver

Available from 2.3 onwards.

On larger embedded devices you can serve up embedCONTROL.JS from a web browser. It allows you to remotely control and monitor the menu items from a web page on any device that can run a web browser. It is a single page web application based on React.JS. It supports the most important functions from the full embedCONTROL application, having the advantage of not needing any installation.

In summary, to access the page, you’d simply go to a web-browser and enter the address of your device. The application will be immediately served up and will pair if needed. You can read more background material and the user guide: Controlling embedded apps with embedCONTROL.

Webserver options for ESP32 boards

On ESP32 we require that you use the ESP32 Async Web Server library and this should be installed either via library manager or manually. Once that is installed, you then choose the appropriate plugin for your board from code generator. For ESP32 the code generator plugin is the “ESP webserver browser based app” option.

Use prepackaged application property

There are two options for the actual web-app source, IE the html, images, js and images:

  • Ticked - We serve up gzipped versions of all files using the most recent release version of embedCONTROL.JS.
  • Unticked - You will manually provide the files or request handlers yourself, if you’re using a customized version of the app. See https://github.com/davetcc/embedcontrolJS for instructions.

Concurrent connections property

Each connection uses memory to store the state and for buffers. Although ESP devices have adequate RAM for this purpose, you set the number of connections allowed upfront, and we create the objects globally.

Websocket endpoint

Unless you have modified the source, or know the websocket is on a different endpoint, leave this set to the default value.

Webserver port

Normally left at port 80. This is the port on which the webserver runs.

Accessing the application

If your device were on IP address 192.168.2.4 for example, and the port were 80, you’d simply type

http://192.168.2.4/index.html
into the browser address bar.

Jetty Webserver version for Raspberry PI

WebSocket with static hosting for Raspberry PI

Other pages within this category

comments powered by Disqus

This site uses cookies to analyse traffic, serve ads by Google AdSense (non-personalized in EEA/UK), and to record consent. We also embed Twitter, Youtube and Disqus content on some pages, these companies have their own privacy policies.

Our privacy policy applies to all pages on our site

Should you need further guidance on how to proceed: External link for information about cookie management.

Send a message
X

Please use the forum for help with UI & libraries.

This message will be securely transmitted to our servers.