Giter Site home page Giter Site logo

mornesaunders360 / solar-sunsynk Goto Github PK

View Code? Open in Web Editor NEW
9.0 4.0 2.0 394 KB

Monitor your energy generation, storage, and usage data using an unofficial API from Sunsynk

License: MIT License

Python 100.00%
hacs hacs-custom home-assistant homeassistant homeassistant-integration solar-energy solar-system homeassistant-components sunsynk deye

solar-sunsynk's People

Contributors

itlife360 avatar mornesaunders360 avatar reedy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

reedy alz41

solar-sunsynk's Issues

Missing sensors

I was using the sensors _loadOrEpsPower and _gridormeterpower for house load and grid load respectively. Having updated today, all the sensors are renamed and I can't find these two values.

None of the numbers for any entities seem to match.

image

Not a issue but a compliment

Thanks for creating this. I'll check my logs and report any issues. Been using it for a week or so and just want to say thanks!!

Extremely chatty with the api.sunsynk.net?

I've just disabled this on my HomeAssistant as when reviewing my AdGuard logs i noticed it was hammering my DNS with api.sunsynk.net with requests (6 million requests in the last 30 days). I suspect i have something misconfigured or made a mistake - but thought i should raise it in case its actually a bug or bad default setting.

Can't switch Grid Charge 1-6 or Gen Charge 1-6 on

Is there a guide for all the options the service can control? What does mondayOn do for example? There's nothing in the official UI that seems to correspond.

I'm using this in a script. It changes the other settings but the time1on true/false options (including 1 to 6) don't take effect. The existing settings remain.

cap1 to cap6 do take effect.

sequence:
  - service: solar_sunsynk.set_solar_settings
    data:
      sn: "xxxxx"
      sellTime1: "01:00"
      sellTime2: "05:00"
      sellTime3: "12:30"
      sellTime4: "13:00"
      sellTime5: "17:00"
      sellTime6: "21:00"
      cap1: "20"
      cap2: "20"
      cap3: "20"
      cap4: "20"
      cap5: "20"
      cap6: "20"
      time1on: false
      time2on: true
      time3on: true
      time4on: false
      time5on: false
      time6on: false
      sysWorkMode: "2"

TypeError: 'NoneType' object is not iterable

Hi Morne

I have been running Solar-Sunsynk for many months without problem - Many Thanks! But it now has started hanging with the error below. If I restart Home Assistant it works for a few minutes, then the error recurrs.

Please can you help?

I am running v1.05 on 3.6Kw inverter in UK.

=======================================
This error originated from a custom integration.
Logger: custom_components.solar_sunsynk
Source: helpers/update_coordinator.py:318
integration: Solar Sunsynk (documentation, issues)
First occurred: 10:12:45 (2 occurrences)
Last logged: 10:13:15

Unexpected error fetching solar_sunsynk data: 'NoneType' object is not iterable
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 318, in _async_refresh
self.data = await self._async_update_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/solar_sunsynk/coordinator.py", line 29, in _async_update_data
for invertor in jsondata:
TypeError: 'NoneType' object is not iterable

Integration stopped working

It was working just fine, but last 19 hours it's done nothing.

Sunsynk platform is accessible, is there a way I can refresh the integration or has something changed?

Sensors using wrong units (kWh insted of W)

I've just grabbed the latest version and can see it's looking great!

I think units kWh are being used instead of W and also device class "power" should be "energy" on some sensors.

Sensors such as sensor.sunsynk_X_gridormeterpower are showing kWh where they should be W. They have the correct device_class: power

Sensors such as sensor.sunsynk_X_emonth has the correct units but device_class: power should be device_class: energy as they are power over time (energy) - aside from a slightly different icon I don't really know what difference it makes but I'm mentioning it anyway!

Thanks for the great work.

API documentation

Thanks for your API documentation it's proving invaluable for a solar optimization project I'm involved in. In return, can I offer something I've gleaned from elsewhere - I believe json key for 'Use Timer' is {"peakAndVallery": "1"} (including spelling mistake!)
Also, according to my testing for Work Mode:
0 = Selling first (= Zero Export off, Solar Export off, Limit to Load only off)
1 = Zero Export + Limit to Load Only (= Zero Export on, Solar Export on, Limit to Load only on)
2 = Limited to Home (= Zero Export on, Solar Export on, Limit to Load only off)

cheers
Mark

1.0.8 fails to start

HA reports that 1.0.8 fails to setup.

Reverting to 1.0.6 fixes the problem.

From the logs:

2024-04-09 09:03:32.160 ERROR (MainThread) [custom_components.solar_sunsynk.sunsynkapi] Calling get_plant_data with args: ()
2024-04-09 09:03:32.160 ERROR (MainThread) [custom_components.solar_sunsynk.sunsynkapi] Error while getting plant data: 'NoneType' object is not subscriptable
2024-04-09 09:03:32.160 ERROR (MainThread) [custom_components.solar_sunsynk] Unexpected error fetching solar_sunsynk data: 'NoneType' object is not iterable
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 315, in _async_refresh
self.data = await self._async_update_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/solar_sunsynk/coordinator.py", line 29, in _async_update_data
for invertor in jsondata:
TypeError: 'NoneType' object is not iterable

Error doing job: Future exception was never retrieved

Not available in HACS, I had to add it as a custom hacs repository.

I have no synsynk sensors and my home assistant log is filled with this repeating error:

2023-05-10 10:02:35.502 ERROR (MainThread) [homeassistant] Error doing job: Future exception was never retrieved
Traceback (most recent call last):
  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/solar_sunsynk/__init__.py", line 112, in update_states
    token = responseAuth["data"]["access_token"]
TypeError: 'NoneType' object is not subscriptable

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.