Best Approach for an HMI #626
Replies: 3 comments 1 reply
-
think about websocket and send commands to the python backend (like e request wrapper around client class methods) with websockets you can also forward subscription notification there is also a common missconception the http based opcua stuff needs to be supported by the server you want to connect to but the truth is it is hard to find a server which did that ... opcua is a heavy protocol so using ua binary is way better sadly browsers does not support tcp connections so it is not possible to have ua binary in the browser... |
Beta Was this translation helpful? Give feedback.
-
Hi Ethan - I am successfully using inexpensive Samsung tablets as browser based HMIs. Just write small Python programs using FreeOpcUa libraries as clients. Then call those python programs from PHP whenever needed during your normal web programming. Write the Python so it outputs the data as JSON back to PHP. PHP code to call Python passing arguments: Python to catch the arguments from PHP, make your OPC call, then dump the JSON data back to PHP: |
Beta Was this translation helpful? Give feedback.
-
I do not not understand much of your quesiton. If you want to use web technologies, there are probably opcua libraries for js. |
Beta Was this translation helpful? Give feedback.
-
Hello i'm fairly new to OPCUA.
I wanted to ask if anyone had any advice on setting up an HMI to interact with the OPCUA server. My preferred method of development is with a Web interface but if that is not an option i could use QT.
It looks like the web transport protocol is yet to be implemented so that makes using anything in the browser a bit more difficult. I guess I would need to make a wrapper around the opcua client or server with a rest interface if I wanted to go that route, but that seems like its a potentially large undertaking.
The other option would be to use PyQT just like the example GUI and create my HMI from there. Qt is a bit more clunky to use than web dev in my opinion which is why this isn't my preferred approach.
Is there any good way to directly access the server with a WebSocket that doesn't require a massive amount of work?
Is there a plan to create a web socket interface in the project roadmap?
If it's something that's fairly small to do I'd be happy to help contribute.
In general I'm working on a system that needs to control around 25 devices that either implement some Serial Interface/Modbus RTU have some pub sub endpoints.
Is using opcua server a good idea for this or am in going down the wrong path?
Thanks for any help or suggestions
Beta Was this translation helpful? Give feedback.
All reactions