{"id":44802148,"url":"https://github.com/srcfl/srcful-data-models","last_synced_at":"2026-02-16T13:35:07.820Z","repository":{"id":336338124,"uuid":"1148722534","full_name":"srcfl/srcful-data-models","owner":"srcfl","description":null,"archived":false,"fork":false,"pushed_at":"2026-02-03T23:34:55.000Z","size":74,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-04T11:50:17.495Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/srcfl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-03T09:40:46.000Z","updated_at":"2026-02-03T09:43:58.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/srcfl/srcful-data-models","commit_stats":null,"previous_names":["srcfl/srcful-data-models"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/srcfl/srcful-data-models","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srcfl%2Fsrcful-data-models","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srcfl%2Fsrcful-data-models/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srcfl%2Fsrcful-data-models/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srcfl%2Fsrcful-data-models/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/srcfl","download_url":"https://codeload.github.com/srcfl/srcful-data-models/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srcfl%2Fsrcful-data-models/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29509202,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-16T09:05:14.864Z","status":"ssl_error","status_checked_at":"2026-02-16T08:55:59.364Z","response_time":115,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-02-16T13:35:07.111Z","updated_at":"2026-02-16T13:35:07.801Z","avatar_url":"https://github.com/srcfl.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @srcful/data-models\n\nTypeScript definitions for Sourceful Energy DER (Distributed Energy Resource) metadata and telemetry.\n\n## Installation\n\n```bash\nnpm install @srcful/data-models\n```\n\n## Usage\n\n```typescript\nimport {\n  DERType,\n  V2XStatus,\n  PVMetadata,\n  PVTelemetry,\n  BatteryMetadata,\n  BatteryTelemetry,\n  DERModel,\n} from '@srcful/data-models';\n\n// Define metadata (static configuration)\nconst pvMetadata: PVMetadata = {\n  installed_power_W: 12000,\n  enabled: true,\n  controllable: true,\n};\n\n// Define telemetry (live measurements)\nconst pvTelemetry: PVTelemetry = {\n  W: -7500, // Negative = generating\n  mppt: [\n    { V: 380, A: 12.5 },\n    { V: 375, A: 7.5 },\n  ],\n  timestamp: Date.now(),\n};\n```\n\n## DER Types\n\n| Type | Description | Metadata | Telemetry |\n|------|-------------|----------|-----------|\n| **PV** | Solar panels (DC side) | `PVMetadata` | `PVTelemetry` |\n| **Inverter** | AC conversion point | `InverterMetadata` | `InverterTelemetry` |\n| **Battery** | Energy storage | `BatteryMetadata` | `BatteryTelemetry` |\n| **Meter** | Grid connection point | `MeterMetadata` | `MeterTelemetry` |\n| **V2X Charger** | Bidirectional EV charger | `V2XChargerMetadata` | `V2XChargerTelemetry` |\n\n## Sign Convention\n\n| DER Type | Positive W (+) | Negative W (-) |\n|----------|----------------|----------------|\n| **PV** | n/a | Generation/export |\n| **Battery** | Charging (import) | Discharging (export) |\n| **Meter** | Import from grid | Export to grid |\n| **V2X** | Charging EV (import) | V2G discharge (export) |\n\n## Complete Models\n\nEach DER type has a complete model combining metadata (spec) and telemetry (state):\n\n```typescript\nimport { PVModel, BatteryModel } from '@srcful/data-models';\n\nconst pv: PVModel = {\n  type: 'pv',\n  device_sn: 'SG123456',\n  spec: { /* PVMetadata */ },\n  state: { /* PVTelemetry */ },\n};\n```\n\n## Development\n\n```bash\n# Install dependencies\nnpm install\n\n# Run playground with example data\nnpm run playground\n\n# Type check\nnpm run typecheck\n\n# Build\nnpm run build\n```\n\n## Documentation\n\nSee [device_metadata.md](./device_metadata.md) for the complete architecture documentation.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsrcfl%2Fsrcful-data-models","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsrcfl%2Fsrcful-data-models","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsrcfl%2Fsrcful-data-models/lists"}