Git Product home page Git Product logo

ha-ferroamp's Introduction

hacs_badge Join the chat at https://gitter.im/ha-ferroamp/community

Home assistant sensors for Ferroamp EnergyHub

Ferroamp MQTT support sends updates to these topics:

  • extapi/data/ehub (interval 1s)
  • extapi/data/eso (interval 5s)
  • extapi/data/sso (interval 5s)
  • extapi/data/esm (interval 60s)

Prerequisites

  • Home assistant 2021.12
  • Enable Ferroamp MQTT by contacting Ferroamp Support to get the username and password for your Energy MQTT broker.
  • Enable MQTT in Home assistant and set the broker to your Ferroamp Energy IP and configure it with your username and password received from Ferroamp (or setup a bridge-connection if you already have an MQTT-server, see the Configuring Bridges-section in the Mosquitto documentation).

Install using HACS (recommended)

The repository is compatible with HACS (Home Assistant Community Store).

Install HACS and add the repository to the Custom repositories under HACS Settings tab.

Git installation

  1. Make sure you have git installed on your machine.
  2. Navigate to you home assistant configuration folder.
  3. Execute the following command: git clone https://github.com/henricm/ha-ferroamp.git
  4. Create a custom_components folder if it does not exist, and cd into it.
  5. Create a symbolic link by executing ln -s ../ha-ferroamp/custom_components/ferroamp

Setup

  1. Add the Ferroamp MQTT Sensors-integration (you might have to refresh your browser window since Home Assistant doesn't update the integration list after a reboot)
  2. Set a name for the integration as well as the MQTT-prefix where updates are sent (default values are probably fine for a standard-setup but if a bridge-connection is used the MQTT-topics can be re-mapped)
  3. Wait for all the devices to become present (EnergyHub, SSO's, ESOs and ESMs depending on your setup. Be patient since ESMs are only updated every 60 seconds.)

This integration will add lots of sensors for the installed hardware with the prefix <integration name>_. For the SSO and ESO sensors, they will include the id of the SSO or ESO unit, eg sensor.ferroamp_sso_123456_pv_string_power.

I'm also still figuring out what some of the sensors actually are, since the Ferroamp API documentaiton still seems to be incomplete in some areas.

Upgrading from a version before config flow was implemented

  1. Remove the integration configuration. i.e this
    sensor:
      - platform: ferroamp
  2. Restart Home Assistant
  3. Remove all Ferroamp entities (they will be re-created once the new setup is completed)
  4. Follow the regular Setup

NB: Three sensors have changed name due to typos being fixed. Those three will lose their history and any usage in lovelace/automations need to be manually updated.

Renamed sensors:

Old name New name
sensor.ferroamp_consumtion_power sensor.ferroamp_consumption_power
sensor.ferroamp_consumtion_power_reactive sensor.ferroamp_consumption_power_reactive
sensor.ferroamp_interter_power_reactive sensor.ferroamp_inverter_power_reactive

Update interval

To avoid too much data into home assistant, we only update sensors with new values every 30 second (average values are calculated where appropriate). This interval can be configured in the options of the integration.

Battery control

This integration adds services for charging, discharging and autocharge. Please see Ferroamp API documentation for more info about this functionality:

If more than one EnergyHub is configured, the target parameter needs to be set to the name of the EnergyHub to control.

ferroamp.charge

Parameter power needs to be specified in W.

power: 1000

ferroamp.discharge

Parameter power needs to be specified in W.

power: 1000

ferroamp.autocharge

No parameters - sets the battery back into autocharge.

Energy Dashboard

With the Home Assistant Core 2021.8 release an Energy Dashboard was introduced. To set it up correctly with your Ferroamp EnergyHub use the sensors as described below.

Electricity grid

Grid consumption

External Energy Consumed

Return to grid

External Energy Produced

Solar Panels

Solar production

Total Solar Energy or add one for each SSO and use SSO xxx Total Energy

Home Battery Storage

Energy going in to the battery

Battery Energy Produced

Energy coming out of the battery

Battery Energy Consumed

Utility meter

Inspired from this blog post, I discovered the utility meter sensor available in home assistant. I use it to track grid, solar and battery energy, hourly, daily, monthly by the configuration below in configuration.yml:

utility_meter:
  solar_energy_daily:
    source: sensor.ferroamp_total_solar_energy
    cycle: daily
  solar_energy_monthly:
    source: sensor.ferroamp_total_solar_energy
    cycle: monthly
  battery_energy_produced_daily:
    source: sensor.ferroamp_eso_20030049_total_energy_produced
    cycle: daily
  battery_energy_produced_monthly:
    source: sensor.ferroamp_eso_20030049_total_energy_produced
    cycle: monthly
  battery_energy_consumed_daily:
    source: sensor.ferroamp_eso_20030049_total_energy_consumed
    cycle: daily
  battery_energy_consumed_monthly:
    source: sensor.ferroamp_eso_20030049_total_energy_consumed
    cycle: monthly
  external_energy_consumed_daily:
    source: sensor.ferroamp_external_energy_consumed
    cycle: daily
  external_energy_consumed_monthly:
    source: sensor.ferroamp_external_energy_consumed
    cycle: monthly
  external_energy_produced_daily:
    source: sensor.ferroamp_external_energy_produced
    cycle: daily
  external_energy_produced_monthly:
    source: sensor.ferroamp_external_energy_produced
    cycle: monthly

ha-ferroamp's People

Contributors

argoyle avatar henricm avatar dependabot[bot] avatar turbojonte avatar gitter-badger 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.