Code Monkey home page Code Monkey logo

Comments (5)

djansen1987 avatar djansen1987 commented on May 27, 2024

Hi @LowKey88 ,

Could you see if it is fixed in the latest update ? Is switched the parameters. At creating i was not 100% sure which was which so i might have mixed the up.

from sajesolar.

djansen1987 avatar djansen1987 commented on May 27, 2024
            if self._type == 'totalGridPower':
                if 'dataCountList' in energy:
                    if energy['dataCountList'][4][-1] is not None:
                        self._state = float(energy['dataCountList'][3][-1])
            if self._type == 'totalLoadPower':
                if 'dataCountList' in energy:
                    if energy['dataCountList'][4][-1] is not None:
                        self._state = float(energy['dataCountList'][2][-1])
            if self._type == 'totalPvgenPower':
                if 'dataCountList' in energy:
                    if energy['dataCountList'][4][-1] is not None:
                        self._state = float(energy['dataCountList'][4][-1])

This is the part there i get the data out of the api. As it is not properly labeled, and it is also an array of data i had to work with positions instead of labels. I cannot imagine they are switching the positions of this data but if they are then it might become very hard to get this right, as i only found 1 more API endpoint which is only accessible via the reseller/main login which i believe cannot be used in the component because of various reasons..

from sajesolar.

djansen1987 avatar djansen1987 commented on May 27, 2024

Found an new API endpoint which if it has the correct info is way easier to understand for me. Could you see the bold items are the values you are looking for ? Found it the data under load monitoring - >Overview. it represents the data shown in the image below :

image

https://fop.saj-electric.com/saj/monitor/site/getPlantMeterEnergyPreviewInfo?plantuid=1234-aa-12346-fd123-123423-&moduleSn=M1234Y12345678&_=1830669656746

previewInfo:
gridDirection: -1
-> gridPower: 1723
isOnline: 1
moduleSn: "M1234Y12345678"
-> pvPower: 0
solarPower: 12
-> totalLoadPower: 1723
status: "success"

from sajesolar.

djansen1987 avatar djansen1987 commented on May 27, 2024

Hi @LowKey88

Should be fixed in v1.2.4.

Please read and follow up on the instructions within the release notes. As per my findings we were on the wrong track of getting the correct sensors to make the Energy Dashboard work as it should. Therefor other sensors were needed (see release notes)

Could you confirm if my findings are correct and also work for you? If it does, we might be able te deprecate some old sensors which are not needed any more, this can make the component faster en cleaner. I think the following sensors from the SEC Module are not needed anymore after the latest update, could you confirm?

  - pvElec
  - useElec
  - buyElec
  - sellElec
  - buyRate
  - sellRate

  - totalGridPower
  - totalLoadPower
  - totalPvgenPower

from sajesolar.

djansen1987 avatar djansen1987 commented on May 27, 2024

Fixed with above solutions

from sajesolar.

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.