Open orudas opened 6 years ago
Thanks for trying to work with this project. I have to first apologize that it's currently not really in a very useful state. The project was not exactly prepared to be a tutorial and has been abandoned after I graduated. Also, the code is over 1 year old and does not comply with current OPC UA specifications.
However, you can use it as a reference to build your own version of an OPC UA client. I've heard that the newest Unity versions even support the OPC UA C# Scripts natively (=support .NET4.6), so the workaround with the DLLs we used here is no longer necessary!
It's hard to pin down the problem with your particular OPC UA Server, but this project should definitely work with the server it has originally been tested with. Just run a local instance of the official OPC .NET Standard and modify the Endpoint-address and it should connect: https://github.com/OPCFoundation/UA-.NETStandard Since the newer versions might be incompatible with this client, here's the original Server we used back in 2017: https://drive.google.com/open?id=1TJSrXrRJqFFQ7U0l70k4E0a_GgUt5oq4
Lastly the whole setup is also explained in the following video, which was originally intended to be uploaded on youtube: https://drive.google.com/open?id=1iLwBOAN5U0b8-fDZPXIlQyblHjRWoGS6
Please keep me updated on your progress. I hope to update the OPC UA Client in the future, in case I find some spare time in my work schedule...
Thanks for replying and sharing the information!...I'll work on it.
Hello Robin I also have the same problem with orudas that Not able to Connect to OPC UA server. I followed all of your step in the video already.
Wow, this is really messed up. Since the original tutorial application was working on my old PC, I never tested the setup from scratch on a new PC. But to confirm your problems I tried to go through the setup on a new PC... and couldn't get it running again. This is how far I've got: To get the HoloLens App running you have to use the HoloLens emulator, since the deployment to Local doesn't work anymore (app crashes). The VS2017 debugger also seems to have issues with the app, so you can only use "Run without Debugging" to actually execute it in the emulator. Sometimes it's still crashing though... then just restart the emulator, and it'll work again.
The connected OPCUA Server is actually the "Opc.Ua.SampleServer (Universal Windows)". The UA Sample Server also kind of works... but it throws weird exceptions for 'Opc.Ua.ServiceResultException', and the Endpoint is not even reachable by the HoloLens-Client. As you can see in the picture it says "SECURE CHANNEL CREATED" on the server side, but the client still says "Connection Failed", so there must be something wrong with the authentication. Without the debug-log it's hard to make any further conclusions.
I can 100% guarantee that the code here on GitHub was working in 2017. I think since both server- and client apps are having hiccups now, that some updates on VS2017 or Windows 10 might have introduced some incompatibilities. So, one thing that might work is downgrading to Unity 5.6 and VS2015. Since the project originally started in 2016 this was the tech-stack that was used for the original code (the HoloRelay project). The code was actually migrated to Unity 2017.1 to be up to date for this tutorial on GitHub.
But again, I'd like to not spend too much time on this old project. We should rather focus our efforts to rebuild this app as an upgraded version using all new Unity 2018 features. Just use the same approach we used in 2017: Extract the C# Code from the official Client of the OPC Foundation and run it as a script inside of Unity. It seems there are already some guys onto it. You should keep an eye on this: https://github.com/OPCFoundation/UA-.NETStandard/issues/584
Hi Robin, I really appreciate your effort to provide a clear explanation. Thank you so much. I'm doing the master thesis which is similar to your project. However, when I saw your work, I think the problem is in the file: OpcUa_Client_Hda.dll.
In this file, the "connect" and "isconnected" function is not doing is sending the information to OPC UA.
That's a reason why the text appear " Connection Failed"
Could you check it again?
One again, Thank you so much to put your effort to explain for us.
@ngocthelong Hallo! Have you solved this problem? I have the same problem. I want to use HoloLens to connect to the OPC UA server and browse the node data.
Hi, I didn't solve the problem... I change to alternative to transfer data
On Thu, Jul 4, 2019, 22:21 zxzkf1992 notifications@github.com wrote:
@ngocthelong https://github.com/ngocthelong Hallo! Have you solved this problem? I have the same problem. I want to use HoloLens to connect to the OPC UA server and browse the node data.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/RobinFischer/OPC-UA_Unity/issues/2?email_source=notifications&email_token=AKDLODRJXF5GVBWV22QRB3LP5ZLT3A5CNFSM4F6324X2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZICSGI#issuecomment-508569881, or mute the thread https://github.com/notifications/unsubscribe-auth/AKDLODTMQ2LNECALZBCURY3P5ZLT3ANCNFSM4F6324XQ .
@ngocthelong Thank you very much for your answer. How did you transfer OPC UA data to HoloLens? If you have time, can you describe this process in detail?
@zxzkf1992 : Hi, I don't transfer via OPC-UA , I'm using MQTT to transfer to Hololens
@ngocthelong Thanks, then I will continue to try HoloLens to connect to the OPC UA server. If it succeeds, I will notify you.
@RobinFischer right now i have a working opc ua client running in the unity editor. If i transfer it to the hololens the application (hologramm) itself is running but not the opc ua communication.
I think the problem is with my directorys for the security certificates.
ApplicationCertificate = new CertificateIdentifier { StoreType = @"Directory", StorePath = @"%CommonApplicationData%\OPC Foundation\CertificateStores\MachineDefault", SubjectName = Utils.Format(@"CN={0}, DC={1}", "OpcUA-Test", Dns.GetHostName()) }, TrustedIssuerCertificates = new CertificateTrustList { StoreType = @"Directory", StorePath = @"%CommonApplicationData%\OPC Foundation\CertificateStores\UA Certificate Authorities" }, TrustedPeerCertificates = new CertificateTrustList { StoreType = @"Directory", StorePath = @"%CommonApplicationData%\OPC Foundation\CertificateStores\UA Applications" }, RejectedCertificateStore = new CertificateTrustList { StoreType = @"Directory", StorePath = @"%CommonApplicationData%\OPC Foundation\CertificateStores\RejectedCertificates" }, AutoAcceptUntrustedCertificates = true, AddAppCertToTrustedStore = true
Can you tell me with StorePath you used?
@zxzkf1992 Did you succeed in the connection? I'm a student who needs to connect a Hololens application to a OPC Server (KEPserver) and it doesn't seem to work. If you could help me I would be very thankful.
@jor125 Yes, I finally solved this problem. HoloLens can successfully connect to the OPC UA server and obtain node data. If you haven't succeeded, you can refer to the link below.
I'm trying to read an integer value "ZZZ" through OPC UA using your code in Unity3D. I know the OPC UA server is working as I'm able to test this with excel using a VBA application.
I've created some Debug log to check the logic, please refer to Debug.Log("I'm here:" + 3); I had to disable the if because I'm not getting the ...m_status.
I assumed the TutorialOutput.Text is the actual value of the variable is it correct?
using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; using OpcUa_Client_Hda; using System;
public class OpcUaInputFieldManager : MonoBehaviour {
}