Giter Site home page Giter Site logo

jnxxx / homeassistant-dabblerdk_powermeterreader Goto Github PK

View Code? Open in Web Editor NEW
20.0 8.0 1.0 506 KB

Home Assistant integration for reading Echelon/NES smart power meter, by utilizing the Dabbler.dk MEP module

Python 100.00%
home-assistant energy powermeter echelon nes dabbler-dk 83331-3i

homeassistant-dabblerdk_powermeterreader's Introduction

Dabbler.dk reader for Echelon/NES smart power meters

hacs_badge

This is a companion integration to the Dabbler.dk MEP module for reading out power consumption values from a Echelon/NES smart meter with a MEP port. At least from model 83331-3I, which among others is used quite a lot in Denmark.
Echelon Smart Meter

Hardware

Communication is done through a hardware module built by the two enthusiasts, Gert and Graves, at Dabbler.dk, which plugs into the MEP port of the meter.
The MEP protocol documentation is now released. How to build the hardware and the firmware for it is published in their Github repositories.
Read more about it at their blog.

Installation


Manual Installation

  1. Copy dabblerdk_powermeterreader folder into your custom_components folder in your hass configuration directory.
  2. Restart Home Assistant.

Installation with HACS (Home Assistant Community Store)

  1. Ensure that HACS is installed.
  2. In HACS / Integrations / Kebab menu / Custom repositories, add the url the this repository.
  3. Search for and install the Dabbler.dk reader for Echelon/NES smart power meter integration.
  4. Restart Home Assistant.

Configuration

It is configurable through config flow, meaning it will popup a dialog after adding the integration.

  1. Head to Configuration --> Integrations
  2. Add new and search for Dabbler.dk reader for Echelon/NES smart power meter
  3. Enter a name for your meter. It suggests "Echelon" by default, but if you plan to read multiple make it a unique name.
  4. Enter a url to the MEP module. For example: "http://" followed by its IP or name.

Options

By utilizing options flow it allows for updating the url to the MEP module and adjusting the scan interval / update frequency. Default scan interval is 300 seconds, 5 minutes. Adjustable from 5 seconds to an hour (maybe even lower when tested better).

State and attributes

For each MEP modules connected to, it presents two devices. One to represent the MEP module and one to represent the meter.

MEP module sensors

  • MEP Connection (true if latest request succeeded)
  • MEP Problem (true if the data returned is not as expected)

Meter sensors
Consumption (Forward):

  • Energy consumption [kWh] (same value as in the display)
  • Power [W] (total, all phases)
  • L1 power [W]
  • L2 power [W]
  • L3 power [W]

Returned to grid (Reverse):

  • Energy returned [kWh]
  • Power returned (all phases) [W]
  • L1 power returned [W]
  • L2 power returned [W]
  • L3 power returned [W]

Other:

  • L1 current [A]
  • L2 current [A]
  • L3 current [A]
  • L1 voltage [V]
  • L2 voltage [V]
  • L3 voltage [V]
  • Frequency [Hz]

Only energy consumption and total power are enabled by default, but you can enable and disable as you wish.

Debugging

It is possible to debug log the raw response from the web service. This is done by setting up logging like below in configuration.yaml in Home Assistant. It is also possible to set the log level through a service call in UI.

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

Screenshots

Configuration
Config

Integration
Config

Devices
Config

Config

Config

Readings
Config

Config

Energy dashboard
Config

Config

homeassistant-dabblerdk_powermeterreader's People

Contributors

conorsham avatar jnxxx 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

Forkers

nean-and-i

homeassistant-dabblerdk_powermeterreader's Issues

Echelon energy consumption not showing on HA energy dashboard

Hi there my issue is that "Echelon energy consumption" is showing just fine on a entities card but not an the HA Energy dashboard. I can find the entity in the dropdown under "Configure grid consumption" but no values are shown on the dashboard.

Echelon integration installed via hacs v1.0.4

Question

Have just installed/configured HW from dabbler, and integrated your stuff in HA.
I just have 1 question.
How to get your "Energy dashboard" in HA as shown in your Readme.

Where to get the hardware

This looks really promising for Echelon users, but -

Where to buy the MEB hardware?
You are referring to dabbler.dk site, but I can't seem to find any way to buy the hardware

Requesting meter values failed

Denne fejl kommer konstant i Home assistant, og sensoren opdatere ikke som forventet. Den er konstant med få opdateringer til værdien en gang i mellem. Jeg har genstartet HA flere gange, deraf at den "kun" er vist en gang :-)

Det virker til at MEP modulet har god forbindelse på 2.4 GHz båndet.. Ihvertfald det er hvad min unifi dream router fortæller mig :-)

Kan jeg frembringe andre logs på companion integrationen, som kan bringe mig tættere på noget brugbart?

`This error originated from a custom integration.

Logger: custom_components.dabblerdk_powermeterreader.meter.meter
Source: custom_components/dabblerdk_powermeterreader/meter/meter.py:49
Integration: Dabbler.dk reader for Echelon/NES smart power meter (documentation, issues)
First occurred: 17:53:25 (1 occurrences)
Last logged: 17:53:25

Requesting meter values failed: Cannot connect to host 192.168.1.82:80 ssl:default [Connect call failed ('192.168.1.82', 80)]`

Integration is using deprecated `DEVICE_CLASS_*` constants

This custom integration uses deprecated DEVICE_CLASS_* constants in its codebase.

The DEVICE_CLASS_* constants have been deprecated and replaced in Home Assistant Core 2021.12 (over a year ago). I would highly suggest updating/migrating this integration to the new enums.

For example, for the device classes supported by the sensor platform, there is now a SensorDeviceClass enum. So if a sensor previously used the DEVICE_CLASS_ENERGY constant, it should now use SensorDeviceClass.ENERGY. Other platforms (like binary_sensor, and number) provide similar enumerations for their supported device classes.

The migration thus only consists of replacing constants with an enumeration member and is, therefore, very low impact and should be fairly straightforward.

If I can help resolve any questions regarding this change or migration, feel free to ask or respond to this issue. I'm happy to help!

Kindest regards,

../Frenck

Unkown state for sensor

I have the MEP board running since early afternoon and the integration in HA a bit later.

The MEB dashboard is updating nicely on the ESP
image

but the [sensor.echelon_energy_consumption] stopped updating after a couple of hours (the rest of the sensors was still updating)

I.e Power
image

I restarted HA and then it is updating again.

image

Fwd_Act_Wh changed too much

Hvis jeg starter opladningen af min el bil samtidig med at opvaskemaskinen kører stopper integrationen.

Bilen tager i gennemsnit 4-5 timer at oplade, opvaskeren kører omkring 1.5time. - starter begge omkring kl. 00:30

L1 current stiger fra ca. 1A til ca. 26A indenfor 20min

Integrationen stopper med at give målinger, også selv om begge dele forlængst er stoppet.
Som jeg læser dit indlæg hos dabbler, burde den ignorere den høje måling i en time inden den acceptere den, det virker som det ikke sker.

Modul firmware: [NES MEP, version: Dec 23 2022 11:07:41]

Hvis integrationen genindlæses, virker det igen indtil næste gang bilen skal lades.

Fra HA log:

Logger: custom_components.dabblerdk_powermeterreader.meter.meter
Source: custom_components/dabblerdk_powermeterreader/meter/meter.py:49
Integration: Dabbler.dk reader for Echelon/NES smart power meter (documentation, issues)
First occurred: 00.37.21 (97 occurrences)
Last logged: 08.37.21

Fwd_Act_Wh changed too much (23441), sticking to previous values
Fwd_Act_Wh changed too much (23453), sticking to previous values
Fwd_Act_Wh changed too much (23466), sticking to previous values
Fwd_Act_Wh changed too much (23478), sticking to previous values
Fwd_Act_Wh changed too much (23485), sticking to previous values

1.0.2

Hi Jan
I updated to the new version and get error.
Can you please help with some advise for me.
BR Jan O Petersen

Skærmbillede 2023-01-18 kl  23 40 04

Electrical constant names used in intergration are deprecated as of HA Core 2025.1

Suddenly 2025 is all over us and we cannot have this fine integration stop working.

Logger: homeassistant.const
Kilde: helpers/deprecation.py:205
Første forekomst: 10.54.51 (4 forekomster)
Senest logget: 10.54.51

ELECTRIC_POTENTIAL_VOLT was used from dabblerdk_powermeterreader, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfElectricPotential.VOLT instead, please create a bug report at https://github.com/jnxxx/homeassistant-dabblerdk_powermeterreader/issues
ELECTRIC_CURRENT_AMPERE was used from dabblerdk_powermeterreader, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfElectricCurrent.AMPERE instead, please create a bug report at https://github.com/jnxxx/homeassistant-dabblerdk_powermeterreader/issues
POWER_WATT was used from dabblerdk_powermeterreader, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfPower.WATT instead, please create a bug report at https://github.com/jnxxx/homeassistant-dabblerdk_powermeterreader/issues
FREQUENCY_HERTZ was used from dabblerdk_powermeterreader, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfFrequency.HERTZ instead, please create a bug report at https://github.com/jnxxx/homeassistant-dabblerdk_powermeterreader/issues

Echelon MEP Problem - Became unavailable on Power return

When sun is shining and solar panels are producing power and the amount of power consumed is lower than produced aka power returned to grid, then the MEP readings stop to work and the integration triggers a problem.

ha-mep01

The sensor values gets stuck at the previous reading until the integration is reloaded.
The only suspicious Warning I could find in the logs are lines starting like:

L1_Fwd_W + L2_Fwd_W + L3_Fwd_W does not equal Fwd_W (499 != 142), sticking to previous values
...
L1_Fwd_W + L2_Fwd_W + L3_Fwd_W does not equal Fwd_W (502 != 142), sticking to previous values

As a workaround I had to create an automation that triggers a reload of the integration whenever the problem binary sensor switched to active to get the problem cleared and at least a fresh reading.

alias: echelon reload
description: ""
trigger:
  - platform: state
    entity_id:
      - binary_sensor.echelon_mep_problem
    to: "on"
condition: []
action:
  - service: homeassistant.reload_config_entry
    data: {}
    target:
      device_id: <device = Echelon>
mode: single

Are there any data evaluation checks in place that probably do not consider this use case?
The Integration works great as long no power is returned to the grid.

ESP32-MEP Login

Anyone know what the default login name is on the web interface? I only remembered the password I typed in, and did not change the username

L1/L2/L3 current returned to grid

Spring is around the corner and then it will be time to look at the automation for charging the electrical cars when there is surplus energy.

The integration proveides the returned power but it would be easier to use the returned current if it can be read from the echelon. Otherwise i'll have to calculate it from power and voltage.

I plan on adjustning the dynamic_charge_limit on my easee home charger on a timer with the surplus current. Something along the line of

If (sensor.echelon_l1_current_returned >0){ currentP1 +=sensor.echelon_l1_current_returned;}
else if (sensor.echelon_l1_current>0) { currentP1 +=sensor.echelon_l1_current;}

or maybe also including the actual current state_inCurrentT so i just set the max to the current current plus the export (so i won't continue to inccrease the limit on phase if it is one of the others that are actually limiting it,

If the echelon does not provide the data i will have to make an automation that just look at the from grid without knowing how much is exported to the grid.

Or would it be better to wait for the upgraded MEP interface with MQTT ?

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.