2.3.1 • Published 24 days ago

homebridge-solaxcloud-api v2.3.1

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
24 days ago

Solax Cloud Plugin for Homebridge

npm npm verified-by-homebridge

The Solax Cloud Plugin for Homebridge was created as a platform plugin to gather data exposed by Solax inverters to the cloud through the Solax Cloud API. Please note that QCells inverters all also supported cloud requests sharea a similar approach.

Now with support for multiple inverters! Sensors will be created for each of the inverters present in the configuration. Additionally, a virtual inverter named "All inverters" will be created whenever a multiple inverters configuration is present. This inverter will present summarized power and consumption figures derived from data for all the physical inverters.

As HomeKit is still clueless about what a solar panel is, this plugin exposes a set of standard HomeKit accessories though Homebridge for each configured inverter that will allow interacting and automating your smart home based on the data made available from the Solax platform:

  • PV (PV outlet with power consumption)
  • AC (Inverter AC outlet with power and total energy consumptions)
  • To Grid (Inverter to Grid outlet with power consumption)
  • To House (Inverter to House outlet with power consumption)
  • From Grid (Grid to House outlet with power consumption)
  • Update (Motion sensor)

Battery information is also provided as Homekit accessories in case there are any batteries installed for any of the configured inverters:

  • To Battery (Outlet with inverter power charging the battery)
  • From Battery (Outlet with power drawn from the battery to the inverter)
  • Battery (Battery with State of Charge information such as level or charge state)

Required information

For this plugin to work, two critical pieces of information are required from Solax/QCells Cloud:

  • Token ID: Solax/Qcells users can get inverter information through the granted tokenID. You need to obtain your tokenID on the API page of Solax/Qcells cloud.
  • SN: Registration No (communication module SN) for each desired inverter.

Installation

This plugin is supported under Homebridge. It is highly recommended that you use Homebridge Config UI X to install and configure this plugin.

Manual Installation

Install this plugin using: sudo npm install -g homebridge-solaxcloud-api. Edit config.json manually to add your Solax inverters. See below for instructions on that.

Platform configuration

Minimal platform configuration is depicted by the example configuration file below:

{
  "platforms": [
    {
      "platform": "SolaxCloudAPI",
      "inverters": [
        {
          "brand": "solax",
          "tokenId": "20200722185111234567890",
          "name": "Solax",
          "sn": "ABCDEFGHIJ"
        }
      ],
    }
  ]
}

Configuration parameters are described on the table below:

ParameterTypeDescriptionDefaultMandatory?
platformstringPlatform name (must be SolaxCloudAPI)-Y
invertersarrayArray of configured inverters as objects with { brand: string, tokenId: string, name: string, sn: string, hasBattery: boolean }, where brand is "solax" or "qcells", tokenID is the access token retrieved from the API page of Solax/QCells Cloud, name is the inverter name, used as prefix for accessory naming, sn is the inverter registration no. (inverter module SN) and hasBattery indicates on whether this inverter is connected to a battery.-Y
pollingFrequencynumberPlugin data polling frequency from Solax Cloud (in seconds)300N
smoothingMetersbooleanWhether to create additional meters by smoothing raw values from Solax CloudtrueN
smoothingMethodstringStatistical method to use for smoothing raw values from Solax Cloud (simple or exponential moving average - "sma" or "ema")"sma"N
pureHomeAppbooleanWhether to create meters as standard accessories that can be used on the Home App (power will show as ambient light sensors)falseN

NOTE: The pollingFrequency parameter defaults to 300 seconds, since Solax/QCells inverters update cloud data every 5 minutes.

Configuration through the the use of Homebridge UI plugin is also available and recommended:

Non-standard characteristics

Non-standard accessory characteristics are available through the use of Eve for HomeKit app you may download from the App Store.

This will allow some non-standard characteristics to be visible along with its historical data (like power or total energy consumption), as depicted in the image below:

If you want to rely solely on the native Home App, please enable the pureHomeApp config setting. In this case, power consumption on each meter will be exposed as an Ambient Light Sensor, as shown below (minimum value for an Ambient Light Sensor is 0.1 lux):

Automation

Automation can be achieved with the help of the virtual Update motion sensor that was specifically tailored for this effect and which is available for each inverter. This motion sensor will be triggered whenever inverter data gets updated from the Solax Cloud API (according to what is defined on the pollingFrequency configuration setting).

Motion is detected by the Update motion sensor whenever there is newly fetched inverter data from Solax Cloud. Using this sensor as a trigger combined with power and energy data from the virtual outlets enumerated above forms the basic building blocks for defining an automation.

Automation example

Since automations are probably going to be dependent on the non-standard Consumption characteristics from the virtual outlets, these must created by using the Eve App.

As an automation example, let's imagine we want to turn a pool heater pump on whenever the inverter AC power is greater than a specific figure (in Watt):

TO DO

Next planned plugin releases should include:

  • Inverter AC to include Total Yield Energy
  • Consumption history through the fakegato-history module
  • Enable support for "pure" Home App accessories (power meters will be exposed as Ambient Light sensors)
  • Add "smooth" accessories for power meters (compensating for sporadic scenarios like cloud a passing)
  • Support for multiple inverters
  • Support for multiple brands (between Solax and QCells)
  • Accessories for battery state and consumptions
2.3.1

24 days ago

2.3.0

2 months ago

2.3.0-beta.0

2 months ago

2.1.12

10 months ago

2.2.1-beta.0

9 months ago

2.1.11

1 year ago

2.1.9

1 year ago

2.1.10

1 year ago

2.1.8

2 years ago

2.1.7

2 years ago

2.1.2

2 years ago

2.1.6

2 years ago

2.1.5

2 years ago

2.1.4-beta.1

2 years ago

2.1.4-beta.0

2 years ago

2.1.2-beta.0

2 years ago

2.1.1-beta.0

2 years ago

2.0.3

2 years ago

2.0.2

2 years ago

2.0.2-beta.0

2 years ago

2.0.1-beta.0

2 years ago

1.5.1

2 years ago

1.5.0

2 years ago

1.4.6

2 years ago

1.4.5

2 years ago

1.4.4

2 years ago

1.4.3

2 years ago

1.4.2

2 years ago

1.4.1

2 years ago

1.4.1-beta.1

2 years ago

1.4.1-beta.0

2 years ago

1.3.1

2 years ago

1.3.0

2 years ago

1.2.1

2 years ago

1.2.0

2 years ago