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/aidon-comm

v0.0.7

Published

Library for communicating with Aidon smart meters

Downloads

57

Readme

AidonComm

TypeScript library for reading Aidon 7534 smart meter data from the HAN (Home Area Network) interface over a serial connection. The library handles serial input buffering, CRC-16 validation and frame parsing, then emits structured readings through Node.js events.

For protocol details, see the official manual: AIDON HAN Interface (PDF)

Features

  • Connects to an Aidon meter via serial port
  • Supports Aidon 7534 frames with /ADN9 7534 header
  • Optional simulation mode for development through SIMULATE=true
  • Validates received frames with CRC-16
  • Reinitializes the serial port when the watchdog detects missing data
  • Emits data events with parsed meter readings
  • Emits error events for serial, timeout, CRC and parse failures

Installation

npm install @yyberi/aidon-comm

Usage

import { AidonComm, type Aidon7534Data } from '@yyberi/aidon-comm';

const comm = new AidonComm();

comm.on('data', (reading: Aidon7534Data) => {
  console.log('Meter reading:', reading);
});

comm.on('error', (err: Error) => {
  console.error('Communication error:', err.message);
});

// Close the serial port when your application shuts down.
comm.close();

Configuration

The library reads configuration from environment variables.

| Variable | Description | Default | | ------------------------ | ------------------------------------------------------ | -------------- | | NODE_ENV | Runtime environment name used in logging | development | | SIMULATE | Enable simulation mode when set to true | false | | SERIAL_DEVICE | Serial port device path | /dev/serial0 | | SERIAL_BAUD_RATE | Serial port communication speed | 115200 | | SIMULATION_INTERVAL_MS | Interval between simulated frames in milliseconds | 10000 | | WATCHDOG_TIMEOUT_MS | Timeout for missing data recovery in milliseconds | 11000 |

Emitted Data

The data event emits an Aidon7534Data object:

export type Aidon7534Data = {
  meterDateTime: string;
  cumulativeActiveEnergyIn: number;
  cumulativeActiveEnergyOut: number;
  cumulativeReactiveEnergyIn: number;
  cumulativeReactiveEnergyOut: number;
  activePowerIn: number;
  activePowerOut: number;
  reactivePowerIn: number;
  reactivePowerOut: number;
  l1activePowerIn: number;
  l1activePowerOut: number;
  l2activePowerIn: number;
  l2activePowerOut: number;
  l3activePowerIn: number;
  l3activePowerOut: number;
  l1reactivePowerIn: number;
  l1reactivePowerOut: number;
  l2reactivePowerIn: number;
  l2reactivePowerOut: number;
  l3reactivePowerIn: number;
  l3reactivePowerOut: number;
  l1RmsVoltage: number;
  l2RmsVoltage: number;
  l3RmsVoltage: number;
  l1RmsCurrent: number;
  l2RmsCurrent: number;
  l3RmsCurrent: number;
};

Example Data Frame

Raw Aidon 7534 frames follow this structure:

/ADN9 7534

0-0:1.0.0(221219170900W)        Meter date and time
1-0:1.8.0(00005996.149*kWh)     Cumulative active import energy
1-0:2.8.0(00003209.076*kWh)     Cumulative active export energy
1-0:3.8.0(00000028.442*kVArh)   Cumulative reactive import energy
1-0:4.8.0(00000963.522*kVArh)   Cumulative reactive export energy
1-0:1.7.0(0002.227*kW)          Active import power
1-0:2.7.0(0000.000*kW)          Active export power
1-0:3.7.0(0000.000*kVAr)        Reactive import power
1-0:4.7.0(0000.776*kVAr)        Reactive export power
1-0:21.7.0(0001.620*kW)         L1 active import power
1-0:22.7.0(0000.000*kW)         L1 active export power
1-0:41.7.0(0000.122*kW)         L2 active import power
1-0:42.7.0(0000.000*kW)         L2 active export power
1-0:61.7.0(0000.478*kW)         L3 active import power
1-0:62.7.0(0000.000*kW)         L3 active export power
1-0:23.7.0(0000.000*kVAr)       L1 reactive import power
1-0:24.7.0(0000.340*kVAr)       L1 reactive export power
1-0:43.7.0(0000.000*kVAr)       L2 reactive import power
1-0:44.7.0(0000.086*kVAr)       L2 reactive export power
1-0:63.7.0(0000.000*kVAr)       L3 reactive import power
1-0:64.7.0(0000.332*kVAr)       L3 reactive export power
1-0:32.7.0(236.3*V)             L1 RMS voltage
1-0:52.7.0(237.0*V)             L2 RMS voltage
1-0:72.7.0(236.5*V)             L3 RMS voltage
1-0:31.7.0(007.0*A)             L1 RMS current
1-0:51.7.0(000.6*A)             L2 RMS current
1-0:71.7.0(002.3*A)             L3 RMS current
!8365                           CRC checksum

Development

npm run build

License

This project is licensed under the MIT License.