Publish OPC UA and MQTT Data to the Cloud with Automation-Gateway – inspired by a users request ๐ก
If you have a local ๐ข๐ฃ๐ ๐จ๐ server or ๐ ๐ค๐ง๐ง broker and want to bring that data to a ๐ฐ๐น๐ผ๐๐ฑ-๐ฏ๐ฎ๐๐ฒ๐ฑ dashboard, Automation-Gateway.com makes it simple. You can easily publish your data to ๐๐ป๐ณ๐น๐๐ ๐๐ Cloud and visualize it in ๐๐ฟ๐ฎ๐ณ๐ฎ๐ป๐ฎ โ all without complex setups.
I recently added support for InfluxDB V2 to the gateway, allowing you to configure an Influx token and bucket for data publishing. With just a few steps, your local OPC UA or MQTT data can be ๐๐๐ผ๐ฟ๐ฒ๐ฑ ๐ถ๐ป ๐๐ต๐ฒ ๐ฐ๐น๐ผ๐๐ฑ and displayed in Grafana in real time.
In this scenario we will host Grafana over the IIS from WinCC Unified. So that it comes from the same origin and that we do not come over a CORS (Cross-Origin Request Blocked) problem.
What is needed to allow Grafana to be embedded in another application is to set allow_embedding = true in the Grafana configuration file.
To host Grafana over the IIS the following settings must be made:
Add a URL Rewrite to your IIS configuration file. Change “desktop-khlb071” to your computer where Grafana is running on. Restart the Webpage with the IIS Manager.
The IIS configuration file can be found here: (C:\Program Files\Siemens\Automation\WinCCUnified\SimaticUA\web.config)
Change the following configuration of Grafana (defaults.ini). Change the domain to your computer name where Grafana is running on. It must be the same name what you use in the IIS configuration file!
# The public facing domain name used to access grafana from a browser
domain = desktop-khlb071
# Redirect to correct domain if host header does not match domain
# Prevents DNS rebinding attacks
enforce_domain = false
# The full public facing url
root_url = %(protocol)s://%(domain)s:%(http_port)s/grafana
# Serve Grafana from subpath specified in `root_url` setting. By default it is set to `false` for compatibility reasons.
serve_from_sub_path = true
# set to true if you want to allow browsers to render Grafana in a <frame>, <iframe>, <embed> or <object>. default is false.
allow_embedding = true