Git Product home page Git Product logo

Comments (10)

edalquist avatar edalquist commented on September 23, 2024

I remember seeing this when testing, I'm wondering if the sunspec data being returned from your rebus doesn't have the scale factor set correctly. At one point I thought I had an option to override the scale-factor when configuring sensors but I can't find that code now.

from pwrcell_sunspec.

oriolism avatar oriolism commented on September 23, 2024

This is not a mayor issue, I can use a template sensor on HA to fix this.

from pwrcell_sunspec.

oriolism avatar oriolism commented on September 23, 2024

I remember seeing this when testing, I'm wondering if the sunspec data being returned from your rebus doesn't have the scale factor set correctly. At one point I thought I had an option to override the scale-factor when configuring sensors but I can't find that code now.

The scale factor looks ok on the scan.

string_combiner:
ID: 404
L: 25
DCA_SF: -2
DCAhr_SF: 0
DCV_SF: -1
DCW_SF: 0
DCWh_SF: 0

DCAMax: 1300
N: 0
Evt: 0
EvtVnd: None
DCA: 293
DCAhr: None
DCV: 2761
Tmp: 47
DCW: 790
DCPR: None
DCWh: 1499645
InDCA_SF: 0
InDCAhr_SF: 0
InDCV_SF: 0
InDCW_SF: 0
InDCWh_SF: 0

from pwrcell_sunspec.

oriolism avatar oriolism commented on September 23, 2024

Changing this on pwrcell.py fixed the problem:

  def __fix_device(self, device: ss2_client.SunSpecModbusClientDeviceTCP):
"""
Apply various overrides/fixes to devices after they have been loaded
"""
for string_combiner in device.models.get(404, []):
  # DCW has a scale factor point of DCW_SF but that is set to zero in the system. Clear the sf point
  # reference and manually set the sf_value to -1
  string_combiner.DCW.sf = None
  string_combiner.DCW.sf_value = None

from pwrcell_sunspec.

edalquist avatar edalquist commented on September 23, 2024

Ah, so it must be my PvLinks that report the wrong scale value :D

I'm going to re-open this and see about moving the scale-factor override into the config file

from pwrcell_sunspec.

PeterGrace avatar PeterGrace commented on September 23, 2024

It appears that some of my PVLinks match eric's situation, and others don't -- I do think this needs to be configurable per pv-link in the yaml or have some other way to detect scaling may be awry (for instance, I have 2x6 solaria 360w panels on a pvlink and I'm getting 9000W output from one pvlink and 900W from the other PVLink. 900W would be reasonable for sun position at the moment.

I bet the scale factor is related to firmware version:

image

from pwrcell_sunspec.

edalquist avatar edalquist commented on September 23, 2024

+1 to adding a scale-factor override in the config. Honestly I'm not really happy with the current config and hard-coding of all the attributes you care about. I'd like to restructure things so the config both lists the devices and paths to attributes you want exposed. If things were structured like that it would be easy to add per-attribute overrides to things like scale factor.

Also you both might be interested in https://github.com/edalquist/sunspec_explorer it is in-progress but with a little more work it will allow MUCH better visualization of all the possible data.

from pwrcell_sunspec.

PeterGrace avatar PeterGrace commented on September 23, 2024

Not the most elegant way to solve this, but:

  def __fix_device(self, device: ss2_client.SunSpecModbusClientDeviceTCP):
    """
    Apply various overrides/fixes to devices after they have been loaded
    """
    for string_combiner in device.models.get(404, []):
      # DCW has a scale factor point of DCW_SF but that is set to zero in the system. Clear the sf point
      # reference and manually set the sf_value to -1
      if device.common[0].Vr.value == "634_13700":
        string_combiner.DCW.sf = None
        string_combiner.DCW.sf_value = None
      else:
        logging.info("Found older pvlink firmware, adjusting scale factor.")
        string_combiner.DCW.sf = None
        string_combiner.DCW.sf_value = -1

Now at least my production layout seems sane:
image

from pwrcell_sunspec.

PeterGrace avatar PeterGrace commented on September 23, 2024

As an update -- after two days of watching, it appears that pvlinks with the older firmware will "wake up" after a night and have a different scale factor, but, if you stop and restart pwrcell_sunspec it seems to resolve itself? Not sure what conditions contribute to this behavior but it definitely seems to only be happening on older firmware pvlinks thus far.
image

from pwrcell_sunspec.

edalquist avatar edalquist commented on September 23, 2024

Not perfect but better than before!

from pwrcell_sunspec.

Related Issues (7)

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.