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

homebridge-envoy-solar-sensor

v0.1.10

Published

Expose Enphase Envoy solar production as a HomeKit sensor for daylight-based automations

Readme

Homebridge Envoy Solar Sensor

npm version npm downloads license homebridge node

Homebridge Envoy Solar Sensor is a Homebridge platform plugin that reads real-time solar production data from an Enphase Envoy and exposes it to Apple HomeKit as sensors.

The plugin allows HomeKit automations to respond to actual solar production instead of fixed schedules, making it ideal for controlling outdoor lighting, garden lights, or detecting inverter failures.

Features

  • Solar production exposed as a Contact Sensor
  • Automatic day/night detection based on real PV output
  • Inverter failure detection exposed as a Leak Sensor
  • Local Envoy communication only, no cloud dependency
  • Supports self-signed HTTPS certificates
  • Optional authentication token support
  • Built-in debugging and diagnostic logging

How it works

The plugin periodically polls the local Enphase Envoy for current solar production measured in watts.

When production rises above the configured ON threshold, the Production Active sensor becomes active. When production falls below the configured OFF threshold, the sensor becomes inactive again.

Using two separate thresholds prevents rapid switching during clouds or twilight.

Inverter failure monitoring

The plugin can monitor the online status of all inverters connected to the Envoy.

If one or more inverters go offline, a HomeKit Leak Sensor called "Inverter Alert" is triggered. Leak Sensors generate high-priority notifications in the Apple Home app and are well suited for critical alerts.

The inverter check uses the following strategy:

  • Primary: api/v1/production/inverters
  • Fallback: production.json activeCount

The expected inverter count can be configured manually or automatically learned on first successful poll.

Supported Envoy endpoints

  • production.json (most Envoy systems)
  • api/v1/production (newer firmware)
  • api/v1/production/inverters (inverter monitoring)

Authentication token

Some Enphase Envoy installations require authentication to access local production data.

To obtain an access token, visit:

https://entrez.enphaseenergy.com/

Generate a bearer token and paste only the token value into the Homebridge UI. Do not include the word "Bearer".

The token is used only for local communication with the Envoy.

HTTPS and self-signed certificates

Most Envoy devices use a self-signed HTTPS certificate.

Enable "Allow Self-Signed HTTPS Certificate" in the Homebridge UI to prevent TLS errors.

Installation

npm install homebridge-envoy-solar-sensor

Restart Homebridge after installation.

Configuration using Homebridge UI

All configuration is done through the Homebridge web interface.

Key options:

  • Envoy Address: IP address or hostname of the Envoy
  • Protocol: HTTP or HTTPS (HTTPS recommended)
  • Polling Interval: How often data is refreshed
  • Production ON/OFF Thresholds: Control when production is considered active
  • Enable Inverter Failure Monitoring: Toggle the Leak Sensor
  • Expected Number of Inverters: Manual or automatic detection
  • Debug options for troubleshooting

No manual editing of config.json is required.

Debugging and diagnostics

  • Production Debug Logging: Logs solar production every poll
  • Inverter Debug Logging: Logs inverter data source and counts
  • Temporary Debug Burst: Logs the next N polls at INFO level and stops automatically

HomeKit sensors created

  • Production Active (Contact Sensor)
  • Inverter Alert (Leak Sensor, optional)

Enable notifications in the Apple Home app for the Inverter Alert sensor to receive immediate alerts when an inverter goes offline.

License

MIT