vogler75 / automation-gateway

A OPC UA gateway which gives you access to your OPC UA values via MQTT or GraphQL (HTTP). If you have an OPC UA server in your PLC, or a SCADA system with an OPC UA server, you can query data from there via MQTT and GraphQL (HTTP). In addition, the gateway can also log value changes from OPC UA nodes in an InfluxDB, IoTDB, Kafka, and others.
GNU General Public License v3.0
222 stars 34 forks source link

HELP: Reading Kepware OPC-UA Server #6

Closed charlyjna closed 7 months ago

charlyjna commented 7 months ago

Hi,

This 'issue' is mainly for asking some help about how to read a topic from Kepware OPC-UA Server. I created a very simple config.yaml file:

Servers:
  Mqtt:
    - Id: Mqtt
      Port: 1883
      Host: 0.0.0.0

  OpcUa:
    - Port: 4000
      Path: server
      Topics:
        - Topic: opc/my_opc_id/Root/Objects/Machine1/PLC/#

Drivers:
  OpcUa:
    - Id: my_opc_id
      EndpointUrl: "opc.tcp://192.168.10.11:49320/Kepware.KEPServerEX.V6"
      UpdateEndpointUrl: true
      SecurityPolicy: None

Unfortunately, I cannot see anything using UAExpert Client. But, with UAExpert Client, I double checked that I have tags in path:

Root
  |- Objects
      |- Machine1
          |- PLC
              |- Type (INT16)
              |- Temp (FLOAT)

Moreover, regarding container logs, I do not have any error. The OpcUaClient driver is connected to Kepware Server, I am able to connect to Frankestein OPC-UA server or MQTT server.

Am I missing something?

Thank you.

Charly

vogler75 commented 7 months ago

Hi Charly, I think you just have to adjust the MQTT topic. "Objects" can be used as root node and will be replace with NodeId "i=85". So, check if i=85 is the right object in your keyware server ("Objects") and then you can try this: opc/my_opc_id/path/Objects/Machine1/PLC/# it is the same as: opc/my_opc_id/path/i=85/Machine1/PLC/# or you can use any other starting node: opc/my_opc_id/path/ns=1;s=16/# => you start directly from ns=1;s16 node id

charlyjna commented 7 months ago

Ok, I misunderstood the path part... Now it is working very nice.

Thank you very much!

vogler75 commented 7 months ago

Great to hear that! Would be nice to connect with you on LinkedIn: Andreas Vogler's LinkedIn Profile.