Raspberry Pi OPC-UA Server

Okay, now I got the new updated version, and downloaded via the terminal in ubuntu mate on my Raspberry Pi.
Everything went smooth, but when I tried to startup the server I now get a new error:


INFO | wrapper | 2015/08/25 13:23:37 | Command[20] : com.digitalpetri.opcua.raspberrypi.PiServer
ERROR | wrapper | 2015/08/25 13:23:37 | JVM exited while loading the application.
INFO | jvm 5 | 2015/08/25 13:23:37 | [color=#FF0000]Error: Could not find or load main class org.tanukisoftware.wrapper.WrapperSimpleApp[/color]
FATAL | wrapper | 2015/08/25 13:23:38 | There were 5 failed launches in a row, each lasting less than 300 seconds. Giving up.
FATAL | wrapper | 2015/08/25 13:23:38 | There may be a configuration problem: please check the logs.
STATUS | wrapper | 2015/08/25 13:23:38 | ← Wrapper Stopped

Am I doing something wrong here or is there a problem running this on Ubuntu Mate?

/Nikolai

PS. I’ve attached my log once again
wrapper_win_2.log (43.5 KB)

Try again in 5 minutes, I am pushing what I think is the fix (a jar file wasn’t be included in the assembly).

You’re quicker than I expected, I still haven’t actually tried to run this on my Pi yet to make sure it works :stuck_out_tongue:

okay great, sorry my impatientness

Ok, I haven’t built any releases, but if you can build from source you might get a package that works :confused:

Hopefully I can find my RPi tonight and actually run it…

Okay, now I think the Server is running, since I don’t get any messages of errors, and I can both start the server and stop it again.
Now I will try to see if I can connect to through Ignition on my Macbook, and hopefully see the tags :smiley:
Update will follow :thumb_right:

Alright, so far so good. Ignition is now installed on my Macbook, and running perfectly.
Then I want to make an new “OPC Connection” in Ignition Gateway, where I type in the IP address of the Raspberry and the port that the OPC-UA server on the RPi has bound to.
The two security policies I set to none, and the login and password I also leave blank.
Shouldn’t this work then?

Ignition comes with an error where it states that the connection simply couldn’t be established.

Am I doing it wrong?

[quote=“svalebaek”]Alright, so far so good. Ignition is now installed on my Macbook, and running perfectly.
Then I want to make an new “OPC Connection” in Ignition Gateway, where I type in the IP address of the Raspberry and the port that the OPC-UA server on the RPi has bound to.
The two security policies I set to none, and the login and password I also leave blank.
Shouldn’t this work then?

Ignition comes with an error where it states that the connection simply couldn’t be established.

Am I doing it wrong?[/quote]

I haven’t built it into a release yet, but if you get the latest source code and build that, you should be able to get it started and get Ignition connected. I still need to make sure the GPIO access works before I turn it into a release zip.

If you can’t get connected, grab the logs from both the pi and Ignition.

Alright, I now tried it with a decent router, and make sure that the port 12685 was open. Even though Ignition stil doesn’t connect to the OPC-Ua Server on the RPi.

I have attached both log files (From Ignition and RPi).

I can se that when trying to connect, the server responds something that it is evoked by the client.

Hope you can see something in the logs that I can’t

/Nikolai
log_ignition.txt (1.68 KB)
wrapper_win_3.log (512 KB)

[quote=“svalebaek”]Alright, I now tried it with a decent router, and make sure that the port 12685 was open. Even though Ignition stil doesn’t connect to the OPC-Ua Server on the RPi.

I have attached both log files (From Ignition and RPi).

I can se that when trying to connect, the server responds something that it is evoked by the client.

Hope you can see something in the logs that I can’t

/Nikolai[/quote]

You’re still running an older version. I can see this in the logs:

c.d.o.s.server.tcp.UaTcpStackServer - opc.tcp://192.168.1.97:12685/pi-server bound to /0:0:0:0:0:0:0:0:12685 [None/None]

In the latest version the endpoint URL does not include “pi-server” in it.

I have now had a chance to get the latest update up and running on the RPi,
but I still get the same error from Ignition. This time though there seems not to be any error on the server.

Before I try to connect from Ignition, I do a network scan, on the host IP adress and it tells me that
there is a open port on 192.168.2.100:12685 so I don’t think this is the problem either.

What is failing here?

Regards Nikolai
wrapper_win4.log (4.53 KB)
Ignition_log2.txt (1.32 KB)

[quote=“svalebaek”]I have now had a chance to get the latest update up and running on the RPi,
but I still get the same error from Ignition. This time though there seems not to be any error on the server.

Before I try to connect from Ignition, I do a network scan, on the host IP adress and it tells me that
there is a open port on 192.168.2.100:12685 so I don’t think this is the problem either.

What is failing here?

Regards Nikolai[/quote]

On the Ignition console area there’s a tab for Loggers, search for ‘ConnectionUtil’ and turn that logger to TRACE.

Let Ignition try to connect, and then upload your logs or email them to me.

Hi Kevin

I have now succeeded to establish connection between Ignition Gateway and my RPi OPC-UA server Yeah!!!

Though I quickly ran in to another problem. I’m trying to get the data from a DS18B20 Temp. mounted to the GPIO interface on the RPi and into to Ignition. What I have accomplished so far is:

  • Ignition connected to the RPi OPC-UA Server
  • read a temp. from the GPIO directly from the terminal on the RPi (mounted on PIN 7. All the other PINs won’t find the temp. sensor)
  • See the tag in Ignition Designer (though without any value), when the temp. sensor is mounted to e.g. PIN 3.

So why just not mount the sensor to PIN 7 on the GPIO and launch the server and connect Ignition and read the tag in the designer?! Yeah well the server won’t startup when the gip-config.jason file is edited to an digital input on PIN 7. Then the wrapper just crashes during boot up. I have tested nearly all other configuration in the file, and the wrapper starts up fine on all pins. So why does it not start up when the input is set to PIN 7? do you have any idea of that?

Can you write me your email then I can send the log from the wrapper?

I believe I’m almost at the finish line, and I know that my company would be extremely interested in seeing this to work, and hopefully if so, we could use your software for further development of these small embedded servers.

If you have time, I would be pleased to have a chat with you over Skype, to discuss further development cooperation with you and Inductive Automation!

/Nikolai

Wrapper error upon start up:

WrapperSimpleApp Error: java.lang.RuntimeException: Unable to open GPIO direction interface for pin [7]: No such file or directory

svalebaek,

Interfacing with the RPi GPIO is done via a 3rd party library (pi4j, which wraps WiringPi) and I don’t know enough about it to be any help troubleshooting the error you’re seeing.

My two suggestions would be:

  1. Make sure you’re running as root or start the server with sudo.
  2. Make sure no other programs or scripts running on the Pi are already using pin 7.

Tanks, I’ll try that!

Tried with a RPi 3 model B, it works perfectly.
Thanks Kevin. :mrgreen:

Actually i have problems, when i try run this programs, at QX output “merah_0” has “TRUE” value in client, and i try to connect with raspi, but at gpio raspi can’t switch on the lamp.
I use opc ua client and server to communicate all of them and 4diac ide to run the programs.