For the OpenSearch and Elasticsearch fans: the automation-gateway.com can now log OPC UA, MQTT, PLC4X values to OpenSearch!
Makes sense if you have lot of text values, to leverage the full text search capabilities. But for timeseries it is nice as well, the Kibana tool is great to create dashboards.
🥳 Last weekend I found some time to try out an upcoming feature in WinCC Open Architecture 3.20. With the Node.js integration you can write your business logic in JavaScript with native connectivity to WinCC OA. You can take full advantage of the Node.js ecosystem.
🧐 But I am a Java enthusiast and I love the JVM ecosystem. Have you ever heard about GraalVM? It is an advanced JDK written in Java. And it has a Node.js Runtime, which gives you the power of Node.js plus the power of polyglot programming, you can mix JavaScript with Java.
👍 And it turned out that the GraalVM Node.js Runtime also works with WinCC OA! It took me some time to figure out how the polyglot interoperability works, but now I have a first draft of a Java-Library which makes it easy to use Java and OA in the Node.js environment.
🤩 I can now use Java to develop great solutions with WinCC OA.
You can now add a Node. In that example we will use the dpQuery node and use “SELECT ‘_online.._value’ FROM ‘Meter_Input_WattAct.'” as query. So we just query the online value of one tag.
You have to configure the Server by clicking on the pencil button. This points to the before started Websocket Control Manager and you have to set the username and password we have added in one of the previous steps.
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
Some weeks ago, someone asked at the #HiveMQ Slack channel if there is any way to run SSH over MQTT…
👉 Strange idea? I liked it, and I want to share the TCP-MQTT-TCP bridge I made weeks ago.
🤔 Use Case? Imagine you have IoT’s connected to a central MQTT broker and you want to connect from one to another via SSH, transfer files, expose services, a Webpage, without exposing ports to the public internet or creating a VPN.
⚠️ Be careful and please evaluate and consider the possible security impacts before using this “backdoor man” … the doors …
⚠️ And transferring files over MQTT may increase your cloud bill 🤑
👉It’s on GitHub, it is just a draft and can be used as a template to be extended by your needs.
👀 How to? Start the client.js script at the destination host – or more precisely at a node in the local network where the destination node runs – and start the server.js script on the source node from where you want to connect to the remote/destination host and port. For example, if there is a SSH server running on the destination host+port, then you can do a SSH localhost -p 8080 -l username at your source node, and you will get a SSH connection from the source node to the destination node. And the data is transmitted over MQTT topics.
Successfully connected HighByte Intelligence Hub to Unity3D with SparkplugB! ✔
👀 I am sending data from my Automation-Gateway.com to the Intelligence Hub via OPC UA, then the values are published from HighByte to MQTT with the Intelligence Hub SparkplugB connector and then getting consumed in Unity with the MQTT SparkplugB Asset.
👍 Works straight forward and was easy to setup!
🧐 Sparkplug Learning: If a Host Application is not the Primary Host of an Edge Node and it starts up after the Edge Node, it must send the Rebirth command to the Edge Nodes in which it is interested in, to get a birth message with the current/initial values of all the metrics of the nodes. My Unity client ignores incoming metrics of DATA messages which it has not seen before in a BIRTH message…