GithubHelp home page GithubHelp logo

dev-null-undefined / goodwe-sems-home-assistant Goto Github PK

View Code? Open in Web Editor NEW

This project forked from timsoethout/goodwe-sems-home-assistant

0.0 1.0 0.0 218 KB

Sensor for Home Assistant pulling data from the GoodWe SEMS API for solar panel production metrics.

Python 100.00%

goodwe-sems-home-assistant's Introduction

GoodWe SEMS API integration for Home Assistant

Paypal-shield Buy Me A Coffee

Integration for Home Assistant that retrieves PV data from GoodWe SEMS API.

Setup

Easiest install method via HACS

hacs_badge

The repository folder structure is compatible with HACS and is included by default in HACS.

Install HACS via: https://hacs.xyz/docs/installation/manual. Then search for "SEMS" in the Integrations tab (under Community). Click HACS > Integrations > Explore and Download Repositories > search for SEMS > click the result > Download.

Manual Setup

Crude sensor for Home Assistant that scrapes from GoodWe SEMS portal. Copy all the files in custom_components/sems/ to custom_components/sems/ your Home Assistant config dir.

Configure integration

The required ID of your Power Station can be retrieved by logging in to the SEMS Portal with your credentials: https://www.semsportal.com

After login you'll see the ID in your URL, e.g.: https://semsportal.com/PowerStation/PowerStatusSnMin/12345678-1234-1234-1234-123456789012

In this example the ID of the Power Station is: 12345678-1234-1234-1234-123456789012

In the home assistant GUI, go to Configuration > Integrations and click the Add Integration button. Search for GoodWe SEMS API.

Fill in the required configuration and it should find your inverters.

Note that changed to configuration.yaml are no longer necessary and can be removed.

Recommended: use visitor account to login with this integration

Create via the official app, or via the web portal: Login to www.semsportal.com, go to https://semsportal.com/powerstation/stationInfonew. Create a new visitor account. Login to the visitor account once to accept the EULA. Now you should be able to use it in this component.

Extra (optional) templates to easy access data as sensors

Replace $NAME with your inverter entity id.

  - platform: template
    sensors:
      pv_temperature:
        value_template: '{{ states.sensor.inverter_$NAME.attributes.tempperature }}'
        unit_of_measurement: 'C'
        friendly_name: "PV Temperature"
      pv_eday:
        value_template: '{{ states.sensor.inverter_$NAME.attributes.eday }}'
        unit_of_measurement: 'kWh'
        friendly_name: "PV energy day"
      pv_etotal:
        value_template: '{{ states.sensor.inverter_$NAME.attributes.etotal }}'
        unit_of_measurement: 'kWh'
        friendly_name: "PV energy total"
      pv_iday:
        value_template: '{{ states.sensor.inverter_$NAME.attributes.iday }}'
        unit_of_measurement: ''
        friendly_name: "PV income day"
      pv_itotal:
        value_template: '{{ states.sensor.inverter_$NAME.attributes.itotal }}'
        unit_of_measurement: ''
        friendly_name: "PV income total"
      pv_excess:
        value_template: '{{ states.sensor.inverter_$NAME.attributes.pmeter }}'
        unit_of_measurement: 'W'
        friendly_name: "PV spare"
      # battery soc
      pv_soc:
        value_template: '{{ states.sensor.inverter_$NAME.attributes.soc }}'
        unit_of_measurement: '%'
        friendly_name: "Battery power"

Note that states.sensor.inverter_$NAME.state contains the power output in W.

Screenies

Detail window

Add as Integration

Integration configuration flow

Debug info

Add the last line in configuration.yaml in the relevant part of logger:

logger:
  default: info
  logs:
    custom_components.sems: debug

Notes

  • Sometimes the SEMS API is a bit slow, so time-out messages may occur in the log as [ERROR]. The component should continue to work normally and try fetch again the next minute.

Development setup

Credits

Inspired by https://github.com/Sprk-nl/goodwe_sems_portal_scraper and https://github.com/bouwew/sems2mqtt . Also supported by generous contributions by various helpful community members.

goodwe-sems-home-assistant's People

Contributors

ads5555 avatar darek-margas avatar denifia avatar dev-null-undefined avatar jacmatias avatar michaelthomasmpt avatar philipbrennan avatar sjoerd-creator avatar spockz avatar timsoethout avatar tuxick avatar vpotusflotus avatar

Watchers

 avatar

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.