Code Monkey home page Code Monkey logo

Comments (9)

absorbo avatar absorbo commented on June 9, 2024 2

Tried @djansen1987 integration: https://github.com/djansen1987/SAJeSolar and it created all the sensors with the values.

from ha-esolar.

faanskit avatar faanskit commented on June 9, 2024 1

Hi,

I will need some additional information. Can you please describe your set-up.

System: E.g. Solar inverter, Battery Module, SEC Module
System details: SAJ R5, H1, SEC, etc.

I have only tested it with SAJ R5 and another user with H1. SEC is not supported.

Likely I will need you to run a few tests for me as I cannot replicate the issue.

Two options:
1a.) If you have python and some basic knowledge, I will give you a few files which you run and send/upload the logs from.
1b.) Upon request, you share some information from Chrome inspection function
2.) You share your secret credentials (username & password) with me to this temporary mail: [email protected]

If you edit this line in esolar.py and enable logging, I will likely be able to see more.
VERBOSE_DEBUG = False ==>
VERBOSE_DEBUG = True
Since line 246 works (tmp.update({"devicesn": inverter})) my first speculation is that you have a system never tested before which does not provide the required information.

Meanwhile, have you tried @djansen1987 integration? Maybe it works better for you while we find this bug..
I.e. this https://github.com/djansen1987/SAJeSolar

/Marcus

from ha-esolar.

djansen1987 avatar djansen1987 commented on June 9, 2024 1

@faanskit they seem to have changed the api on peakpower for some models it seems. This can be fixed by removing the device serial number in de post to plant2 api

from ha-esolar.

absorbo avatar absorbo commented on June 9, 2024 1

image

Credentials to my installation sent to: [email protected]

from ha-esolar.

faanskit avatar faanskit commented on June 9, 2024 1

It appears as if the root cause of is simply that this integration does not support a SEC module and from the appearance of the login page, there is a SEC module installed.
image

A quick removal of the problematic line (247) installs the system ok:
image

But, PV power is not updated. For this system, I think I need to pick power from viewBean instead of peakPower which is not available.

image

What is very strange is that when I log in as your guest, the inverter tab is empty:

image

Glad that you are up and running with the integration from @djansen1987, which support SEC.

I'll see if I can free up some time to fix this properly. From the looks of it, some refactoring is needed.

from ha-esolar.

absorbo avatar absorbo commented on June 9, 2024

`This error originated from a custom integration.

Logger: custom_components.saj_esolar_air
Source: custom_components/saj_esolar_air/esolar.py:247
Integration: eSolar (documentation, issues)
First occurred: 17:10:56 (45 occurrences)
Last logged: 17:57:08

Unexpected error fetching saj_esolar_air data: 'peakPower'
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 239, in _async_refresh
self.data = await self._async_update_data()
File "/config/custom_components/saj_esolar_air/init.py", line 456, in _async_update_data
data = await self.hass.async_add_executor_job(
File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/saj_esolar_air/init.py", line 500, in get_data
plant_info = get_esolar_data(username, password, plants, use_pv_grid_attributes)
File "/config/custom_components/saj_esolar_air/esolar.py", line 56, in get_esolar_data
web_get_plant_detailed_chart(session, plant_info)
File "/config/custom_components/saj_esolar_air/esolar.py", line 247, in web_get_plant_detailed_chart
tmp.update({"peakPower": plant_chart["peakPower"]})
KeyError: 'peakPower'
`

from ha-esolar.

djansen1987 avatar djansen1987 commented on June 9, 2024

https://github.com/djansen1987/SAJeSolar/releases/tag/v1.4.4

from ha-esolar.

faanskit avatar faanskit commented on June 9, 2024

For a quick test following the advice from @djansen1987, change this line in esolar.py:

From:
url = f"{BASE_URL_WEB}/monitor/site/getPlantDetailChart2?plantuid={plant['plantuid']}&chartDateType=1&energyType=0&clientDate={client_date}&deviceSnArr={inverter}&chartCountType=2&previousChartDay={previous_chart_day}&nextChartDay={next_chart_day}&chartDay={chart_day}&previousChartMonth={previous_chart_month}&nextChartMonth={next_chart_month}&chartMonth={chart_month}&previousChartYear={previous_chart_year}&nextChartYear={next_chart_year}&chartYear={chart_year}&elecDevicesn=&_={epochmilliseconds}"

To:
url = f"{BASE_URL_WEB}/monitor/site/getPlantDetailChart2?plantuid={plant['plantuid']}&chartDateType=1&energyType=0&clientDate={client_date}&deviceSnArr=&chartCountType=2&previousChartDay={previous_chart_day}&nextChartDay={next_chart_day}&chartDay={chart_day}&previousChartMonth={previous_chart_month}&nextChartMonth={next_chart_month}&chartMonth={chart_month}&previousChartYear={previous_chart_year}&nextChartYear={next_chart_year}&chartYear={chart_year}&elecDevicesn=&_={epochmilliseconds}"

I'll try this myself in a virtual system tomorrow.

/Marcus

from ha-esolar.

absorbo avatar absorbo commented on June 9, 2024

same result, sorry :)

from ha-esolar.

Related Issues (8)

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.