{"uid":"cap_6LGczNPow9yjZtwsLB1aK","slug":"halowerk-solar-battery-cycle-analyzer-759bb858","name":"Halowerk Solar Battery Cycle Analyzer","description":"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.","url":"https://solar.halowerk.com/battery-cycle","method":"POST","headers":{},"bodySchema":{"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}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.004","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.004/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.004","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.004","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_kaNIFG2vnLqQKqGPXw8th","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.004","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"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.","exampleAgentPrompt":"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?","exampleUseCases":[{"title":"Solar session charge accounting","prompt":"I logged current readings every 5 seconds during today's solar charging session — positive amps when the panels were pushing power in. Can you integrate that data with the trapezoidal rule, skip any gaps longer than 60 seconds, and tell me the total energy delivered and any data gaps that were excluded?"},{"title":"Battery discharge energy audit","prompt":"I have a CSV of timestamped current samples from a battery discharge test — current is negative when discharging. Please integrate it to find the total energy drawn out, using trapezoidal integration, and exclude any gaps over 10 seconds from the calculation."},{"title":"Internal resistance rough estimate","prompt":"I captured a current time-series from my LiFePO4 battery during a charge cycle that had some large current steps. Can you run the trapezoidal integration on it and also give me a rough estimate of the internal resistance based on the biggest current step you find?"}],"resultDescription":"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.","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-13T12:31:14.581Z","isFirstParty":false}