{"id":1127,"date":"2021-10-29T21:14:20","date_gmt":"2021-10-29T19:14:20","guid":{"rendered":"https:\/\/www.rocworks.at\/wordpress\/?p=1127"},"modified":"2021-10-29T22:31:01","modified_gmt":"2021-10-29T20:31:01","slug":"industrial-data-in-the-graph-database-neo4j","status":"publish","type":"post","link":"https:\/\/www.rocworks.at\/wordpress\/?p=1127","title":{"rendered":"Industrial Data in the Graph Database Neo4j&#8230;"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">The <a href=\"https:\/\/github.com\/vogler75\/automation-gateway\/\">Frankenstein Automation Gateway<\/a> now also supports to write OPC UA values to the graph database <a href=\"https:\/\/neo4j.com\">Neo4j<\/a>. <\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.rocworks.at\/wordpress\/wp-content\/uploads\/2021\/10\/Bildschirmfoto-2021-10-29-um-20.52.14.png\"><img loading=\"lazy\" decoding=\"async\" width=\"824\" height=\"306\" src=\"https:\/\/www.rocworks.at\/wordpress\/wp-content\/uploads\/2021\/10\/Bildschirmfoto-2021-10-29-um-20.52.14.png\" alt=\"\" class=\"wp-image-1132\" srcset=\"https:\/\/www.rocworks.at\/wordpress\/wp-content\/uploads\/2021\/10\/Bildschirmfoto-2021-10-29-um-20.52.14.png 824w, https:\/\/www.rocworks.at\/wordpress\/wp-content\/uploads\/2021\/10\/Bildschirmfoto-2021-10-29-um-20.52.14-300x111.png 300w, https:\/\/www.rocworks.at\/wordpress\/wp-content\/uploads\/2021\/10\/Bildschirmfoto-2021-10-29-um-20.52.14-768x285.png 768w\" sizes=\"auto, (max-width: 824px) 100vw, 824px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">At startup it can also write the OPC UA node <strong>structure<\/strong> into the graph database, so that the basic model of the OPC UA server is mirrored to the graph database. For that you have to add the &#8220;Schemas&#8221; section in the config file (see an example configuration file below). There you can choose which RootNodes (and all sub nodes) of your OPC UA systems should be mirrored to the graph database.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Once you have the (simplified) OPC UA <strong>information model<\/strong> in the graph database, you can add on top of that your own knowledge graph data and create relations to OPC UA nodes of your machines to enrich the <strong>semantic<\/strong> data of the OPC UA model. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">With that model you can leverage the power of your <strong>Knowledge Graphs<\/strong> in combination with <strong>live data<\/strong> from your machines and use <a href=\"https:\/\/neo4j.com\/developer\/cypher\/\">Cypher<\/a> queries to get the knowledge out of the graph.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Here we see an example of the OPC UA server from the <strong>SCADA System WinCC Open Architecture<\/strong>. The first level of nodes below the &#8220;Objects&#8221; node represent Datapoint-Types (e.g. PUMP1) followed by the Datapoint-Instances (e.g.: PumpNr) and below that we see the datapoint elements (e.g. value =&gt; speed). An datapoint element is an OPC UA variable where we also see the current value from the SCADA system.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-style-default\"><a href=\"https:\/\/www.rocworks.at\/wordpress\/wp-content\/uploads\/2021\/10\/Bildschirmfoto-2021-10-29-um-20.25.00.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"677\" src=\"https:\/\/www.rocworks.at\/wordpress\/wp-content\/uploads\/2021\/10\/Bildschirmfoto-2021-10-29-um-20.25.00-1024x677.png\" alt=\"\" class=\"wp-image-1130\" srcset=\"https:\/\/www.rocworks.at\/wordpress\/wp-content\/uploads\/2021\/10\/Bildschirmfoto-2021-10-29-um-20.25.00-1024x677.png 1024w, https:\/\/www.rocworks.at\/wordpress\/wp-content\/uploads\/2021\/10\/Bildschirmfoto-2021-10-29-um-20.25.00-300x198.png 300w, https:\/\/www.rocworks.at\/wordpress\/wp-content\/uploads\/2021\/10\/Bildschirmfoto-2021-10-29-um-20.25.00-768x508.png 768w, https:\/\/www.rocworks.at\/wordpress\/wp-content\/uploads\/2021\/10\/Bildschirmfoto-2021-10-29-um-20.25.00.png 1283w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<pre class=\"wp-block-code\"><code>Example Gateway configuration file:\n\nDatabase:\n  Logger:\n    - Id: neo4j\n      Enabled: true\n      Type: Neo4j\n      Url: bolt:\/\/nuc1.rocworks.local:7687\n      Username: \"neo4j\"\n      Password: \"manager\"\n      Schemas:\n        - System: opc1  # Replicate node structure to the graph database\n          RootNodes:\n            - \"ns=2;s=Demo\"  # This node and everything below this node\n        - System: winccoa1  # Replicate the nodes starting from \"i=85\" (Objects) node\n      WriteParameters:\n        BlockSize: 1000\n      Logging:\n        - Topic: opc\/opc1\/path\/Objects\/Demo\/SimulationMass\/SimulationMass_Float\/+\n        - Topic: opc\/opc1\/path\/Objects\/Demo\/SimulationMass\/SimulationMass_Double\/+\n        - Topic: opc\/opc1\/path\/Objects\/Demo\/SimulationMass\/SimulationMass_Int16\/+\n        - Topic: opc\/winccoa1\/path\/Objects\/PUMP1\/#\n        - Topic: opc\/winccoa1\/path\/Objects\/ExampleDP_Int\/#\n\n\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The Frankenstein Automation Gateway now also supports to write OPC UA values to the graph database Neo4j. At startup it can also write the OPC UA node structure into the graph database, so that the basic model of the OPC &hellip; <a href=\"https:\/\/www.rocworks.at\/wordpress\/?p=1127\">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":[42,35],"class_list":["post-1127","post","type-post","status-publish","format-standard","hentry","category-allgemein","category-frankenstein","tag-neo4j","tag-opcua"],"_links":{"self":[{"href":"https:\/\/www.rocworks.at\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1127","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=1127"}],"version-history":[{"count":8,"href":"https:\/\/www.rocworks.at\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1127\/revisions"}],"predecessor-version":[{"id":1139,"href":"https:\/\/www.rocworks.at\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1127\/revisions\/1139"}],"wp:attachment":[{"href":"https:\/\/www.rocworks.at\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1127"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rocworks.at\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1127"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rocworks.at\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1127"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}