# 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 서버 배포 ### 사전 요구사항 ```bash # .NET 8 SDK (없으면 deploy.sh 가 자동 설치) dotnet --version ``` ### 한 번에 배포 ```bash git clone ExperionCrawler cd ExperionCrawler sudo bash deploy.sh ``` ### 수동 실행 (개발/테스트) ```bash cd src/Web dotnet run # → http://localhost:5000 ``` ### 서비스 관리 ```bash 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 |