I have been working with the integration of various PLC to HA over OPC UA for the past few months. My initial approach was to develop a gateway which connect to the PLC over restful api. After a couple of integration, I found that it would be much benefitial to have a custom integration in HA for OPC UA.
I found an older project which uses the python-opcua, which is deprecated and decided to start a new integration using opcua-asyncio.
The project is currently in development and is per poll based. Asycua component. Follow the instruction shown in the README.md file to start using!
i got it to work as custom component but i get an error with version 2024.1
Logger: asyncua
Source: custom_components/asyncua/init.py:210
Integration: asyncua
First occurred: 9:05:47 AM (3 occurrences)
Last logged: 9:06:47 AM
Runtime error: argument to node must be a NodeId object or a string defining a nodeid found ns=2;s=Siemens s7 300.Data.1 of type <class ‘homeassistant.util.yaml.objects.NodeStrClass’>
can you share your yaml configuration here? I might be able to diagnose it with more details.
I might have found the bug. I think it might be caused from a recent update in homeassistant. I am working on a fix now together with a easier integration with hacs for better tracking and updates.