Skip to content
This repository has been archived by the owner on Feb 1, 2020. It is now read-only.
/ sma-web-parser Public archive

Parses the current power output of your SMA inverter from its webinterface

License

Notifications You must be signed in to change notification settings

mo-krauti/sma-web-parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sma-web-parser

Intention

This is a parser which parses the power value of your sma inverter web interface. You may ask, why parse the value from the web interface when there is a modbus interface. Sadly my sma inverter came with modbus disabled. To enable it, you would need the installers password, which I was not given. So no modbus for me :( Also some old sma inverters came without modbus support at all.

Installation

git clone https://github.com/mo-pyy/sma-web-parser.git
cd sma-web-parser
python setup.py install

Usage

Create a client using:

from sma import parser

p = parser('SMA_IP', 'SMA_USER_PASSWORD')

You can get the current power value like this:

current_val = p.value

Because the actual value is changing very fast, a moving average is being calculated. By default the actual value is being requested every 20 seconds and the moving average is 300 seconds long. This means that the actual value is being averaged with the last 14 values. You can change this values by parsing them to the constructor:

from sma import parser

p = parser('SMA_IP', 'SMA_USER_PASSWORD', requests_delay = 20, moving_average_size = 300)

You can also enable logging. By default a log file called 'log.csv' is created in the current directory.

from sma import parser

p = parser('SMA_IP', 'SMA_USER_PASSWORD', log=True, data_dir = '')

About

Parses the current power output of your SMA inverter from its webinterface

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages