Integration for Home Assistant that retrieves PV data from GoodWe SEMS API.
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.
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.
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.
It is possible to temporarily pause the energy production via "downtime" functionality available on the invertor. This is exposed as a switch and can be used in your own automations.
Please note that it is using an undocumented API and can take a few minutes for the invertor to pick up the change. It takes approx 60 seconds to start again when the invertor is in a downtime mode.
In case you are only reading the inverter stats, you can use a Visitor (read-only) account.
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.
Replace $NAME with your inverter entity id.
template:
  - sensor:
      - name: "PV Temperature"
        unit_of_measurement: "°C"
        state: >
          {{ state_attr('sensor.inverter_$NAME', 'tempperature') }}
      - name: "PV Energy Day"
        unit_of_measurement: "kWh"
        state: >
          {{ state_attr('sensor.inverter_$NAME', 'eday') }}
      - name: "PV Energy Total"
        unit_of_measurement: "kWh"
        state: >
          {{ state_attr('sensor.inverter_$NAME', 'etotal') }}
      - name: "PV Income Day"
        unit_of_measurement: "€"
        state: >
          {{ state_attr('sensor.inverter_$NAME', 'iday') }}
      - name: "PV Income Total"
        unit_of_measurement: "€"
        state: >
          {{ state_attr('sensor.inverter_$NAME', 'itotal') }}
      - name: "PV Excess"
        unit_of_measurement: "W"
        state: >
          {{ state_attr('sensor.inverter_$NAME', 'pmeter') }}
      - name: "PV Battery Power"
        unit_of_measurement: "%"
        state: >
          {{ state_attr('sensor.inverter_$NAME', 'soc') }}
      - name: "PV Import Day"
        unit_of_measurement: "kWh"
        state: >
          {{ state_attr('sensor.inverter_$NAME', 'buy') }}Note that states.sensor.inverter_$NAME.state contains the power output in W.
Add the last line in configuration.yaml in the relevant part of logger:
logger:
  default: info
  logs:
    custom_components.sems: debug- 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. 
- Setup HA development environment using https://developers.home-assistant.io/docs/development_environment
 - clone this repo in config directory:
cd core/configgit clone [email protected]:TimSoethout/goodwe-sems-home-assistant.git
 - go to terminal in remote VSCode environment
 cd core/config/custom_componentsln -s ../goodwe-sems-home-assistant/custom_components/sems sems
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.