77bdcf1f7f23721aab54f3b934144a36c94f7eb1
Major project initialization and feature implementation: **Core Features:** - OPC UA client for Honeywell Experion HS R530 integration - Real-time data streaming and history data retrieval - Text-to-SQL query engine with TimeScaleDB - JSON-based node configuration system - SQLite database with migration support **Architecture:** - Clean architecture with Domain, Application, Infrastructure layers - ASP.NET Core Web API frontend - Web UI with real-time visualization - PKI-based OPC UA authentication (TLS) **Infrastructure Components:** - ExperionOpcClient: OPC UA connection management - ExperionRealtimeService: Real-time data streaming - ExperionHistoryService: Historical data queries - TextToSqlService: Natural language to SQL queries - SqlValidator: SQL injection prevention **Database:** - TimescaleDB integration (recommended) or SQLite fallback - Entity Framework Core with Extenstion methods - OPCTag, KeyValue tables for data storage **Security:** - Certificate-based OPC UA endpoint security - SSL/TLS encryption for database connections - Output param binding injection prevention **Testing:** - Unit tests for TextToSqlService and SqlValidator - Integration tests for Korean time range extraction See REVIEW_REQUEST.md for detailed code review information.
ExperionCrawler
Honeywell Experion OPC UA 서버를 위한 웹 기반 데이터 수집 도구.
아키텍처
ExperionCrawler/
└── src/
├── Core/
│ ├── Domain/Entities/ # ExperionTag, ExperionRecord, ExperionServerConfig ...
│ ├── Application/
│ │ ├── Interfaces/ # IExperionCertificateService, IExperionOpcClient ...
│ │ ├── Services/ # ExperionCrawlService
│ │ └── DTOs/ # ExperionServerConfigDto, ExperionCrawlRequestDto ...
│ └── (Domain 은 Infrastructure 에 의존하지 않음)
│
├── Infrastructure/
│ ├── Certificates/ # ExperionCertificateService (pki/ 폴더 관리)
│ ├── OpcUa/ # ExperionOpcClient, ExperionStatusCodeService
│ ├── Csv/ # ExperionCsvService (CsvHelper)
│ └── Database/ # ExperionDbContext + ExperionDbService (EF Core / SQLite)
│
└── Web/
├── Controllers/ # ExperionCertificateController, ConnectionController ...
├── Program.cs # DI 등록, 미들웨어
└── wwwroot/ # index.html + css/style.css + js/app.js
기능
| 메뉴 | 설명 |
|---|---|
| 01 인증서 관리 | OPC UA 클라이언트 X.509 인증서 생성 / 상태 확인 |
| 02 서버 접속 테스트 | OPC UA 서버 연결 테스트, 단일 태그 읽기, 노드 탐색 |
| 03 데이터 크롤링 | 복수 노드 주기 수집 → CSV 저장 |
| 04 DB 저장 | CSV 파일 → SQLite DB 임포트, 레코드 조회 |
Ubuntu 서버 배포
사전 요구사항
# .NET 8 SDK (없으면 deploy.sh 가 자동 설치)
dotnet --version
한 번에 배포
git clone <repo> ExperionCrawler
cd ExperionCrawler
sudo bash deploy.sh
수동 실행 (개발/테스트)
cd src/Web
dotnet run
# → http://localhost:5000
서비스 관리
sudo systemctl status experioncrawler
sudo systemctl restart experioncrawler
sudo systemctl stop experioncrawler
sudo journalctl -u experioncrawler -f # 실시간 로그
PKI 디렉토리 구조 (원본 Program.cs 준수)
<실행 위치>/
└── pki/
├── own/certs/{clientHostName}.pfx ← 생성된 클라이언트 인증서
├── trusted/certs/ ← 신뢰 피어 인증서
├── issuers/certs/ ← 신뢰 발급자 (필수 경로)
└── rejected/certs/ ← 거부된 인증서
데이터 저장 위치
<실행 위치>/
└── data/
├── experion.db ← SQLite DB
└── csv/ ← 크롤링 CSV 파일
API 엔드포인트
GET /api/certificate/status?clientHostName=dbsvr
POST /api/certificate/create { clientHostName, subjectAltNames, pfxPassword }
POST /api/connection/test { serverHostName, port, clientHostName, userName, password }
POST /api/connection/read { serverConfig, nodeId }
POST /api/connection/browse { serverConfig, startNodeId? }
POST /api/crawl/start { serverConfig, nodeIds[], intervalSeconds, durationSeconds }
GET /api/database/files
POST /api/database/import { fileName }
GET /api/database/records?limit=100&from=&to=
Swagger UI: http://<서버IP>:5000/swagger (Development 모드)
패키지 버전
| 패키지 | 버전 |
|---|---|
| OPCFoundation.NetStandard.Opc.Ua.Client | 1.5.374.85 |
| OPCFoundation.NetStandard.Opc.Ua.Core | 1.5.374.85 |
| CsvHelper | 33.0.1 |
| Microsoft.EntityFrameworkCore.Sqlite | 8.0.13 |
| Swashbuckle.AspNetCore | 6.8.1 |
Description
Languages
C#
43.4%
Python
31.1%
JavaScript
16.2%
HTML
4.6%
CSS
4%
Other
0.7%