{"id":1317,"date":"2023-12-09T19:23:01","date_gmt":"2023-12-09T17:23:01","guid":{"rendered":"https:\/\/www.rocworks.at\/wordpress\/?p=1317"},"modified":"2023-12-10T09:50:33","modified_gmt":"2023-12-10T07:50:33","slug":"bring-mqtt-payload-to-opc-ua","status":"publish","type":"post","link":"https:\/\/www.rocworks.at\/wordpress\/?p=1317","title":{"rendered":"Bring MQTT Payload to OPC UA?"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">\u00a0I wanted to get my Home-Automation values to SCADA, it\u2019s a \u201cself-made\u201d JSON message format. I tried it with Ignition and the MQTT Module. Btw.: it&#8217;s great that they have the Makers Edition for non-commercial use at home \ud83d\udc4d. But I don\u2019t know why, it only got one topic and one value from my MQTT Broker, and it did not receive any updates. Don\u2019t know what went wrong\u2026 <br><br>Anyhow, I decided to add a custom JSON format to the <a href=\"http:\/\/automation-gateway.com\/\">Automation-Gateway.com<\/a>. It\u2019s simple, just define the JSON-Path to the value and optionally to a timestamp in milliseconds since epoch or to an ISO 8601 format.<br><br>Now I can use the Automation-Gateway\u2019s OPC UA server in any SCADA system to visualize my MQTT values\u2026<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Here is the config.yaml configuration file for the Automation-Gateway.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Servers:\n  OpcUa:\r\n    - Port: 4841\r\n      Enabled: true\r\n      LogLevel: INFO\r\n      Topics:\r\n        - Topic: mqtt\/<strong>home<\/strong>\/path\/Original\/#\nDrivers:\r\n  Mqtt:\r\n    - Id: \"<strong>home<\/strong>\"\r\n      LogLevel: INFO\r\n      Host: 192.168.1.3\r\n      Port: 1883\r\n      Format: Json\r\n      CustomJson:\r\n          Value: \"Value\"\r\n          TimestampMs: \"TimeMS\"\r\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.rocworks.at\/wordpress\/wp-content\/uploads\/2023\/12\/image.png\"><img loading=\"lazy\" decoding=\"async\" width=\"691\" height=\"298\" src=\"https:\/\/www.rocworks.at\/wordpress\/wp-content\/uploads\/2023\/12\/image.png\" alt=\"\" class=\"wp-image-1323\" srcset=\"https:\/\/www.rocworks.at\/wordpress\/wp-content\/uploads\/2023\/12\/image.png 691w, https:\/\/www.rocworks.at\/wordpress\/wp-content\/uploads\/2023\/12\/image-300x129.png 300w\" sizes=\"auto, (max-width: 691px) 100vw, 691px\" \/><\/a><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.rocworks.at\/wordpress\/wp-content\/uploads\/2023\/12\/1701035223014-2.jpeg\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"615\" src=\"https:\/\/www.rocworks.at\/wordpress\/wp-content\/uploads\/2023\/12\/1701035223014-2.jpeg\" alt=\"\" class=\"wp-image-1319\" srcset=\"https:\/\/www.rocworks.at\/wordpress\/wp-content\/uploads\/2023\/12\/1701035223014-2.jpeg 800w, https:\/\/www.rocworks.at\/wordpress\/wp-content\/uploads\/2023\/12\/1701035223014-2-300x231.jpeg 300w, https:\/\/www.rocworks.at\/wordpress\/wp-content\/uploads\/2023\/12\/1701035223014-2-768x590.jpeg 768w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/a><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>\u00a0I wanted to get my Home-Automation values to SCADA, it\u2019s a \u201cself-made\u201d JSON message format. I tried it with Ignition and the MQTT Module. Btw.: it&#8217;s great that they have the Makers Edition for non-commercial use at home \ud83d\udc4d. But &hellip; <a href=\"https:\/\/www.rocworks.at\/wordpress\/?p=1317\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1,39],"tags":[57,60,58,54,61,59],"class_list":["post-1317","post","type-post","status-publish","format-standard","hentry","category-allgemein","category-frankenstein","tag-frankenstein","tag-ignition","tag-json","tag-mqtt","tag-opc-ua","tag-scada"],"_links":{"self":[{"href":"https:\/\/www.rocworks.at\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1317","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rocworks.at\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rocworks.at\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rocworks.at\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rocworks.at\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1317"}],"version-history":[{"count":3,"href":"https:\/\/www.rocworks.at\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1317\/revisions"}],"predecessor-version":[{"id":1324,"href":"https:\/\/www.rocworks.at\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1317\/revisions\/1324"}],"wp:attachment":[{"href":"https:\/\/www.rocworks.at\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1317"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rocworks.at\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1317"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rocworks.at\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1317"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}