Giter Site home page Giter Site logo

homeassistant-kostalplenticore's People

Contributors

bagges avatar habitoti avatar ittv-tools avatar sdirkwinkel avatar stieler-it avatar wrt54g avatar zaubererty avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

homeassistant-kostalplenticore's Issues

RQST additional sensors

Hi.

Thank you for creating this integration. Makes my life a bit easier.
Would it be possible for you to add the following sensors?

  • Total AC Active Power in W [register 172]. As this (I assume) is the amount of power that is available for use/feed-in (after conversion DC to AC)
  • Yield in Wh (Total, Daily, Yearly, Monthly). [register 320, 322, 324 & 326]
  • Total consumption in Wh (Batt, Grid, PV, Total). [register 110, 112, 114 & 118]

Thanks,
Michiel

value = pv1 + pv2 TypeError: can only concatenate str (not "int") to str

My configuration stopped working I think a few days ago.

Config:

sensor:
  - platform: kostal_plenticore
    host: 192.168.178.53
    password: !secret kostal_password
    monitored_conditions:
      - HomeGridPower
      - HomeOwnPower
      - HomePVPower
      - GridPower
      - DCPower
      - PVPower
      - AutarkyDay
      - AutarkyMonth
      - AutarkyTotal
      - AutarkyYear
      - CO2SavingDay
      - CO2SavingMonth
      - CO2SavingTotal
      - CO2SavingYear
      - PV1Power
      - PV1Voltage
      - PV1Current
      - ACFrequency
      - ACL1Current
      - ACL1Power
      - ACL1Voltage
      - ACL2Current
      - ACL2Power
      - ACL2Voltage
      - ACL3Current
      - ACL3Power
      - ACL3Voltage
      - HomeConsumptionDay
      - HomeConsumptionMonth
      - HomeConsumptionTotal
      - HomeConsumptionYear
      - HomeConsumptionFromGridDay
      - HomeConsumptionFromGridMonth
      - HomeConsumptionFromGridTotal
      - HomeConsumptionFromGridYear
      - HomeConsumptionFromPVDay
      - HomeConsumptionFromPVMonth
      - HomeConsumptionFromPVTotal
      - HomeConsumptionFromPVYear
      - HomeConsumptionYieldDay
      - HomeConsumptionYieldMonth
      - HomeConsumptionYieldTotal
      - HomeConsumptionYieldYear
      - OwnConsumptionRateDay
      - OwnConsumptionRateMonth
      - OwnConsumptionRateTotal
      - OwnConsumptionRateYear

Error message:

2020-12-22 00:16:53 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up kostal_plenticore platform for sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 199, in _async_setup_platform
await asyncio.shield(task)
File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/kostal_plenticore/sensor.py", line 483, in setup_platform
plenticore(
File "/config/custom_components/kostal_plenticore/sensor.py", line 563, in __init__
value = self.getData()
File "/config/custom_components/kostal_plenticore/sensor.py", line 514, in getData
value = pv1 + pv2
TypeError: can only concatenate str (not "int") to str

This line looks a little suspicous to me. If only one of both values is in error state then it always looks like a concatenation of an int with a string. I don't understand what's going on there, though...

Error while setting up kostal_plenticore

Hi there,

would you be so kind an help me with this.

  • installed via HACS
  • setup yaml conf to:
- platform: kostal_plenticore
    host: 192.168.1.xxx
    password: xxxxxxxx
    monitored_conditions:
      - BatteryPercent
      - BatteryCycles
      - BatteryPower
      - HomeGridPower
      - HomeOwnPower
      - HomePVPower
      - HomeBatteryPower
      - GridPower
      - PVPower
      - AutarkyDay
      - AutarkyMonth
      - AutarkyTotal
      - AutarkyYear
      - CO2SavingDay
      - CO2SavingMonth
      - CO2SavingTotal
      - CO2SavingYear

and received following:

2020-03-22 11:59:58 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up kostal_plenticore platform for sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 179, in _async_setup_platform
    await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
  File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, in wait_for
    return fut.result()
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/kostal_plenticore/sensor.py", line 158, in setup_platform
    SENSOR_TYPES[sensor][4],
  File "/config/custom_components/kostal_plenticore/sensor.py", line 175, in __init__
    self._state = int(self.api.getProcessdata(self.moduleid, [self.id])[0]["value"])
IndexError: list index out of range
2020-03-22 12:00:09 WARNING (MainThread) [homeassistant.setup] Setup of default_config is taking over 10 seconds.

Any help appreciated.

br

Integration not working anymore after HA update to 2021.8.4

Hello,

I know that this integration is no longer maintained. Meanwhile Home Assistant has an own integration for Kostal Plenticore inverter. Check out https://www.home-assistant.io/integrations/kostal_plenticore/.

Nevertheless since I am assuming that the name of all related entities will change I am not ready to move the HA integration yet.

To get this integration working again with HA 2021.8.x version the following changes in the file const.py of the integration are required:

Change all occurences of ELECTRICAL_CURRENT_AMPERE to ELECTRIC_CURRENT_AMPERE
Change all occurences of VOLT to ELECTRIC_POTENTIAL_VOLT

Restart Home Assistant and it should work again

$ diff const.py /etc/homeassistant/custom_components/kostal_plenticore/const.py
9,10c9,10
<     ELECTRICAL_CURRENT_AMPERE,
<     VOLT,
---
>     ELECTRIC_CURRENT_AMPERE,
>     ELECTRIC_POTENTIAL_VOLT,
86c86
<         VOLT,
---
>         ELECTRIC_POTENTIAL_VOLT,
93c93
<         ELECTRICAL_CURRENT_AMPERE,
---
>         ELECTRIC_CURRENT_AMPERE,
317c317
<         ELECTRICAL_CURRENT_AMPERE,
---
>         ELECTRIC_CURRENT_AMPERE,
331c331
<         VOLT,
---
>         ELECTRIC_POTENTIAL_VOLT,
338c338
<         ELECTRICAL_CURRENT_AMPERE,
---
>         ELECTRIC_CURRENT_AMPERE,
352c352
<         VOLT,
---
>         ELECTRIC_POTENTIAL_VOLT,
359c359
<         ELECTRICAL_CURRENT_AMPERE,
---
>         ELECTRIC_CURRENT_AMPERE,
373c373
<         VOLT,
---
>         ELECTRIC_POTENTIAL_VOLT,
474c474
<         VOLT,
---
>         ELECTRIC_POTENTIAL_VOLT,
481c481
<         ELECTRICAL_CURRENT_AMPERE,
---
>         ELECTRIC_CURRENT_AMPERE,
498c498
<         VOLT,
---
>         ELECTRIC_POTENTIAL_VOLT,
505c505
<         ELECTRICAL_CURRENT_AMPERE,
---
>         ELECTRIC_CURRENT_AMPERE,

Best Regards

Matthias

PS: It seem that one is able to edit the const.py in this repository, but I am not an experienced enough user to create a new release (if this would be possible at all)

Problem when connected to 2 kostal Plenticore Inverters

Hi. I have a setup where i connect to two different Kostal Plenticore Inverters. As such - it works just fint. But it seems to mix up the data from the inverters upon restart of the Home Assistant Server. Some values then suddenly change places from one inverter to the other. For instance the value of "sensor.kostal_home_power_from_battery_2" and "sensor.kostal_home_power_from_battery" switch places. If what im writing makes no sense - please ask me for clarification.

platform error

This error message appears when I check the configuration:

Platform error sensor.kostal_plenticore - cannot import name 'PERCENTAGE' from 'homeassistant.const' (/usr/src/homeassistant/homeassistant/const.py)

I have looked for the specified const.py, but there is no such directory or file. What do I have to change?

FR: enable setting minimal SOC of battery

Let me first thank everyone involved for this wonderful plugin.

I'm using a Kostal Plenticore in combination with a BYD HVM battery. In addition I have two electric cars, that charge at night. As I have a electricity contract with high and low tariff times, I would like to spare some energy of the battery during the night to have enough left for the high tariff time in the morning (and avoid that the charging cars empty the battery).
Right now I achieve this by manually setting the minimal SOC to 30 % in the webif (in the evening) and setting it back to 5 % in the morning.

I know from the Plenticore implementation for fhem (https://wiki.fhem.de/wiki/Kostal_Plenticore_10_Plus) that this "Battery_MinSoc" could be set using the web "api".
As far as I understand is homeassistant-kostalplenticore using the same "api".

I would love to have this function in home assistant, too. Is there any way this could be added?

Sadly, I'm a total noob regarding coding. But I could be of some help for testing or providing access to my actual installation.

BR
Markus

Version info for upcoming HA 2020.6

HA is giving the following heads-up warning:

Source: loader.py:786 
First occurred: 13:43:31 (2 occurrences) 
Last logged: 13:43:43

No 'version' key in the manifest file for custom integration 'kostal_plenticore'. As of Home Assistant 2021.6, this integration will no longer be loaded. Please report this to the maintainer of 'kostal_plenticore'

I am sure this is known and addressed already, but just to be on the safe side... :-)

PV gross yield

Hi,
it seems that the daily PV yield is not the actual gross panel yield at any given point, but only minus what went into the battery so far. So it seems I have no figure to provide the daily yield after sunset, and if the battery lasts over midnight I can also not precisely read that figure for the day. I could do some approx. computation from SoC and known total capacity, but this would just be an estimation then. On the other hand, the standard Kostal app does show such a figure. Not sure whether they do such kind of a computation or whether there is a „gross yield“ figure available from the inverter, which you just don‘t expose?
Thanks, habitoti

Kostal Piko IQ error

Hello,

I'm trying to use your HACS kostal_plenticore integration for my Lostal Piko IQ inverter but it does not work. Could you please give me a little help ?
My web interface is the same or very similar to the Plenticore.

Here is my config :

  • platform: kostal_plenticore
    host: 192.168.1.xxx
    password: My_inverter_local_web_server_password
    dc_inputs: 1 # Optional, default: 2, valid values: 1, 2, 3
    scan_interval: 30 # Optional, default: 30
    monitored_conditions:
    - HomeGridPower
    - HomeOwnPower
    - HomePVPower
    - HomeBatteryPower
    - GridPower
    - DCPower
    - PVPower
    - AutarkyDay
    - AutarkyMonth
    - AutarkyTotal
    - AutarkyYear
    - CO2SavingDay
    - CO2SavingMonth
    - CO2SavingTotal
    - CO2SavingYear
    - PV1Power
    - PV1Voltage
    - PV1Current
    - PV2Power
    - PV2Voltage
    - PV2Current
    - PV3Power
    - PV3Voltage
    - PV3Current
    - ACFrequency
    - ACL1Current
    - ACL1Power
    - ACL1Voltage
    - ACL2Current
    - ACL2Power
    - ACL2Voltage
    - ACL3Current
    - ACL3Power
    - ACL3Voltage
    - HomeConsumptionDay
    - HomeConsumptionMonth
    - HomeConsumptionTotal
    - HomeConsumptionYear
    - HomeConsumptionFromBatDay
    - HomeConsumptionFromBatMonth
    - HomeConsumptionFromBatTotal
    - HomeConsumptionFromBatYear
    - HomeConsumptionFromGridDay
    - HomeConsumptionFromGridMonth
    - HomeConsumptionFromGridTotal
    - HomeConsumptionFromGridYear
    - HomeConsumptionFromPVDay
    - HomeConsumptionFromPVMonth
    - HomeConsumptionFromPVTotal
    - HomeConsumptionFromPVYear
    - HomeConsumptionYieldDay
    - HomeConsumptionYieldMonth
    - HomeConsumptionYieldTotal
    - HomeConsumptionYieldYear
    - OwnConsumptionRateDay
    - OwnConsumptionRateMonth
    - OwnConsumptionRateTotal
    - OwnConsumptionRateYear
    - MinSoC
    - SmartBatteryControl
    - InverterState
    - LimitEvuAbs
    - SerialNumber
    - ArticleNumber
    - ProductName

Here is the log errors :

Logger: homeassistant.config
Source: config.py:424
First occurred: 9:39:37 (1 occurrences)
Last logged: 9:39:37

Invalid config for [sensor.kostal_plenticore]: value must be one of ['ACFrequency', 'ACL1Current', 'ACL1Power', 'ACL1Voltage', 'ACL2Current', 'ACL2Power', 'ACL2Voltage', 'ACL3Current', 'ACL3Power', 'ACL3Voltage', 'AutarkyDay', 'AutarkyMonth', 'AutarkyTotal', 'AutarkyYear', 'BatteryCycles', 'BatteryPercent', 'BatteryPower', 'CO2SavingDay', 'CO2SavingMonth', 'CO2SavingTotal', 'CO2SavingYear', 'DCPower', 'GridPower', 'HomeBatteryPower', 'HomeConsumptionDay', 'HomeConsumptionFromBatDay', 'HomeConsumptionFromBatMonth', 'HomeConsumptionFromBatTotal', 'HomeConsumptionFromBatYear', 'HomeConsumptionFromGridDay', 'HomeConsumptionFromGridMonth', 'HomeConsumptionFromGridTotal', 'HomeConsumptionFromGridYear', 'HomeConsumptionFromPVDay', 'HomeConsumptionFromPVMonth', 'HomeConsumptionFromPVTotal', 'HomeConsumptionFromPVYear', 'HomeConsumptionMonth', 'HomeConsumptionTotal', 'HomeConsumptionYear', 'HomeConsumptionYieldDay', 'HomeConsumptionYieldMonth', 'HomeConsumptionYieldTotal', 'HomeConsumptionYieldYear', 'HomeGridPower', 'HomeOwnPower', 'HomePVPower', 'InverterState', 'LimitEvuAbs', 'MinSoC', 'OwnConsumptionRateDay', 'OwnConsumptionRateMonth', 'OwnConsumptionRateTotal', 'OwnConsumptionRateYear', 'PV1Current', 'PV1Power', 'PV1Voltage', 'PV2Current', 'PV2Power', 'PV2Voltage', 'PV3Current', 'PV3Power', 'PV3Voltage', 'PVPower', 'SmartBatteryControl'] @ data['monitored_conditions'][62]. Got 'SerialNumber' value must be one of ['ACFrequency', 'ACL1Current', 'ACL1Power', 'ACL1Voltage', 'ACL2Current', 'ACL2Power', 'ACL2Voltage', 'ACL3Current', 'ACL3Power', 'ACL3Voltage', 'AutarkyDay', 'AutarkyMonth', 'AutarkyTotal', 'AutarkyYear', 'BatteryCycles', 'BatteryPercent', 'BatteryPower', 'CO2SavingDay', 'CO2SavingMonth', 'CO2SavingTotal', 'CO2SavingYear', 'DCPower', 'GridPower', 'HomeBatteryPower', 'HomeConsumptionDay', 'HomeConsumptionFromBatDay', 'HomeConsumptionFromBatMonth', 'HomeConsumptionFromBatTotal', 'HomeConsumptionFromBatYear', 'HomeConsumptionFromGridDay', 'HomeConsumptionFromGridMonth', 'HomeConsumptionFromGridTotal', 'HomeConsumptionFromGridYear', 'HomeConsumptionFromPVDay', 'HomeConsumptionFromPVMonth', 'HomeConsumptionFromPVTotal', 'HomeConsumptionFromPVYear', 'HomeConsumptionMonth', 'HomeConsumptionTotal', 'HomeConsumptionYear', 'HomeConsumptionYieldDay', 'HomeConsumptionYieldMonth', 'HomeConsumptionYieldTotal', 'HomeConsumptionYieldYear', 'HomeGridPower', 'HomeOwnPower', 'HomePVPower', 'InverterState', 'LimitEvuAbs', 'MinSoC', 'OwnConsumptionRateDay', 'OwnConsumptionRateMonth', 'OwnConsumptionRateTotal', 'OwnConsumptionRateYear', 'PV1Current', 'PV1Power', 'PV1Voltage', 'PV2Current', 'PV2Power', 'PV2Voltage', 'PV3Current', 'PV3Power', 'PV3Voltage', 'PVPower', 'SmartBatteryControl'] @ data['monitored_conditions'][63]. Got 'ArticleNumber' value must be one of ['ACFrequency', 'ACL1Current', 'ACL1Power', 'ACL1Voltage', 'ACL2Current', 'ACL2Power', 'ACL2Voltage', 'ACL3Current', 'ACL3Power', 'ACL3Voltage', 'AutarkyDay', 'AutarkyMonth', 'AutarkyTotal', 'AutarkyYear', 'BatteryCycles', 'BatteryPercent', 'BatteryPower', 'CO2SavingDay', 'CO2SavingMonth', 'CO2SavingTotal', 'CO2SavingYear', 'DCPower', 'GridPower', 'HomeBatteryPower', 'HomeConsumptionDay', 'HomeConsumptionFromBatDay', 'HomeConsumptionFromBatMonth', 'HomeConsumptionFromBatTotal', 'HomeConsumptionFromBatYear', 'HomeConsumptionFromGridDay', 'HomeConsumptionFromGridMonth', 'HomeConsumptionFromGridTotal', 'HomeConsumptionFromGridYear', 'HomeConsumptionFromPVDay', 'HomeConsumptionFromPVMonth', 'HomeConsumptionFromPVTotal', 'HomeConsumptionFromPVYear', 'HomeConsumptionMonth', 'HomeConsumptionTotal', 'HomeConsumptionYear', 'HomeConsumptionYieldDay', 'HomeConsumptionYieldMonth', 'HomeConsumptionYieldTotal', 'HomeConsumptionYieldYear', 'HomeGridPower', 'HomeOwnPower', 'HomePVPower', 'InverterState', 'LimitEvuAbs', 'MinSoC', 'OwnConsumptionRateDay', 'OwnConsumptionRateMonth', 'OwnConsumptionRateTotal', 'OwnConsumptionRateYear', 'PV1Current', 'PV1Power', 'PV1Voltage', 'PV2Current', 'PV2Power', 'PV2Voltage', 'PV3Current', 'PV3Power', 'PV3Voltage', 'PVPower', 'SmartBatteryControl'] @ data['monitored_conditions'][64]. Got 'ProductName'. (See /config/configuration.yaml, line 118). Please check the docs at https://www.home-assistant.io/integrations/kostalplenticore/

Many thanks for your help.

Software Version Number

It would be nice to make the actual sw Version number visual. Since there is the autoupdate this makes sense.

Additional sensors

Hello,

According the MODBUS manual from Kostal, there are some more addresses available. Is it possible, to integrate some of them as well ?

56: Inverter state
122: Power limit from EVU
???: Power to grid (Einspeisung in Watt) ? If there is no such address, is it possible to calculate it and allocate it to a sensor ?

That would be great.

Thank you
Markus

PV3 missing

The Costal Plenticore Plus Models have 3 inputs (pv1, pv2, pv3) whereas the 3rd one may be used for battery instead of input. Bit in my case I use all 3 ports for solar input (3-MPPT). Is there by chance a way to get the 3rd one?

Essentially the following monitored options are missing:

PV3Power
PV3Voltage
PV3Current

There should also be an option in your configuration which decides how to handle PV3.
(Parallel to host/password)
Sth. like "battery_on_pv3: true/false"

(The default value should be false, since it requires a license activation to enable PV3 for battery within the Plenticore)

Your PVPower calculation should then be changed to:
"PVPower": ["pv1+2+3", "P", "Kostal pv power", POWER_WATT, "mdi:solar-power"],

Whereas the calculation should look like

if self.moduleid == "pv1+2+3":
try:
pv1 = int(
self.api.getProcessdata("devices:local:pv1", [self.id])[0]["value"]
)
except:
pv1 = "error"
try:
pv2 = int(
self.api.getProcessdata("devices:local:pv2", [self.id])[0]["value"]
)
except:
pv2 = "error"
try:
pv3 = int(
self.api.getProcessdata("devices:local:pv3", [self.id])[0]["value"]
)
except:
pv3 = battery_on_pv3 ? 0 : "error"
if(pv1 != "error" and pv2 != "error" and pv3 != "error"):
value = pv1 + pv2 +pv3
else:
value= "error"

Feel free to contact me in case of any question.

Kind regards

Sascha Sander

new Sensors for Statistic + PV/DC Power

Hi there ITTV,

Once again thank you for your work on this project, appreciate it.

Unfortunately the new added sensor do not work for me. As i have no Power Meter installed i do not get any consumption values from the statistic page.

The only values displayed are as found in screenshot below. I have tried all of the new sensors for consumption but none of it reply a value, always 0.

image

Do you see a way to make these values available as sensor? PVProductionDay e.g.?

Another thing,

I think i found small problem with PVPower and DCPower.
In my understanding PV Power should be the genarated Power on AC side and therefore always a little lower than DCPower.

And DCPower the summarized value of each Input (PV1Power+PV2Power)

I compared values from PV and DC Power with the one i see on Kostal GUI:

image

And this is what sensors in HA report me:

image

It looks PV and DC Power report the same values.

Please share your thoughts.

Thank you.

br mole

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.