# Halowerk Solar Battery Cycle Analyzer

> Halowerk Solar Battery Cycle Analyzer is a paid API for AI agents from solar.halowerk.com, paid per call via x402, $0.004/call, status unknown (last checked 2026-09-13).

Integrates a time-series of current samples over time using the trapezoidal rule to compute charge/discharge energy for a battery cycle, with gap detection and internal resistance estimation.

## Facts

- Endpoint: POST https://solar.halowerk.com/battery-cycle
- Price: $0.004/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/halowerk-solar-battery-cycle-analyzer-759bb858
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_6LGczNPow9yjZtwsLB1aK

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability halowerk-solar-battery-cycle-analyzer-759bb858 -d '<json body>'
```

Example prompt: I have a series of timestamped current readings from my solar battery system — positive values for charging, negative for discharging — can you integrate them using the trapezoidal rule to get total net charge and flag any gaps longer than 30 seconds?

## When to prefer this

Use this endpoint when you have raw time-series current logging data from a battery system and need to compute integrated charge/energy using a numerically robust method that handles real-world data gaps. It is especially suited for solar off-grid setups using VE.Direct or similar loggers where sampling is regular but gaps occur. Prefer this over simpler Ah counters when you need gap reporting and internal resistance estimation in a single call.

## Known failure modes

- Insufficient or empty current sample array returns an error
- Timestamps out of order or non-monotonic may produce incorrect integration
- Gaps longer than max_gap_seconds are excluded and reported but not interpolated, reducing accuracy if gaps are frequent
- Internal resistance estimate is unreliable if no significant current step exists in the series
- Very coarse sampling intervals reduce trapezoidal integration accuracy
- Missing required fields (timestamps or current values) return a validation error

## How this service works

Integrates the supplied current over time by the trapezoidal rule, so the result is only as good as the sampling interval; gaps longer than the stated max_gap_seconds are excluded and reported. Sign convention: positive current is charging, negative is discharging. Internal resistance is estimated from the largest current step in the series and is a rough figure, not a measurement under defined conditions.

## Output

Returns the net integrated charge/energy (e.g. in Ah or Wh depending on inputs), a list of excluded time intervals where gaps exceeded max_gap_seconds, and a rough estimate of internal resistance derived from the largest current step observed in the series.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "samples": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "t_s",
     "voltage_v",
     "current_a"
    ],
    "properties": {
     "t_s": {
      "type": "number",
      "maximum": 100000000,
      "minimum": 0,
      "description": "Seconds since series start, strictly increasing."
     },
     "current_a": {
      "type": "number",
      "maximum": 2000,
      "minimum": -2000,
      "description": "Positive charging, negative discharging."
     },
     "voltage_v": {
      "type": "number",
      "maximum": 1000,
      "minimum": 0,
      "description": "Pack voltage."
     },
     "temperature_c": {
      "type": "number",
      "maximum": 120,
      "minimum": -60
     }
    },
    "additionalProperties": false
   },
   "maxItems": 5000,
   "minItems": 3
  },
  "rest_current_a": {
   "type": "number",
   "default": 0.5,
   "maximum": 100,
   "minimum": 0,
   "description": "Below this absolute current a sample counts as resting."
  },
  "cells_in_series": {
   "type": "integer",
   "default": 4,
   "maximum": 64,
   "minimum": 1
  },
  "max_gap_seconds": {
   "type": "number",
   "default": 300,
   "maximum": 86400,
   "minimum": 1
  },
  "nominal_capacity_ah": {
   "type": "number",
   "maximum": 10000,
   "minimum": 0.1
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/halowerk-solar-battery-cycle-analyzer-759bb858/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from solar.halowerk.com](https://www.zero.xyz/host/solar.halowerk.com/llms.txt)
