Using WebCentre as a Proxy for Elemental Live

Because Elemental Live is controlled via an HTTP REST API, it can be controlled directly from the browser without a Device Proxy. In Helm Designer, you can place an Elemental Live icon, set the URL and Event and publish this as a web panel.

However, if you are using have authentication enabled on your Elemental Live system (e.g. a cloud instance) you’ll need to either enable CORS support on the Elemental system, or configure an HTTP proxy server in NGINX to avoid CORS  issues which would prevent the browser accessing Elemental Live.

Basically, this involves configuring the web server to accept requests for a url like http://my.webcentre.com/elemental and forward them to http://actual.elementallive.com

The standard NGINX configuration file has two sections showing this, but they are commented out and will need modifying for your application. Here’s the relevant section.

# For proxying request to Elemental Live, enter the IP Address and port here and enabled this section

# HTTPS port is 443, HTTP port would be 80
 upstream elem_api_server {
 server 192.168.0.197:443;
 }
 ...
 # For proxying request to Elemental Live, enabled the section below.
 # IP Address and port are configured in the upstream section above
 location /elemental/ {
 proxy_set_header X-Real-IP $remote_addr;
 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
 proxy_set_header X-NginX-Proxy true;
 proxy_pass https://elem_api_server;
 proxy_ssl_session_reuse off;
 proxy_set_header Host $http_host;
 proxy_redirect off;
 }

The IP Address shown in bold should be changed to the address of your Elemental Live system.

The example above shows proxying from HTTP to HTTPS. If your Elemental Live system isn’t running HTTPS then you should modify the proxy_pass line accordingly and change the port number from 443 to 80.

Also, if you are using authentication you will need to enter the API Key and Username for access to the Elemental system

These can both  be found in the User Profile page. https://my.elemental-live/user_profile

Enter the API Key and Username in Helm Designer. If using NGINX as a proxy then the URL should just be the relative part of that entered in the NGINX location directive. Otherwise, enter the URL of your Elemental Live system directly.

You should now be able to select an Event in the property inspector.