Coder Social home page Coder Social logo

home-assistant-fusionsolar-openapi's Introduction

Home Assistant FusionSolar OpenAPI Integration

hacs_badge

Integrate FusionSolar into you Home Assistant.

FusionSolar allows you to query your plants through an OpenAPI.

Installation

At this point the integration is not part of the default HACS repositories, so you will need to add this repository as a custom repository in HACS.

When this is done, just install the repository.

Requirements

Create an OpenAPI account.

  1. Contact service team at [email protected] to create an openAPI account for your plant.
  2. Get credentials
  3. Find your PlantID (aka station code)
    Follow the documentation and especially the Step 5: Interface of Plant List image Copy the stationCode.

Configuration

configuration.yaml

Add the code below:

sensor:
  - platform: fusion_solar_openapi
    credentials:
      username: !secret fusion_solar_username
      password: !secret fusion_solar_password
    plants:
      - id: "REPLACE THIS WITH YOUR STATION CODE"
        name: "A readable name for the plant"

Use secrets

I strongly advise to store your crendials as a secret.

More information on secrets: Storing secrets.

Multiple plants

You can configure multiple plants:

sensor:
  - platform: fusion_solar_openapi
    credentials:
      username: !secret fusion_solar_username
      password: !secret fusion_solar_password
    plants:
      - id: "REPLACE THIS WITH YOUR STATION CODE XXXXX"
        name: "A readable name for plant XXXXX"
      - id: "REPLACE THIS WITH YOUR STATION CODE YYYYY"
        name: "A readable name for plant YYYYY"

Credits

This integration is based on the awsome work of @tijsverkoyen on https://github.com/tijsverkoyen/Home-Assistant-FusionSolar-Kiosk/

home-assistant-fusionsolar-openapi's People

Contributors

olibos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

home-assistant-fusionsolar-openapi's Issues

Change request: More KPI to get

Hi,

Could you change to get more KPI?
Currently I miss active_power.

This is an output from current openapi.
'dataItemMap': {'pv2_u': 0.0, 'pv4_u': 0.0, 'pv22_i': 0.0, 'power_factor': 1.0, 'pv6_u': 0.0, 'mppt_total_cap': 0.0, 'pv24_i': 0.0, 'pv8_u': 0.0, 'open_time': 1665897972000, 'pv22_u': 0.0, 'a_i': 2.067, 'pv24_u': 0.0, 'mppt_9_cap': 0.0, 'c_i': 2.021, 'pv20_u': 0.0, 'pv19_u': 0.0, 'pv15_u': 0.0, 'a_u': 233.2, 'reactive_power': 0.002, 'pv17_u': 0.0, 'c_u': 232.7, 'mppt_8_cap': 0.0, 'pv20_i': 0.0, 'pv15_i': 0.0, 'pv17_i': 0.0, 'efficiency': 96.62, 'pv11_i': 0.0, 'pv13_i': 0.0, 'pv11_u': 0.0, 'pv13_u': 0.0, 'mppt_power': 1.482, 'run_state': 1, 'close_time': 1665851269000, 'pv19_i': 0.0, 'mppt_7_cap': 0.0, 'mppt_5_cap': 0.0, 'pv2_i': 0.0, 'active_power': 1.432, 'pv4_i': 0.0, 'pv6_i': 0.0, 'pv8_i': 0.0, 'mppt_6_cap': 0.0, 'pv1_u': 294.8, 'pv3_u': 0.0, 'pv23_i': 0.0, 'pv5_u': 0.0, 'pv7_u': 0.0, 'pv23_u': 0.0, 'pv9_u': 0.0, 'inverter_state': 512.0, 'total_cap': 6925.39, 'mppt_3_cap': 0.0, 'b_i': 1.997, 'pv21_u': 0.0, 'mppt_10_cap': 0.0, 'pv16_u': 0.0, 'pv18_u': 0.0, 'temperature': 27.1, 'bc_u': 414.1, 'b_u': 241.9, 'pv21_i': 0.0, 'elec_freq': 50.03, 'mppt_4_cap': 0.0, 'pv16_i': 0.0, 'pv18_i': 0.0, 'day_cap': 0.93, 'pv12_i': 0.0, 'pv14_i': 0.0, 'pv12_u': 0.0, 'mppt_1_cap': 0.0, 'pv14_u': 0.0, 'pv10_u': 0.0, 'pv1_i': 5.13, 'pv3_i': 0.0, 'mppt_2_cap': 0.0, 'pv5_i': 0.0, 'ab_u': 408.0, 'ca_u': 403.8, 'pv7_i': 0.0, 'pv10_i': 0.0, 'pv9_i': 0.0}

Sorry, I didnt find any docs about the params.
Thanks
Ferenc.

Force charge/discharge?

Do you have any plans to integrate the chargeAndDischarge call in this? I'd really like to be able to force the battery to charge from the grid at night, for example, but I don't know much about the interface and can't seem to get that specific function call to respond, as I keep getting an Error: Not Found for url: https://intl.fusionsolar.huawei.com/thirdData/chargeAndDischarge even though it's in the API description.

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.