https://github.com/sofagris/opcua
A simple OPC UA integration for Home Assistant
https://github.com/sofagris/opcua
hacs hacs-integration home-assistant opc-ua
Last synced: 2 months ago
JSON representation
A simple OPC UA integration for Home Assistant
- Host: GitHub
- URL: https://github.com/sofagris/opcua
- Owner: sofagris
- Created: 2025-04-03T22:53:17.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-04T17:26:42.000Z (about 1 year ago)
- Last Synced: 2025-10-07T18:08:48.815Z (9 months ago)
- Topics: hacs, hacs-integration, home-assistant, opc-ua
- Language: Python
- Homepage: https://github.com/sofagris/opcua
- Size: 8.79 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# OPC UA Integration for Home Assistant
[](https://github.com/custom-components/hacs)
This integration allows you to connect to OPC UA servers and monitor their data in Home Assistant.
## Features
- Connect to OPC UA servers
- Monitor OPC UA nodes as sensors
- Support for authentication
- Multi-language support (English, Norwegian, Swedish, German)
## Installation
### HACS Installation
1. Open HACS
2. Go to Integrations
3. Click the three dots in the top right
4. Select "Custom repositories"
5. Add this repository
6. Click "Add"
7. Find "OPC UA" in the list
8. Click "Install"
### Manual Installation
1. Copy the `opcua` folder to your `custom_components` directory in your Home Assistant configuration.
2. Restart Home Assistant.
3. Go to Settings -> Devices & Services -> Add Integration
4. Search for "OPC UA" and click on it
5. Enter your OPC UA server details:
- Server URL (required)
- Username (optional)
- Password (optional)
- Name (optional)
## Configuration
### Server URL
The URL should be in the format: `opc.tcp://hostname:port`
### Authentication
If your OPC UA server requires authentication, you can provide a username and password.
### Node Configuration
After adding the integration, you can configure which nodes to monitor by adding them as sensors in your `configuration.yaml`:
```yaml
sensor:
- platform: opcua
server: "opcua_server_name"
nodes:
- name: "Temperature"
node_id: "ns=2;i=1"
unit_of_measurement: "°C"
```
## Supported Languages
- English
- Norwegian
- Swedish
- German
## Troubleshooting
If you encounter connection issues:
1. Verify that the server URL is correct
2. Check if the server is accessible from your Home Assistant instance
3. Verify authentication credentials if required
4. Check the Home Assistant logs for detailed error messages
## Development
To contribute to this integration:
1. Fork the repository
2. Create a feature branch
3. Make your changes
4. Submit a pull request
## License
This project is licensed under the MIT License - see the LICENSE file for details.
## Credits
- [asyncua](https://github.com/FreeOpcUa/opcua-asyncio) - The OPC UA client library used in this integration
- [Home Assistant](https://www.home-assistant.io/) - The home automation platform
- [HACS](https://hacs.xyz/) - Home Assistant Community Store