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

homekit-battery-integration

v1.2.0

Published

A HomeKit integration for home batteries.

Readme

homekit-battery-integration

FOSSA Status

A HomeKit integration for home batteries.

Sadly, Apple does not provide fitting Services and Characteristics for home batteries and energy management systems yet. However, integrating these systems with HomeKit does make a lot of sense, especially for usage in Automations. Thus, I decided to write an integration.

Getting Started

Development

  • git clone https://github.com/theMomax/homekit-battery-integration.git
  • cd homekit-battery-integration
  • npm install
  • npm run build
  • DEBUG="*" npm run start

See Integrations for information on how to configure each integration.

Install Release

  • npm i -g homekit-battery-integration
  • DEBUG="*,-*:debug" homekit-battery-integration

Again, see Integrations for information on how to configure each integration.

App

I've started working on an iOS app (Home Batteries) that offers an overview for this project's custom services. It also provides an UI for creating automations. Check out the link for more details. The Eve App also supports all of the custom Services/Characteristics defined below.

Integrations

OpenEMS is the only integration to date. I do not have access to any other system currently, however, I would be happy to accept PRs with other integrations!

OpenEMS

A list of supported hardware can he found here.

Setup

Run npm run start -- -oa <OpenEMS-IP>. The program will automatically scan the configuration of your OpenEMS installation and create the according Accessories. Note that each edge is hosted as a separate Bridge. You can configure the OpenEMS password as well as the HomeKit pincode and port. Run npm run start -- --help for more information on that.

Supported Components

  • _sum component: System State, Total Battery Level, Total Production, Consumption, Charge/Discharge, Grid Sell/Buy, Excess := Sell+Charge
  • all ess components: All installed batteries along with their current Charge/Discharge and State
  • all meter components: All installed electricity meters along with their current active power and their State
  • _meta component: OpenEMS Version from the is exposed in the Bridge's AccessoryInformation

Custom HomeKit Services & Characteristics

Services

ControllerService

Property | Value :-------------------------:|:-------------------------: UUID | 00000001-0000-1000-8000-0036AC324978 Required Characteristics | StatusFault Optional Characteristics | Name

ElectricityMeterService

Property | Value :-------------------------:|:-------------------------: UUID | 00000002-0000-1000-8000-0036AC324978 Required Characteristics | CurrentPower Optional Characteristics | CurrentPowerL1CurrentPowerL2CurrentPowerL3NameElectricityMeterType

EnergyStorageService

Property | Value :-------------------------:|:-------------------------: UUID | 00000003-0000-1000-8000-0036AC324978 Required Characteristics | BatteryLevelChargingStateStatusLowBattery Optional Characteristics | EnergyCapacityName

Characteristics

CurrentPower

Property | Value :-------------------------:|:-------------------------: UUID | 00000001-0001-1000-8000-0036AC324978 Permissions | Paired Read, Notify Format | float Unit | watt

CurrentPowerL1

Property | Value :-------------------------:|:-------------------------: UUID | 00000002-0001-1000-8000-0036AC324978 Permissions | Paired Read, Notify Format | float Unit | watt

CurrentPowerL2

Property | Value :-------------------------:|:-------------------------: UUID | 00000003-0001-1000-8000-0036AC324978 Permissions | Paired Read, Notify Format | float Unit | watt

CurrentPowerL3

Property | Value :-------------------------:|:-------------------------: UUID | 00000004-0001-1000-8000-0036AC324978 Permissions | Paired Read, Notify Format | float Unit | watt

EnergyCapacity

Property | Value :-------------------------:|:-------------------------: UUID | 00000005-0001-1000-8000-0036AC324978 Permissions | Paired Read, Notify Format | float Minimum Value | 0 Unit | kilowatthours

ElectricityMeterType

This characteristic helps the frontend to provide a more suitable visualization for the meter. Implementations should conform to the following rules:

  1. A meter without this type characteristic is assumed to be of type OTHER
  2. The meaning of a positive/negative CurrentPower depends on the type:
    • PRODUCTION, CONSUMPTION, OTHER: a positive value has a good connotation for the user
    • STORAGE, GRID: a negative value has a bad connotation for the user E.g.: A negative current power at the mains connection means the user is currently selling energy and thus earning money, which is considered positive.

Property | Value :-------------------------:|:-------------------------: UUID | 00000006-0001-1000-8000-0036AC324978 Permissions | Paired Read Format | uint8 Minimum Value | 0 Maximum Value | 5 Valid Values | 0 "other" 1 "production" 2 "consumption" 3 "storage" 4 "grid" 5 "excess"

License

FOSSA Status