/Solar-Sunsynk

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

Primary LanguagePythonMIT LicenseMIT

Solar Sunsynk hacs_badge

A Home Assistant integration to track your Sunsynk solar system.

image

Features

  1. Supports real-time monitoring of your Sunsynk solar system's parameters.
  2. Allows you to adjust the settings of your system remotely through Home Assistant.
  3. New: Now supports adjusting solar settings remotely through the set_solar_settings service.

HACS Install

Open your Home Assistant instance and open a repository inside the Home Assistant Community Store.

  1. Access HACS: Open Home Assistant and click on HACS in the sidebar.
  2. Go to Integrations: Navigate to the Integrations tab.
  3. Add Custom Repository: Click on the menu in the top right corner (three vertical dots), then select Custom Repositories.
  4. Enter Details: In the new window, you need to input the necessary information about the custom integration you want to add.
  5. Add custom repository URL: Paste the URL of the repository you want to add.
  6. Select category: Choose 'Integration' from the category dropdown menu.
  7. Add: Click the Add button to confirm. This action should add the custom integration to HACS.
  8. Select "+ Explore & Download Repositories" and search for "Solar Sunsynk".
  9. Select "Solar Sunsynk" and "Download this repository with HACS".
  10. Once downloaded, go to settings, then devices and services.
  11. Click on add integration and search for 'Solar Sunsynk'.
  12. Follow the prompt with user name and then password, wait for 2 minutes and your data should be loaded.
  13. Setup cards and automations.

Service Usage

  1. To monitor your system, use the provided sensors in your Home Assistant dashboard.
  2. Please guide for mapping service to sunsynk front end https://github.com/MorneSaunders360/Solar-Sunsynk/blob/main/ServiceGuide.md
  3. To adjust system settings, call the solar_sunsynk.set_solar_settings service with the desired parameters. For example:
service: solar_sunsynk.set_solar_settings
data:
  sn: 2107269334
  safetyType: 2
  battMode: -1
  solarSell: 0
  pvMaxLimit: 8000
  energyMode: 0
  peakAndVallery: 1
  sysWorkMode: 2
  sellTime1: 01:00
  sellTime2: 05:00
  ...

Sensors

Go to developer tool, then select the states tab. Filter the entities by searching for solar and you will be able to see all the sensors available. image

Cards

I created these cards with the help the following

Card 1

Code
image

Card 2

Code
image