From 140a21683353d2ebb5880d4818436e873de6d70d Mon Sep 17 00:00:00 2001 From: Johann Kellerman Date: Wed, 28 Dec 2016 22:31:16 +0200 Subject: [PATCH 1/3] [sensor/sma] New SMA Solar Webconnect censor --- source/_components/sensor.sma.markdown | 55 ++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 source/_components/sensor.sma.markdown diff --git a/source/_components/sensor.sma.markdown b/source/_components/sensor.sma.markdown new file mode 100644 index 00000000000..02d6a2745bd --- /dev/null +++ b/source/_components/sensor.sma.markdown @@ -0,0 +1,55 @@ +--- +layout: page +title: "SMA Solar WebConnect" +description: "Instructions on how to connect your SMA Inverter to Home Assistant." +date: 2015-12-28 21:45 +sidebar: true +comments: false +sharing: true +footer: true +ha_category: +logo: sma.png +ha_iot_class: "Cloud Polling" +ha_release: 0.36 +--- + + +The `sma` sensor will poll a SMA solar inverter and present the values as sensors (or attributes of sensors) in Home Assistant. + +To enable this sensor, add the following lines to your `configuration.yaml` file: + +```yaml +# Example configuration.yaml entry +sensor: + - platform: sma + ip: + password: !secret sma_password + sensors: + - CURRENT_POWER: + - CURRENT_CONSUMPTION: [TOTAL_CONSUMPTION] + keys: + - +``` + +Configuration variables: + +- **ip** (*Required*): The IP address of the SMA WebConnect module. +- **password** (*Required*): The password of the SMA WebConnect module. +- **group** (*Optional*): The user group, which can be either `user` (the default) or `installer`. +- **sensors** (*Required*): A list of sensors that will be added. +- **keys** (*Optional*): A dictionary of `SENSOR_NAME: SENSOR_KEY` values (e.g. `YESTERDAY_CONSUMPTION_KWH: "6400_00543A01"`). These sesnors will be added to the standard ones in the [pysma library](https://github.com/kellerza/pysma/blob/master/pysma/__init__.py#L18) + +Sensor configuration: + +The sensors can be any one of the following: +- current_power +- current_consumption +- total_power +- total_consumption + +You can also create composite sensors, where the sub-sensors will be attributes of the main sensor, e.g. + +```yaml + sensors: + - current_power: [total_power, total_consumption] +``` From 52c72bdd950d761f9151438ca26601a4848234f2 Mon Sep 17 00:00:00 2001 From: Johann Kellerman Date: Sat, 31 Dec 2016 10:09:47 +0200 Subject: [PATCH 2/3] Add sma logo --- source/images/supported_brands/sma.png | Bin 0 -> 3543 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 source/images/supported_brands/sma.png diff --git a/source/images/supported_brands/sma.png b/source/images/supported_brands/sma.png new file mode 100644 index 0000000000000000000000000000000000000000..ddc2c4e6e84c1928e576f73d07bc461ae2a7a7b5 GIT binary patch literal 3543 zcmai%S2!Dt+s31+Hh;BRBhk`fv{nfflvg#ay^GdfEk)Ictu1PlH0`UgLXFy$nz4zM z+G^E~7>yMPF@oUlJNXX3?{{6#b6?ke@H_|i(H(DW_=uBDhz$S$a6X3Wn4T;Be15So zp6}zVu&r~U8ta=sJUcsMcoMk;5I#2mS|Ks0+9iO%UvXuCMlf-cvUqMnBLKSLfPX@d ziK_tBKr)#O00*qDu8!l0f&Kyb`T2ync=v=7Lw)_{w$ErZ+UUsWFC0!+N9Wz!x6-#I z73JhL)FA2Q?aOyn76IJZSy?5;#i?JB4fPE-u3ZNxzOl8oIhtGOnIJ@jg%1r5s=xe~ zpPQ$=ZTNKmK>B$iNLa+()lDxTlh!xXKehBMDp$ZPrlzJwRSB%_jofQ&-O0-TQqo2W zirk9%xTZ^Evr}-l-zWFy$Utk{)*bIssl)P(MHBSLj$J)0FLa( zI$GwiOcLrv=ycQNScbH*&Oi=VFvA5-Tjj6+fkw%=5WXACd^tPwOwLC%X^m8;VAsAA z|8erNo*-Qv_^1=2bQ$sa|6{u4a$*RC{^ZgFZ_W@&3kz*@UNmeUYd)R_(kk(Vd43+L zHP|y`{eX$>txcQ1L!hWT&p^pY58C&JSGo944m9aEGY?wDv6N;w&)>Ap_Cn3iqlvNb z$V{k_gutnDaPw1`=aEUT@F!zhCv)$%juXK?F(|#@;fZ0+T0_g?ZBL^S_Df$qTG@bh zX6E7dGuLUzP|7sr@851sgVi2_knXGdSeu{~A3l{Pg`~o@u3d++hJqOF!2+}S?n_q( z*3#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z*%W@r_SEM}s7?0>HO%`J4w{4hby6UC!umh?dEh|w# zJ=4Oko-Np=67Gf&8*3j#h7Ih*I7MF+*(rW{MYN7gt#2OM@y6UjcS!|(b~tQtKD>@; zTB)S>SA>;5yDfJAnjiGyx)35bjMQJB>p2+26Zi4EN+oO}Z-)tj&kSOQP~taA9xhZ3 zh8mWmsLT9TA_r0RS#Mfxu2rV9(c&mdDUZi;l=_{Qfb;kTHtvvTEe?M;nwi|9z_A;`_7yrr+0{uW6)fB@Z1@Awzh} zzHFlPJt$Bt6^|QcUH1D*Oe_PzG*F4ckqru5^81b8${nmA<9Y#ZQrX?D95C6 z47kl!6vH-Ps>XQ3NbXI`oL14Vgb#rXMqAFli>7-=-_k2y&K^EFIf2GDeLZ1UTen;d zg)V+&W)|&rT=A{P4>>jls&QnQ7Y6PD4>=S&URu0vRP-2W$JkdNQrY*L+Filgu0Up6 z!`C;Avr Date: Sat, 31 Dec 2016 10:18:21 +0200 Subject: [PATCH 3/3] Update sensor.sma.markdown --- source/_components/sensor.sma.markdown | 35 +++++++++++++++++--------- 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/source/_components/sensor.sma.markdown b/source/_components/sensor.sma.markdown index 02d6a2745bd..9f2abe053db 100644 --- a/source/_components/sensor.sma.markdown +++ b/source/_components/sensor.sma.markdown @@ -1,7 +1,7 @@ --- layout: page title: "SMA Solar WebConnect" -description: "Instructions on how to connect your SMA Inverter to Home Assistant." +description: "Instructions on how to connect your SMA Solar Inverter to Home Assistant." date: 2015-12-28 21:45 sidebar: true comments: false @@ -9,7 +9,7 @@ sharing: true footer: true ha_category: logo: sma.png -ha_iot_class: "Cloud Polling" +ha_iot_class: "Local Polling" ha_release: 0.36 --- @@ -20,24 +20,23 @@ To enable this sensor, add the following lines to your `configuration.yaml` file ```yaml # Example configuration.yaml entry -sensor: +sensor sma: - platform: sma - ip: + host: 192.168.88.199 password: !secret sma_password sensors: - - CURRENT_POWER: - - CURRENT_CONSUMPTION: [TOTAL_CONSUMPTION] - keys: - - + current_consumption: [total_consumption] + current_power: + total_yield: ``` Configuration variables: -- **ip** (*Required*): The IP address of the SMA WebConnect module. +- **host** (*Required*): The IP address of the SMA WebConnect module. - **password** (*Required*): The password of the SMA WebConnect module. - **group** (*Optional*): The user group, which can be either `user` (the default) or `installer`. -- **sensors** (*Required*): A list of sensors that will be added. -- **keys** (*Optional*): A dictionary of `SENSOR_NAME: SENSOR_KEY` values (e.g. `YESTERDAY_CONSUMPTION_KWH: "6400_00543A01"`). These sesnors will be added to the standard ones in the [pysma library](https://github.com/kellerza/pysma/blob/master/pysma/__init__.py#L18) +- **sensors** (*Required*): A dictionary of sensors that will be added. The value of the dictionary can include sensor names that will be shown as attributes. +- **custom** (*Optional*): A dictionary of custom sensor key values and units Sensor configuration: @@ -47,9 +46,21 @@ The sensors can be any one of the following: - total_power - total_consumption -You can also create composite sensors, where the sub-sensors will be attributes of the main sensor, e.g. +You can create composite sensors, where the sub-sensors will be attributes of the main sensor, e.g. ```yaml 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: +```yaml + custom: + yesterday_consumption: + key: 6400_00543A01 + unit: W +``` + +Over time more sensors will be added as standard sensors to the [pysma library](https://github.com/kellerza/pysma/blob/master/pysma/__init__.py#L18). Feel free to submit additional sensors on that repository.