Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

eSolar SEC Module Issue #6

Closed
LowKey88 opened this issue Sep 4, 2021 · 5 comments
Closed

eSolar SEC Module Issue #6

LowKey88 opened this issue Sep 4, 2021 · 5 comments

Comments

@LowKey88
Copy link

LowKey88 commented Sep 4, 2021

Hi @djansen1987

Greetings,

I'm still see issue on data provided for sensor.esolar_totalloadpower , sensor.esolar_totalgridpower & sensor.esolar_totalpvgenpower.

Here example data from HA
Screenshot 2021-09-04 at 4 26 28 PM

This from App SAJ

IMAGE 2021-09-04 16:31:40

Sometime PV generation data seem swapped with Grid output data. Not sure why this happen, can you look up on this?

Thank you.

djansen1987 added a commit that referenced this issue Sep 6, 2021
@djansen1987
Copy link
Owner

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.

@djansen1987
Copy link
Owner

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

@djansen1987
Copy link
Owner

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"

@djansen1987
Copy link
Owner

djansen1987 commented Sep 8, 2021

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

@djansen1987
Copy link
Owner

Fixed with above solutions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants