Giter Club home page Giter Club logo

sunportal's Introduction

Build Status

sunportal

sunportal is a web based visualisation tool to display data of SMA solar inverters. It is based on the database of SBFspot and shows charts daily and monthly power production. It runs on a Raspberry Pi and can handle multiple inverters in one Speedwire or Bluetooth(R) network.

Inverters that do not support Speedwire or Bluetooth or that are not from the manufacturer SMA can be integrated through s0-bridge. s0-bridge also enables power consumption to be recorded by using electric meters with S0 interface.

Current features:

  • Web based visualization of daily and monthly power production
  • Displaying multiple inverters
  • Translations: English, German
  • Mail notification service for inverter disorders and lack of production

Planned features:

  • Visualization of yearly power production
  • Visualization of power consumption
  • Validation of config.yml with JSON Schema
  • Configuration of sunportal via web interface
  • REST-API, i.e. to integrate solar power plants into home automation applications

If you like my project and want to keep me motivated:

Buy Me a Coffee at ko-fi.com

sunportal example image

Installation on a Raspberry Pi

First install and configure SBFspot as described here, the SBFspotUploadDaemon is not required.

Also add a cronjob for SBFspot to run every 5 minutes. Execute sudo crontab -e, choose your preferred editor and add the following line:

*/5 * * * * /usr/local/bin/sbfspot.3/SBFspot -finq -nocsv > /dev/null

After that install sunportal:

# install needed dependencies
sudo apt-get install git python3 python3-pip 


# clone this repo
git clone https://github.com/philipptrenz/sunportal
cd sunportal

#install _sunportal
sudo pip3 install -r requirements.txt

Configure sunportal

All configuration parameters of sunportal get stored inside the config.yml YAML file. To edit the preconfigured values copy the config.default.yml and edit the config.yml:

cp config.default.yml config.yml
nano config.yml

Under mail you can enable the integrated mail notification service by adding an SMTP server.

---
database:
  path: "/home/pi/smadata/SBFspot.db"
co2_avoidance_factor: 0.7
mail:
  enabled: 'false'
  check_interval: 300
  sender: [email protected]
  smtp_server:
    url: smtp.example.com
    port: 587
  recipients:
  - [email protected]
  starttls:
    enabled: 'false'
    user: ''
    password: ''
renaming:
  '10000000001': My Inverter 1

Start sunportal

sudo python3 sunportal.py

Open a browser and navigate to the IP address of the Raspberry Pi to see the website.

Run sunportal on boot

# add the bash script to the service folder
sudo cp scripts/sunportal.sh /etc/init.d/sunportal
sudo chmod 755 /etc/init.d/sunportal
sudo update-rc.d sunportal defaults

Now sunportal can be controlled as a service (sudo service sunportal status) and it automatically starts on boot.

Disclaimer

SMA, Speedwire are registered trademarks of SMA Solar Technology AG.

sunportal's People

Contributors

bakoe avatar johnmales avatar kioui avatar philipptrenz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sunportal's Issues

Add mysql backend support

Would it be possible to also add mysql support ?
I have SBFspot running with mysql instead of SQLite
I just came across this project and it looks great but it doesn't support the mysql engine :(

Or is there another way to achieve this ?

Previous days and monthly data

Hi,
I was searching for such an offline visualization tool. This seems as a good start. Thank you
I have installed it on cubietruck running armbian (debian).
Two questions:

  1. Is it supposed to present daily plots for previous days or just the day total? On my installation, only the day total is presented but no plot for previous days.
  2. Are you planning to provide monthly plots?
    Thank you

suggestion make background image optional

Hi there,

sorry this is more a suggestion than an issue. Can you make the background optional through the config file?

In my tests a light gray background was a good replacement.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.