iotServices (to be renamed as Iiot Services) Cliente OPCUA con Servidor web. Incluye servidor OPCUA de demonstración. API backend express Frontend en Angular
For installing and running the web server in development enviroment, use this command:
cd backend
npm i
npm run start:dev
Webserver also exposes a REST API for handling op.
METHOD | ENDPOINT | ACTION |
---|---|---|
GET | / | home page |
GET | /api/opcua/monitoring | Return the list of monitored variables |
POST | /api/opcua/monitoring | Add variables to the monitored items |
DELETE | /api/opcua/monitoring | Remove variables to the monitored items |
GET | /api/opcua/value | Return the value of the variable via nodeId |
POST | /api/opcua/value | Set the value of the variable via nodeId |
If you don't have any OPC UA servers at hand, you can use the one included. For installing and running the OPC UA server, use this command:
cd opcua-server
npm i
npm run start
The OPC UA server exposes an endpoint at opc.tcp://localhost:4334/UA/MyLittleServer; it describes this structure:
- MyDevice:
ns=1;i=1000
- MyVariable1:
ns=1;i=1001
an autoincremental readonly value starting a 1 - MyVariable2:
ns=1;b=1020FFAA
an read/write value initially set on 10 - FreeMemory
ns=1;s=free_memory
the current free memory on the server
- MyVariable1: