SMA Solar WebConnect


The sma sensor will poll a SMA (US) solar inverter and present the values as sensors (or attributes of sensors) in Home Assistant.

This sensor uses the web interface and in order to use it you have to be able to connect to the solar inverter from your favorite web browser.

Configuration

To enable this sensor, add the following lines to your configuration.yaml file:

# Example configuration.yaml entry
sensor:
  - platform: sma
    host: IP_ADDRESS_OF_DEVICE
    password: YOUR_SMA_PASSWORD
    sensors:
      current_consumption: [total_consumption]
      current_power:
      total_yield:

Configuration Variables

host

(string)(Required)The IP address of the SMA WebConnect module.

ssl

(boolean)(Optional)Enables HTTPS if set to true, otherwise with false the platform run with HTTP.

Default value: false

verify_ssl

(boolean)(Optional)Whether Home Assistant should verify the SSL certificate from the inverter. Self-signed certificates may require false for this sensor to operate properly.

Default value: true

password

(string)(Required)The password of the SMA WebConnect module.

group

(string)(Optional)The user group, which can be either user or installer.

Default value: user

sensors

(map)(Required)A dictionary of sensors that will be added. The value of the dictionary can include a list of sensor names that will be used as attributes.

current_power

Current power (W).

current_consumption

Power that you are currently drawing, depending on your installation it can be a combination of the inverter and the grid (W).

total_yield

Total power yield from solar installation (kWh).

total_consumption

Total power consumption (kWh).

grid_voltage

The grid voltage (V)

pv_power

PV Power (W)

daily_yield

daily_yield (Wh)

power_supplied

Power supplied (W)

power_absorbed

Power absorbed (W)

status

Status of the solar plant.

your-custom-sensor

Any sensor name defined in the custom: section

custom

(map)(Optional)A dictionary of custom sensor key values and units.

key

(string)(Required)The SMA sensor key.

unit

(string)(Required)Unit.

factor

(float)(Optional)Factor.

Default value: 1

You can create composite sensors, where the sub-sensors will be attributes of the main sensor. E.g.,

    sensors:
      - current_power: [total_power, total_consumption]

The SMA WebConnect module supports a wide variety of sensors, and not all these have been mapped to standard sensors. Custom sensors can be defined by using the custom section of the configuration. You will need: A sensor name (no spaces), the SMA sensor key and the unit

Example:

   custom:
      yesterday_consumption:
         key: 6400_00543A01
         unit: kWh
         factor: 1000

Over time more sensors will be added as standard sensors to the pysma library. Feel free to submit additional sensors on that repository.