Code Monkey home page Code Monkey logo

Comments (9)

ProudElm avatar ProudElm commented on May 18, 2024

uh um, weird.. Looks like you're not getting an json response..
The point was, it was a bit tricky to get this.

I'm doing 2 webcalls for it, 1 to get a cookie en then using some information from this cookie to make a call to:
https://monitoring.solaredge.com/solaredge-apigw/api/sites/SITEID/layout/energy?timeUnit=ALL

Perhaps that is not working for you? I will try to add come logging to check what kind of response there is.

from solaredgeoptimizers.

frank8the9tank avatar frank8the9tank commented on May 18, 2024

I have a similar thing in in my logs:
`This error originated from a custom integration.

Logger: homeassistant.helpers.entity
Source: custom_components/solaredgeoptimizers/sensor.py:168
Integration: SolarEdge Optimizers Data (documentation, issues)
First occurred: 14:18:46 (76 occurrences)
Last logged: 14:35:30

Update for sensor.lifetime_energy_1_2_15 fails
Update for sensor.lifetime_energy_1_2_16 fails
Update for sensor.lifetime_energy_1_2_17 fails
Update for sensor.lifetime_energy_1_2_18 fails
Update for sensor.lifetime_energy_1_2_19 fails
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 515, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 710, in async_device_update
raise exc
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/solaredgeoptimizers/sensor.py", line 168, in update
lifetimeenergy = json.loads(self._client.getLifeTimeEnergy())
File "/usr/local/lib/python3.10/json/init.py", line 346, in loads
return _default_decoder.decode(s)
File "/usr/local/lib/python3.10/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/local/lib/python3.10/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
`

no data:
afbeelding

from solaredgeoptimizers.

frank8the9tank avatar frank8the9tank commented on May 18, 2024

The other 4 entities are updating, so those are still working
its only the lifetime energy thats not working.

from solaredgeoptimizers.

willem-ebbers avatar willem-ebbers commented on May 18, 2024

in the solaredgeoptimizers.py I do see that the SITEID is fixed to 1871534 (your site ID?) on lines 89, 106, 114
could that be contributing to the issue?

from solaredgeoptimizers.

ProudElm avatar ProudElm commented on May 18, 2024

Oh no.. thats a mistake indeed.. I will fix this.. That's my siteid indeed.. But that is also used to login, so yeah, could be the problem.

from solaredgeoptimizers.

ProudElm avatar ProudElm commented on May 18, 2024

I fixed this in the latest version.. Please let me know if it works

from solaredgeoptimizers.

willem-ebbers avatar willem-ebbers commented on May 18, 2024

This works as a charm thanks!

from solaredgeoptimizers.

ProudElm avatar ProudElm commented on May 18, 2024

That's good to read!

from solaredgeoptimizers.

ProudElm avatar ProudElm commented on May 18, 2024

Life time sensors are now working

from solaredgeoptimizers.

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.