Code Monkey home page Code Monkey logo

e3dc-homeassistant's People

Contributors

mriceman11 avatar pm84 avatar roemer avatar sv4en avatar

Stargazers

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

e3dc-homeassistant's Issues

SGReady status is missing

May you please add the SGReady Status?
It is behind the ID 40137
Lenght = 1
Datatype = UInt16

2 = Normal Operation
3 = Solar system is in the overproduction mode.

This is required to start actions based on that, like activate additional power consumers, like the dryer or just use it in combination with a heatpump, like opening all the valves in the house.

sensor.e3dc_battery_discharge_energy (unavailable)

Hi,

first of all, many thanks for making this! This is awesome.

Not sure if my issue is actually related to this project or if it's a Modbus issue.

When adding the battery information it says entity not available.
image

However, I do have historic data on this entity:
image

So I'm not sure if this is really an issue with the integration or if Modbus for some reason can't get any data from this register any longer. (Battery is currently being charged, not discharging, so I could also imagine it's a conversion issue).

Warning in the system log: battery_discharge_power has non-numeric value: (<class 'str'>);

Hello there,

I am pretty happy about your integration, thank you very much. One little issue though: I'm constantly getting this Warning for the battery_discharge_power sensor (only for that one as far as I see):

Logger: homeassistant.components.sensor
Source: components/sensor/init.py:597
Integration: Sensor (documentation, issues)
First occurred: 10:35:00 (2 occurrences)
Last logged: 10:43:15

Sensor sensor.e3dc_battery_discharge_power has device class power, state class None and unit W thus indicating it has a numeric value; however, it has the non-numeric value: (<class 'str'>); Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+template%22
Sensor sensor.e3dc_battery_charge_power has device class power, state class None and unit W thus indicating it has a numeric value; however, it has the non-numeric value: (<class 'str'>); Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+template%22

Interesting thing is, that the sensor does nevertheless send data:
image
Is this thus a warning to be ignored?
Sorry I wrote that in the issues, I don't know where else to put it best.

Best regards
Micky

Better Package Import

Hallo
Thanks for your summary. I have also had my own take on it, based mostly on your one. Instead of creating a new one, I'll show you how I did it and what is different and maybe you want to use some of it.

Differences are:

  • Package loads as a real package instead of separate files
  • No need for the global customize
  • Left out some sensors (don't care about them)
  • Corrected all modbus types
  • Added a E3DC Emergency Power State Text template sensor
  • Use secret for the ip
  1. Create a packages\e3dc folder and in there two files modbus.yaml and sensors.yaml
  2. I load the whole package with:
homeassistant:
  packages: !include_dir_merge_named packages/
  1. The content of the files is as follows:
    1. modbus.yaml
e3dc_modbus:
  modbus:
    - name: "e3dc"
      type: tcp
      host: !secret e3dc_ip
      port: 502
      retry_on_empty: true
      sensors:
        # Identification Block
        - name: E3DC Modbus Firmware
          unique_id: e3dc_modbus_firmware
          address: 40001
          data_type: uint16
          scan_interval: 86400
        - name: E3DC Manufacturer
          unique_id: e3dc_manufacturer
          address: 40003
          data_type: string
          count: 16
          scan_interval: 86400
        - name: E3DC Model
          unique_id: e3dc_model
          address: 40019
          data_type: string
          count: 16
          scan_interval: 86400
        - name: E3DC Serial Number
          unique_id: e3dc_serial_number
          address: 40035
          data_type: string
          count: 16
          scan_interval: 86400
        - name: E3DC Firmware Release
          unique_id: e3dc_firmware_release
          address: 40051
          data_type: string
          count: 16
          scan_interval: 86400
        # Power Data
        - name: E3DC Solar Power
          unique_id: e3dc_solar_power
          unit_of_measurement: W
          device_class: power
          data_type: int32
          address: 40067
          scan_interval: 2
          swap: word
        - name: E3DC Battery Power
          unique_id: e3dc_battery_power
          unit_of_measurement: W
          device_class: power
          data_type: int32
          address: 40069
          scan_interval: 2
          swap: word
        - name: E3DC Power Consumption House
          unique_id: e3dc_house_consumption_power
          unit_of_measurement: W
          device_class: power
          data_type: int32
          address: 40071
          scan_interval: 2
          swap: word
        - name: E3DC Grid Power
          unique_id: e3dc_grid_power
          unit_of_measurement: W
          device_class: power
          data_type: int32
          address: 40073
          scan_interval: 2
          swap: word
        - name: E3DC Autarky and Consumption
          unique_id: e3dc_autarky_and_consumption
          data_type: int16
          address: 40081
          scan_interval: 60
        - name: E3DC Battery State of Charge
          unique_id: e3dc_battery_state_of_charge
          unit_of_measurement: "%"
          device_class: battery
          data_type: int16
          address: 40082
          scan_interval: 30
        - name: E3DC Emergency Power State
          unique_id: e3dc_emergency_power_state
          data_type: int16
          address: 40083
          scan_interval: 10

3. `sensors.yaml`
e3dc_sensors:
  sensor:
    # Templates
    - platform: template
      sensors:
        e3dc_grid_export_power:
          unique_id: e3dc_grid_export_power
          friendly_name: "E3DC Grid Export Power"
          unit_of_measurement: "W"
          device_class: power
          value_template: >
            {% set power = states('sensor.e3dc_grid_power') | int(0) %}
            {% if power > 0 %}
              0
            {% else -%}
              {{ power | abs }} 
            {% endif %}
        e3dc_grid_import_power:
          unique_id: e3dc_grid_import_power
          friendly_name: E3DC Grid Import Power
          unit_of_measurement: W
          device_class: power
          value_template: >
            {% set power = states('sensor.e3dc_grid_power') | int(0) %}
            {% if power > 0 %}
              {{ power }}
            {% else -%}
              0
            {% endif %}
        e3dc_battery_charge_power:
          unique_id: e3dc_battery_charge_power
          friendly_name: E3DC Battery Charging Power
          unit_of_measurement: W
          device_class: power
          value_template: >
            {% set power = states('sensor.e3dc_battery_power') | int(0) %}
            {% if power | int >= 0 %}
              {{ power }}
            {% endif %}
        e3dc_battery_discharge_power:
          unique_id: e3dc_battery_discharge_power
          friendly_name: E3DC Battery Discharging Power
          unit_of_measurement: W
          device_class: power
          value_template: >
            {% set power = states('sensor.e3dc_battery_power') | int(0) %}
            {% if power <= 0 %}
              {{ power | abs }} 
            {% endif %}
        e3dc_autarky:
          friendly_name: "E3DC Autarky"
          unique_id: e3dc_autarky
          unit_of_measurement: "%"
          value_template: "{{ (states('sensor.e3dc_autarky_and_consumption')|int(0) / 256)|round(0,'floor') }}"
        e3dc_own_consumption:
          friendly_name: "E3DC Own Consumption Ratio"
          unique_id: e3dc_own_consumption_ratio
          unit_of_measurement: "%"
          value_template: "{{ ((states('sensor.e3dc_autarky_and_consumption')|int(0) / 256 - states('sensor.e3dc_autarky')|int(0)) * 256)|round(0,'floor') }}"
        e3dc_emergency_power_state_text:
          friendly_name: E3DC Emergency Power State Text
          unique_id: e3dc_emergency_power_state_text
          value_template: >
            {% set eps = states('sensor.e3dc_emergency_power_state') %}
            {% if eps == '0' %}
              nicht unterstützt
            {% elif eps == '1' %}
              aktiv
            {% elif eps == '2' %}
              inaktiv
            {% elif eps == '3' %}
              nicht verfügbar
            {% elif eps == '4' %}
              falsche Position
            {% else %}
              unbekannt
            {% endif %}

    # Integrations
    - platform: integration
      source: sensor.e3dc_grid_import_power
      name: E3DC Grid Import Energy
      unit_prefix: k
      round: 2
    - platform: integration
      source: sensor.e3dc_grid_export_power
      name: E3DC Grid Export Energy
      unit_prefix: k
      round: 2
    - platform: integration
      source: sensor.e3dc_solar_power
      name: E3DC Solar Energy
      unit_prefix: k
      round: 2
    - platform: integration
      source: sensor.e3dc_battery_power
      name: E3DC Builtin Battery Energy
      unit_prefix: k
      round: 2
    - platform: integration
      source: sensor.e3dc_battery_charge_power
      name: E3DC Battery Charge Energy
      unit_prefix: k
      round: 2
    - platform: integration
      source: sensor.e3dc_battery_discharge_power
      name: E3DC Battery Discharge Energy
      unit_prefix: k
      round: 2

Expected a dictionary for dictionary value 'packages->title', got 'e3dc-homeassistant/[...]'

I get this error when checking the configuration.yaml (sorry, I can't mark the text to copy it, therefore I uploaded a picture):
configurationyaml error

My approach:

  • created the folder packages/e3dc on my windows machine, downloaded sensors.yaml and modbus.yaml from this repository
  • copied the folder to home assistant including these files using WinSCP
  • added homeassistant: packages: !include_dir_merge_named packages/ into configuration.yaml

used "check configuration" in developer tools in Home Assistant

Thank you!

How to configure password?

Hi,
I've followed the configuration, but "connection refused" appears, because the password is missing.

How do I configure the password set in the E3DC (S 10 X) within the modbus.yaml? Or do I have to remove the password on the E3DC (set to empty) - wouldn't be my preference?

Thanks,
Nils

Filenames for sensor-files are not correct

Hi,
the configuration.yaml entries for the sensor-yaml files are:
sensors.yaml and binary_sensors.yaml

But the filenames in the package folder are currently:
sensor.yaml and binary_sensor.yaml

...i'd like to buy an "s" ;-)

where to find the e3dc's IP?

I managed to setup the scripts in home assistant and configure the energy tab. Thank you for this amazing integration.
However, I can't find the IP of the modbus TCP anywhere.
I looked up all connected devices in my router, yet I can't seem to find any ethernet device (it's connected and online though).
Am I stupid?
Assuming yes, I'm thankful for any hints.
Cheers!

Template loop detected

Thanks for the great work! Your configuration works great, but sometimes i get the following error in HA logs:

2023-12-28 08:19:05.687 WARNING (MainThread) [homeassistant.components.template.template_entity] Template loop detected while processing event: <Event state_changed[L]: entity_id=sensor.e3dc_battery_charge_power, old_state=<state sensor.e3dc_battery_charge_power=39.0; unit_of_measurement=W, device_class=power, friendly_name=E3DC Battery Charging Power @ 2023-12-28T08:19:05.598125+01:00>, new_state=<state sensor.e3dc_battery_charge_power=36.0; unit_of_measurement=W, device_class=power, friendly_name=E3DC Battery Charging Power @ 2023-12-28T08:19:05.608402+01:00>>, skipping template render for Template[{% set power = states('sensor.e3dc_battery_power') | float(0) %} {% if power >= 0 %}
{{ power }}
{% else %}
{% set charge_power = states('sensor.e3dc_battery_charge_power') | float(0) + power %}
{{ charge_power if charge_power > 0 else 0 }}
{% endif %}]

Any idea?

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.