This project logs OPC UA tag data to daily CSV files, organized by year and month folders. It does not use MySQL or SQLite.
csvFolder/year/month/day.csv
Edit config.json
to set:
opcuaEndpoint
: OPC UA server endpointopcuaUsername
/ opcuaPassword
: credentialspollIntervalMs
: polling interval in millisecondstagsCsvFile
: path to tag CSV filecsvFolder
: base folder for CSV logs (default: csv_data
) npm install
config.json
as needed node server.js
name,nodeId
Tag1,ns=2;s=Tag1
Tag2,ns=2;s=Tag2
CSV files are created in csvFolder
with the following structure:
csvFolder/
2025/
09/
04.csv
05.csv
10/
...
Each CSV file contains:
timestamp,name,value
2025-09-04T10:00:00.000Z,Tag1,123
2025-09-04T10:01:00.000Z,Tag1,124
...
34.03$