npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@yyberi/fronius-comm

v0.0.1

Published

Library for communicating with Fronius solar inverters

Readme

@yyberi/fronius-comm

A small Node.js library for communicating with Fronius solar inverters. It provides a simple client to fetch real-time and historical energy production data.

Features

  • Real-time data: fetch total, yearly, daily energy and instantaneous power
  • Archive data parsing: retrieve 5-minute, 15-minute and hourly aggregated production values for any date or date range
  • Built on native http and moment-timezone for UTC date handling
  • Pluggable logging via @yyberi/logger

Installation

npm install @yyberi/fronius-comm
# or
yarn add @yyberi/fronius-comm

Quick Start

import { FroniusClient, SimpleInverterRealtimeData } from '@yyberi/fronius-comm';

// Instantiate with inverter IP, scope, device ID and device class:
const client = new FroniusClient(
  '192.168.1.100',   // your inverter IP
  'Device',          // scope (e.g. "Device" or "System")
  '1',               // deviceId
  'Inverter'         // deviceClass
);

async function fetchRealtime() {
  try {
    const data: SimpleInverterRealtimeData = await client.getRealtimeData();
    console.log('Total Energy (kWh):', data.totalEnergy);
    console.log('Year Energy  (kWh):', data.yearEnergy);
    console.log('Day Energy   (kWh):', data.dayEnergy);
    console.log('Current Power (W):', data.actPower);
  } catch (err) {
    console.error('Error fetching real-time data:', err);
  }
}

fetchRealtime();

API

new FroniusClient(ip, scope, deviceId, deviceClass, logLevel?)

Creates a new client instance.

  • ip: string — Inverter hostname or IP address
  • scope: string — API scope (usually "Device" or "System")
  • deviceId: string — Numeric device identifier (e.g. "1")
  • deviceClass: string — Class of the device (e.g. "Inverter")
  • logLevel?: LogLevel — Optional log level from @yyberi/logger (default: LogLevel.INFO)

getRealtimeData(): Promise<SimpleInverterRealtimeData>

Fetches real-time inverter data. Returns a promise resolving to:

export interface SimpleInverterRealtimeData {
  /** Cumulative energy (kWh) */
  totalEnergy?: number;
  /** Energy produced this year (kWh) */
  yearEnergy?: number;
  /** Energy produced today (kWh) */
  dayEnergy?: number;
  /** Instantaneous AC power (W) */
  actPower?: number;
  /** ISO timestamp of the reading */
  ts?: string;
}

Throws on HTTP errors, timeouts or invalid JSON.


Archive data parsers

All archive methods accept either:

  • A single date string (YYYY-MM-DD) to fetch one full day, or
  • Two ISO date strings (start, end) to fetch an arbitrary range

They all return arrays of:

export interface TimeRangeValueData {
  /** ISO string of interval end time */
  time: string;
  /** Energy produced during the interval */
  value: number;
}

parseEnergyReal_WAC_Sum_Produced_5min(dateOrStart, end?)

Fetches raw 5-minute interval data.

const data5min = await client.parseEnergyReal_WAC_Sum_Produced_5min('2025-06-14');
// or
const data5min = await client.parseEnergyReal_WAC_Sum_Produced_5min('2025-06-13', '2025-06-14');

parseEnergyReal_WAC_Sum_Produced_15min(dateOrStart, end?)

Fetches and groups every three 5-min intervals into 15-min sums.

const { data5min, data15min } =
  await client.parseEnergyReal_WAC_Sum_Produced_15min('2025-06-14');

parseEnergyReal_WAC_Sum_Produced_All(dateOrStart, end?)

Fetches 5-min and 15-min data, and additionally aggregates into hourly sums.

const { data5min, data15min, data60min } =
  await client.parseEnergyReal_WAC_Sum_Produced_All('2025-06-14');

Scripts

  • npm run build — compile TypeScript to dist/
  • npm test — run Vitest unit tests

Dependencies

License

MIT © yyberi