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 🙏

© 2024 – Pkg Stats / Ryan Hefner

homebridge-solax

v1.3.4

Published

A Solax connector that (crudely) exposes readonly metrics as Light Sensors for power generation, import, export, individual string generation, and (experimental) battery metrics. Due to the constraints around HomeKit's support for power inverters, this se

Downloads

8

Readme

Homebridge-Solax Platform Plugin

Use this plugin to monitor your Solax Inverter. It can provide realtime metrics from your inverter along with configurable alerts for Automation purposes.

Note: HomeKit doesn't natively support a solar inverter or a watts based acccessory. To work around this limitation, a light sensor accessory is used the display the various metrics. Noting the minimum allowed value for a light sensor is 0.1.

Example Homekit Page

Requires the installation of the Solax Monitoring Dongle, and usage of a static IP address on your LAN. Refer to your Router configuration guide on how to do this.

Once you know the IP address of your Solax Inverter, navigate to http://{InverterIpAddress}/api/realTimeData.htm Here you should get a (malformed) JSON payload, but this will confirm it's possible to extract metrics from it.

Installation

Install Plugin

npm install homebridge-solax

Configure

    "platforms": [
      {
        "platform" : "SolaxHomebridgePlugin",
        "name" : "Solax Inverter",
        "address": "http://192.168.1.40",
        "pollingFrequencySeconds": 60,
        "movingAverageHistoryLength": 10,
        "exportAlertThresholds": [-5000, 0, 1000, 1500],
        "showStrings": true,
        "hasBattery": false,
        "valueStrategy": "SimpleMovingAverage"
      }
    ]

address: The base hostname of your inverter connection dongle

pollingFrequencySeconds: Optional: Specifies how often to poll the Solax Inverter, and issue updates to HomeKit. Defaults to 60 seconds.

movingAverageHistoryLength: Optional: Specifies the number of samples to keep when using Averaging over time based value strategies. Defaults to 10 entries. See valueStrategy field for details on how this is used.

exportAlertThresholds: Optional: Array of integers specifying the thresholds to create Alerts for. This will activate a motion trigger when the power export matches or exceeds the threshold value. Example: [-1000, 500, 2000] will create three motion sensors - "1000 watts imported", "500 watts exported" and "2000 watts exported".

showStrings: Optional: Defaults to true. Shows Individual Inverter String metrics (PV1, PV2).

hasBattery: Optional: Defaults to true. Experimental. Shows Battery information. Note, due to limited documentaiton from Solax, the Charging State is estimated based on the delta of Battery Watts.

valueStrategy: Optional: Defaults to SimpleMovingAverage. LatestReading = use the latest values at each polling period, SimpleMovingAverage for providing some smoothing of values, to handle scenarios like sporadic cloud/sun moments. Averages over the entire history. ExpoentialMovingAverage = Use standard Exponential Moving Average calculation to provide a smoothed last value. Refer to movingAverageHistoryLength for Moving Average based history tuning.

exposeRawMetrics: Optional: Defaults to true. 3 additional accessories will be exposed to provide the raw value feed (no averaging based filtering).

Leveraging in Automations via Motion Sensor Accessories

You can then create Automations in HomeKit as a result of the motion detection events (or them ceasing to happen). Example: If 2000 watts or more is being exported, and heatpump isn't already cranked, then bump the temperature up. I personally use Home+, as it allows for smarter controlling of devices. E.g. See below Solar Excess Automation Solar Insufficient Automation