File: README.md

package info (click to toggle)
pysma 1.1.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 10,064 kB
  • sloc: python: 8,325; makefile: 15
file content (57 lines) | stat: -rw-r--r-- 2,000 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# pysma library

[![Workflow Status](https://github.com/kellerza/pysma/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/kellerza/pysma/actions)
[![Codecov](https://codecov.io/gh/kellerza/pysma/branch/master/graph/badge.svg)](https://codecov.io/gh/kellerza/pysma)
[![Documentation Status](https://readthedocs.org/projects/pysma/badge/?version=latest)](https://pysma.readthedocs.io/en/latest/?badge=latest)

SMA Webconnect library for Python 3. The library was created
to integrate SMA inverters with HomeAssistant

See <http://www.sma-solar.com> for more information on the SMA solar
inverters

Other SMA interfaces include [SBFspot](https://github.com/SBFspot/SBFspot/) and a
Python [adaptation](https://github.com/TD22057/T-Home/)

## Example usage

See [example.py](./example.py) for a basic usage and tests

# Home Assistant

The Home Assistant sma sensor documentation can be found
[here](https://www.home-assistant.io/components/sma)

> ---
>
> **This library uses Webconnect.** ~Modbus~ is not supported
>
> **If you can access your SMA via your browser, this might work for you.**
>
> ---

If you access your SMA WebConnect via `https://` you should set both
`ssl: true` and `verify_ssl: false`.

Daily usage is not always available from the SMA WebConnect interface.
It is possible to get around this by using a
[utility meter](https://www.home-assistant.io/components/utility_meter)
or more recently from the Energy management feature in Home Assistant

### How to debug this addon

1. Ensure you can access your SMA from your browser

To enable detailed logging in Home Assistant, you can add the following to your configuration

```yaml
logger:
  default: info
  logs:
    homeassistant.components.sma: debug
    pysma: debug
```

## Energy Meter

This library can read the second version of the emnergy meter, there is a separate Home Assistant OS Addon that could also read older Energy Meters directly. See [Energy Meter](https://github.com/kellerza/hassio-sma-em)