mornesaunders360 / solar-sunsynk Goto Github PK
View Code? Open in Web Editor NEWMonitor your energy generation, storage, and usage data using an unofficial API from Sunsynk
License: MIT License
Monitor your energy generation, storage, and usage data using an unofficial API from Sunsynk
License: MIT License
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"
Triple checked I'm using the right credentials. Is it possible you're only connecting to Region 1?
Thank you for your great integration. when i check my logs i see i keep getting a error
Logger: custom_components.solar_sunsynk.sunsynkapi
Source: custom_components/solar_sunsynk/sunsynkapi.py:36
integration: Solar Sunsynk (documentation, issues)
First occurred: 17:19:27 (244 occurrences)
Last logged: 17:47:13
Region 2
Seeing as Sunsynk had been changing things i deleted the add on and reinstalled, however the error still exists. Any ideas how i can rectify this.
Thanks
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
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
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.
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?
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!!
Sorry, duplicate post.
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
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
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.
Thanks for creating this.
I also found https://github.com/slipx06/sunsynk-power-flow-card which gives a nice UI to the data. I've not managed to line up all the numbers properly yet - but thought you might like to see it.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.