From f985d738e8ef6a2881daa25dd6bb819e173316f8 Mon Sep 17 00:00:00 2001 From: fredericvl <34839323+fredericvl@users.noreply.github.com> Date: Wed, 23 Oct 2019 22:47:45 +0200 Subject: [PATCH] Add support for SAJ inverters connected via WiFi (#10819) * Add support for SAJ inverters connected via WiFi * Changes after review saj --- source/_integrations/saj.markdown | 51 +++++++++++++++++++++++-------- 1 file changed, 39 insertions(+), 12 deletions(-) diff --git a/source/_integrations/saj.markdown b/source/_integrations/saj.markdown index 20c397fca27..c33aaae515d 100644 --- a/source/_integrations/saj.markdown +++ b/source/_integrations/saj.markdown @@ -12,6 +12,9 @@ The `saj` sensor will poll a [SAJ](https://www.saj-electric.com/) solar inverter This sensor uses the web interface and to use it, you have to be able to connect to the solar inverter from your favorite web browser. +There is a difference between inverters that are connected via an ethernet module and those connected via a WiFi module. +The WiFi module requires a username and password for authentication where the ethernet module does not. + ## Configuration To enable this sensor, add the following lines to your `configuration.yaml` file: @@ -25,23 +28,47 @@ sensor: {% configuration %} host: - description: The IP address of the SAJ Solar Inverter. + description: "The IP address of the SAJ Solar Inverter." required: true type: string +type: + description: "Type of connection module: 'ethernet' or 'wifi'" + required: false + default: ethernet + type: string +username: + description: "Username for logging in to SAJ Solar Inverter (only used when type is 'wifi' but can be skipped if the inverter still has the default credentials set: admin/admin)" + required: false + type: string +password: + description: "Password for logging in to SAJ Solar Inverter (only used when type is 'wifi' but can be skipped if the inverter still has the default credentials set: admin/admin)" + required: false + type: string {% endconfiguration %} ## Sensors Sensors available in the library: -| name | Unit | Description | -|--------------------|------|:-------------------------------------------| -| current_power | W | Current power generated by the inverter. | -| today_yield | kWh | Power yield for today. | -| today_time | h | Inverter's running time for today. | -| today_max_current | W | Maximum current power for today. | -| total_yield | kWh | Total kWh generated to date. | -| total_time | h | Total running time of the inverter . | -| total_co2_reduced | kg | Total CO2 in kg reduced. | -| temperature | °C | Temperature of the inverter. | -| state | N/A | Live state of the inverter. | +| name | Unit | Description | +|--------------------|------|:-----------------------------------------------------------------------------| +| current_power | W | Current power generated by the inverter. | +| today_yield | kWh | Power yield for today. | +| today_time | h | Inverter's running time for today. | +| today_max_current | W | Maximum current power for today. (only for connection via ethernet module) | +| total_yield | kWh | Total kWh generated to date. | +| total_time | h | Total running time of the inverter . | +| total_co2_reduced | kg | Total CO2 in kg reduced. | +| temperature | °C | Temperature of the inverter. | +| state | N/A | Live state of the inverter. | + +## Full configuration example for WiFi inverters + +```yaml +sensor: + - platform: saj + host: IP_ADDRESS_OF_DEVICE + type: wifi + username: USERNAME + password: PASSWORD +```