Giter Site home page Giter Site logo

Comments (12)

TobyRh avatar TobyRh commented on July 24, 2024

I've done some digging, as I was wondering why my Sonnen dashboard was only showing the data of PPV1.

As far as I can tell (with my system) the ppv value from the battery_system call is not the same as the ppv value from the inverter. The ppv from battery_system is the total wattage after having gone through the inverter. There is no ppv2 in battery_system.

I've done some reads from the battery_system and inverter calls and get the following (full dump here):

battery_system:
    'ppv': '416.47'

inverter:
    'ppv': '222.86', 
    'ppv2': '221.64'

Using the logic from sensor.py it then finds ppv1-values from battery_system and ppv2-values from the inverter, leading to the error of ppv1 being too high.

if not "inverter_ppv" in self.disabledSensors:
    val_found = True
    if 'ppv' in battery_system['grid_information']:
        val=battery_system['grid_information']['ppv']
    elif 'ppv' in inverter['status']:
        val=inverter['status']['ppv']

and

if not "inverter_ppv2" in self.disabledSensors:
    val_found = True
    if 'ppv2' in battery_system['grid_information']:
        val=battery_system['grid_information']['ppv2']
    elif 'ppv2' in inverter['status']:
        val=inverter['status']['ppv2']

My system has only been up and running for two weeks, so I don't know if something has changed in the API that has caused it, but in the release notes of Software version: 1.8.7, it states:

API V2: New data points for requesting battery module data and inverter data were additionally implemented. Release Notes

Maybe that has something to do with it?

from ha_sonnenbatterie.

TobyRh avatar TobyRh commented on July 24, 2024

image

This is what my history graph look like this morning on a cloudy/rainy day.

from ha_sonnenbatterie.

xlibbyx avatar xlibbyx commented on July 24, 2024

I switched the if and elseif in sensor.py last night and everything looks normal today so that seems to have fixed it.

markup_1000003278

from ha_sonnenbatterie.

TobyRh avatar TobyRh commented on July 24, 2024

I did it a bit differently. I created entities for the battery system values (ppv, ipv, upv) and seperated them out from the inverter entities. pastebin

from ha_sonnenbatterie.

RustyDust avatar RustyDust commented on July 24, 2024

@TobyRh @xlibbyx

Would you guys be so kind and send a dump of your setup using this gist -> https://gist.github.com/RustyDust/2dfdd9e9d0f3b5476b5e466203123f6f

(don't forget to edit any possibly sensible data)

from ha_sonnenbatterie.

TobyRh avatar TobyRh commented on July 24, 2024

@RustyDust

Here you go πŸ‘

from ha_sonnenbatterie.

RustyDust avatar RustyDust commented on July 24, 2024

Here you go πŸ‘

Thanks a lot! It's really fascinating how many differences there are between setups.

from ha_sonnenbatterie.

TobyRh avatar TobyRh commented on July 24, 2024

Thanks a lot! It's really fascinating how many differences there are between setups.

Definitely! I mean you have almost double the amount of lines in your output! And the content is night and day a lot of the time

from ha_sonnenbatterie.

xlibbyx avatar xlibbyx commented on July 24, 2024

Thanks for this! πŸ‘πŸ»

from ha_sonnenbatterie.

RustyDust avatar RustyDust commented on July 24, 2024

@TobyRh

Would you mind looking at this and check for needed changes in mappings.py? ;)

from ha_sonnenbatterie.

TobyRh avatar TobyRh commented on July 24, 2024

Had a look. Don't really know what I'm looking for, but I did wonder why fac is mentioned twice in the inverter section. I don't have it under status --> status.

  "inverter": {
    "status": {
      "status": {
        "fac": {
          "sensor":         "inverter_fac",
          "friendly_name":  "Inverter - Net frequency",
          "unit":           "Hz",
          "class":          SensorDeviceClass.FREQUENCY,
          "aka":            ["state_netfrequency"],
          "convert":        float,
        },
      },
      "fac": {
        "sensor":         "inverter_fac",
        "friendly_name":  "Inverter - Net frequency",
        "unit":           "Hz",
        "class":          SensorDeviceClass.FREQUENCY,
        "aka":            ["state_netfrequency"],
        "convert":        float,

from ha_sonnenbatterie.

RustyDust avatar RustyDust commented on July 24, 2024

My system doesn't have it either but I've got dumps where it's there so that's why it's included.

from ha_sonnenbatterie.

Related Issues (20)

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.