Home Assistant Community Add-on: iSolarCloud / Sungrow

Yes, alas this is the problem, because the endpoints are all different across models.

Things that will help you greatly. Download the standalone GoSungrow binary from my releases page, (Releases · MickMake/GoSungrow · GitHub).

Then use commands like:
GoSungrow show ps tree - to show your ps_id tree.
GoSungrow show ps points - to show all points provided by your inverter(s).
GoSungrow show ps detail - to show details on all your ps_ids.

I’ve added a tonne of other commands under GoSungrow show to help in mapping out endpoints.

What I need to do next is provide a mechanism for the community to add configs.

If you REALLY want to get down and dirty in details, then have a look at the ~/.GoSungrow/mqtt_endpoints.json file. This lists the “commands” that are run to pull endpoint data from isolarcloud.

Also, see the command above GoSungrow ha lovelace which is my attempt at automating this whole messy process.

It’ll create all the lovelace yaml files for you in the format that I use.

Hi MickMake,

many thanks for the description.

At the command “GoSungrow ha lovelace” i get then error: Can`t find DeviceType 14 attached to ps_id XXXXX".

I think this is the missing battery. I have no battery installed. Can i modify the GoSungrow ha lovelace command to ignore the DeviceType 14?

Br Thomas

G’day Thomas, I have the same issue. My inverter is an SG8.0RS (a newer model) and it has a different endpoint structure than Micks. I worked this out using the SunGrow API tool. About 60% of the tags can be mapped however, there are some fatal differences. 1. There is no P13 series of tags and 2. There is no Device 17 (which the API Tool lovelace command tool needs automate the YAML files for the dashboards. I have got a number of the dashboards working by mapping the equivalent tags, but the P13 tags don’t have equivalents that exist in the MQTT server. There are a number of other tags that also do not work which are likely related. I shall msg mick and see what the options are. Cheers. Stew

G’day Mick,

Nice work on this addon…it is an awesome data set to have in HA and it looks like it has taken some effort so thank you for making it available!

It seems I have a similar problem to Thomas (above) in that my inverter (SG08.RS) and iSolarCloud Configuration) has a different tag/point structure to yours. I spent a bit of time going through your code, points list and forums to try and work out what is going on. My conclusion is that the different points mean that the tags that are different are not created and hence are not accessible. Also, as Device 17 is not present the lovelace command in the API tool does not work. I have mapped the tags that do work manually and have some of the dashboards working, however, I have come to a point I need some guidance if it is possible progress and if so how. These are possible options I can think of:

  1. Manually create the tags in the MQTT server
  2. I found a JSON file in your code that looks like it calls the points from the API (would modifying this work? and would I need to reload the addon to effect it)
  3. Anything else I can try
  4. There is nothing I can do

I appreciate you probably have better things to do than be the helpddesk, but it would be super helpful to know it is possible to get an outcome before I go down a rabbit hole. Certainly happy to put the work in once I know which direction to go :slight_smile: For context, I am relatively new to HA and have been re-learning some time suppressed coding skills

Also, is there an easy way to trick the lovelace API command to work without Device 17?

Thank you in advance for any advice you are able share.

Cheers
Stew

Hello Mick,

I’m new to HA and I got the addon working for a week. A couple of days I installed Node-red and since then I lost the functionality of the Sungrow addon. I have tried solve it, but I’m to stupid.
I have tested creating a new mqtt-user and password and check that both are in config of mqtt broker and config of the sungrow addon. Still I get this error:

Where/How do I define the identifier?

[09:36:04] INFO: Syncing data from gateway https://gateway.isolarcloud.eu
2023/05/05 09:36:04 INFO: Connecting to MQTT HASSIO Service…
2023/05/05 09:36:04 INFO: Connecting to SunGrow…
2023/05/05 09:36:04 INFO: Found SunGrow 2 devices
Error: identifier rejected
Usage:
GoSungrow mqtt run [flags]
Aliases:
run,
Examples:
GoSungrow mqtt run
Flags: Use “GoSungrow help flags” for more info.
Additional help topics:
ERROR: identifier rejected
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped

And here is the log file when running with Debug active:

My iSolarCloud web dashboard URL starts with portaleu.isolarcloud.com – will this work with your add-on, too, @MickMake? :flushed: (Please say yes …)

First attempt – not successful:

:flushed:

UPDATE:
It works now! Found the solution here.
TDLR: Using https://gateway.isolarcloud.eu instead of https://portaleu.isolarcloud.com made it work! :blush:

Did you ever get this sorted out, @Manu_84_ED?

I, too, read the docs here but can’t find a sensor with “*_pv_energy” in its name in the vast list of entities the add-on offers. :thinking:

Maybe the docs are outdated?

Anyone successfully configured HA’s Energy Dashboard with @MickMake’s add-on? :flushed:

I kind of SOLVED this by putting the vale from the “MQTT sensor” through a Utility Meter helper, which reliably resets at midnight, so the day starts nicely with all zeroes in the energy dashboard.

Maybe not a perfect solution, but good enough for me at the time being.

Thanks for the excellent work Mick!

Oh, very interesting and promising command, the ha lovelace command of GoSungrow!

However, when I try it I get an error:

╰─ ./GoSungrow ha lovelace                                                                                                                                                      ─╯
Can't find DeviceType 14 attached to ps_id 5204951.

What does this mean? Device type 14 is a “Hybrid Inverter”. Does this error mean that without that I can’t create lovelace yaml files? :flushed:

Thanks so much for all your incredible work, @MickMake!! :star_struck::raised_hands::tada::ok_hand:

Thanks for your effort MickMake! This is incredible and worked first hit on my RPi4 Hass box. Once I’m finished creating my dashboard, I won’t need to use their website again.

Cheers mate, very much appreciated!

I found my current solar output in the topic of “GoSungrow getPsDetail.1161688.curr_power”.

1 Like

Great work on this I have it installed with no errors, but sadly I only have one entity “update.gosungrow” and no others…

I have I missed a vital step?

Unfortunately I have the same problem, only the entity “update.gosungrow”.
Deinstallation and new installation of the add-on didn’t help to get any additional entities.

Hi Mick, hi StuartWalesAu,

I have the same issue. I installed everything like described and it seems to work fine so far - what the logs tell me:

2023/06/05 13:32:51 INFO: Found SunGrow 2 devices
2023/06/05 13:32:51 INFO: Caching Sungrow metadata…
2023/06/05 13:32:51 INFO: Cached 256 Sungrow data points…
2023/06/05 13:32:52 INFO: Syncing 1565 entries with HASSIO from queryDeviceList.
CU----CUCUCU-CUCU-CUCU–CUCUCUCUCU–CUCUCU–CU-CUCUCU–CU-CUCU-CU-CUCU–CU-CUCUCUCUCUCUCUCUCUCU–CU-CUCUCUCUCU-CU–CU-CUCUCU-CUCU-CUCU-CUCU-CUCUCUCUCU-CUCUCUCUCUCUCU-CUCU-CU–CU-CU-CU-CUCU–CU----CUCU-CUCU-CU-CUCU-CUCU-CUCUCU–CUCU-CU-CU-CUCU-CUCUCU-CU-CUCU-CUCUCUCUCUCU-CUCUCU-CUCUCU
2023/06/05 13:32:52 INFO: Syncing 148 entries with HASSIO from getPsList.
CUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCU?CUCUCU?CUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCU?CUCUCUCUCUCUCUCUCUCUCUCUCUCUCU?CUCUCUCUCUCUCUCU?CUCUCU
2023/06/05 13:32:52 INFO: Syncing 245 entries with HASSIO from getPsDetail.
CUCUCUCUCUCUCUCUCUCUCUCU?CUCUCUCU?CU?CUCUCUCUCUCUCUCUCUCU?CUCUCUCUCUCUCUCUCUCUCUCU?CUCUCUCUCUCUCU?CUCU?CUCU?CUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCU?CUCUCUCU?CUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCU?CUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCU?CUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCU?CUCUCU?CUCUCUCUCUCU???CUCU?CUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCU?CUCUCUCUCU?CUCUCUCU?CUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCU?
2023/06/05 13:32:53 INFO: Starting ticker…
2023/06/05 13:32:53 INFO: Fetch Schedule: 5m
2023/06/05 13:32:53 INFO: Sleep Delay: 40s
2023/06/05 13:38:54 INFO: Syncing 148 entries with HASSIO from getPsList.
UUUUUUUUUUCUUUUUCUUU?UUUUUUUUUUUUUUUUUCUCUUCUCUU?UCUUUUUUUCU?UUUCUUUUUUUCUUUUUUCUCUUUCUUUU?UCUUUUUUCUUUCUUUCUCUUCUUUCUUUCUUUCUCUUUUUUUUUCUUUUUUUUCUU?UUUUUUCUCUUUUUUUCUUUUUUUUUU
2023/06/05 13:38:54 INFO: Syncing 246 entries with HASSIO from getPsDetail.
CUUUCUCUUU?CUUUUUUCUCUCUUUUUCUU??UUCUUUUCUUUCUCUUUUCUUUUUUCUUUUUCUCUUUCUCU?UUUUUUUUUUUUCUUCUUUCUUUUCUUUCUUU??CUCUUUCUCUCUCUCUCU?CUUCUCUUUCUCUUUCUUCUCUUUCUCUCU?CUUUUCUCUCUCUCUUCUCUUUUUUUUUCUUUUCUUUCUCUCUUUUUUCUUUUUCUUCUUCUCUCU?UUCUUUCUU?UCUUUUCUUCU?CUUUCUUUUUUUUUCUCUUCUCUUCUUUUCUCUU?UCUCUU?UUUUCU??CUUUCUUU?CUCUUUUUCUUCUCUCUCUCUCU?CUUCU?
2023/06/05 13:38:54 INFO: Syncing 1565 entries with HASSIO from queryDeviceList.
-U----U-UUU–UCU-UUUUU-U-UUUUCUU-UCUCUUCUCU-CUUUU-U–UU–U-CUCUUU-U-CUUCUUUCUUUCU-U----UUUCUUCUU—UCUCUU-CU-CU-UU–CUU-UUU—UCU-UCUCU-CUU-UUUCUU----U------UUUUCUCU-UUU-UUCU-UUU-U-U-CUUCU–U-U-UUUCU-CUUUU
2023/06/05 13:44:44 INFO: Syncing 1565 entries with HASSIO from queryDeviceList.
CU-UUCU-CUUCU—UUCUUUU-U–CUUUU-U-CU-U-CU-CUUU–CUUU—CUUU-U-CUUCUUUUUUUU----UU-UUCU-U–UUCUCUU-CUU–UCU—UCUU-CU-UCUUU-CU–CUU–U------UUU-CUU-UU-U-UU–CUUUUCUUU-UU-CUUCUCUU–U-CUUCUU-UCUUCU-CUU-CUU-UUUUU
2023/06/05 13:44:44 INFO: Syncing 148 entries with HASSIO from getPsList.
?UUUUCUUUUCUUUUUCUU?U?UUUUCUCUUCUCUUUUCUUUUUCUUUUUUUUUUUUCUUCUUUUUCUUUUUUUCUUUUUUUCUUUUUUCUUUCUUUUUUUUUUU?UUUUCUCUUUUUUUCUUUUUUUUUCUUUUUUUUCUUUCUUUUCUUUUUUUUUUUUUCU?UCUUUUCUU
2023/06/05 13:44:44 INFO: Syncing 246 entries with HASSIO from getPsDetail.
CUUUU?UCUUUUUUUUUUCUUUCUCUCUUCUUUUCUUUUUCUUUUUCU?UUUUCUCU?CUCUUUUCUUCUUUUUUUCUUUCU?UUUUUCUU?UUU?UUCUUU?UUUUCUCUCUCUUUUCUCUCUCUCUUUUUUUCUUCUUCUUUUUCUUCUUU??UCUUUUUUUCUUUU?CUUU?UCUCUUUUCUCUUUUUU?UUUCUUUUUUUCUUCUCUCUUUUUUUCU?UCUCUUCUCUUUUCUUU?UUCUUUUUUUUCUUUUUCUCUCUUUUUU?UCUCUCUUUUUUUCUCUCUUU?UUCUUUUCU?U?UCUUCUUCUUU
2023/06/05 13:50:34 INFO: Syncing 246 entries with HASSIO from getPsDetail.
CUU?UCUUUUCUUUCUUUCUUCU?UUUCUU?UUUUCUCUUUCUCUCUUCUCUUUUUUUU??CUUCUUCUCUUUUCUUUCUUCUUU?CUCUUCU?CUUCUUUCUCUUCUUCUCUUCUUUUUUCUUUUU?UUCUU?UUCUUUUCUCUUCUCUUCUUUUCUUUU?UCUUCUUUUUCUCUCUUUUUUU?UUCUU?CUUCUCUCU?UCUU?CUUCUCUCUCUUUCUCUCUCUUUUCUUUUUUUUUUCU?UCUCUUUUCUUUUCUCUCUUCUCUUUU?CUCUUUUCUUUUCUCU?UCUUCUCUUCUCUUCUUUUUUU?UUUUCUCUUCUUCUUCUCUUCUU
2023/06/05 13:50:34 INFO: Syncing 1565 entries with HASSIO from queryDeviceList.
U-CUU—U–UU-CU-CUCU-CUU–U-------CU-UUUCUUUUCUCUCUUUU-U–U–UCUUUUCU–CUUUU—UUUCUCU–CUUCUCU-CU-CU-UCUCUUU-CU–CUCU–UUCU-CUUUCUCUCUUUCUCU-U-CUU–UCU-UUU–UUUU-UU-U-UUUUCU-CUCU-CUU-UUCUUCU-U-CU-U----CUUUUCU-CUCUCUU-
2023/06/05 13:50:34 INFO: Syncing 148 entries with HASSIO from getPsList.
UCUUUUCUUCUUCUUUUUUUUUUCUUUUUUUUCUCUUUU?UUUUUUUUUUUUUUUUCUCUUUUCUUU?CUUUUUUUUUUUU?UUUUUCUUCUUUUUUUUUUCUUUUCUUUUUUUUUCUUU?UUUUCUCUUUCUCUUCUUCUUUUUUCUCUCUUUUUUUCUU?UCUUUUUUCUUUUU

But I can’t get the PS Id on the terminal - there is no command. Also it seems, I can’t see the configuration file from GoSunGrow and as a result, I can’t see no entities from this addon.

What is wrong in my config? Could you provide a tutorial for the graphical integration of the addon?

Thanks!!!

Hi MickMake,
I have downloaded your repository and I was able to connect with my Sungrow.
I was thinking to build some graphical page using Grafana but before to do it I would like to try to use your graphical templates.
Should I copy your three files (Basic, Graphs and Stats yaml files) somewhere in my Hassio?
Thanks for your support

I have the same issue, did you manage to fix this?

Hi @Double-MME,
I have the same problem. Have you been able to solve it.
Any help appreciated.

So i have tried multiple things with mqtt user including hass.io, local ip but none of it seems to work. I am attaching the error log of the add on as well as config page snapshot.

Token File: /data/.GoSungrow/AppService_login.json
2023/05/24 09:33:00 INFO: Found SunGrow 2 devices
2023/05/24 09:33:00 Option[homeassistant/select/GoSungrow/GoSungrow-option-mqtt_debug/cmd] set to ‘enabled’
2023/05/24 09:33:00 MQTT[homeassistant/select/GoSungrow/GoSungrow-option-loglevel/state] → info
2023/05/24 09:33:00 INFO: Option[loglevel] set to ‘debug’
2023/05/24 09:33:00 MQTT[homeassistant/select/GoSungrow/GoSungrow-option-fetchschedule/config] → {“command_template”:“{{ value }}”,“command_topic”:“homeassistant/select/GoSungrow/GoSungrow-option-fetchschedule/cmd”,“device”:{“connections”:[[“GoSungrow”,“GoSungrow-options”],[“GoSungrow-options”,“GoSungrow”]],“identifiers”:[“GoSungrow”],“manufacturer”:“GoSungrow”,“model”:“GoSungrow”,“name”:“GoSungrow options - Options”,“suggested_area”:“GoSungrow”,“sw_version”:“GoSungrow https://github.com/MickMake/GoSungrow",“via_device”:“GoSungrow”},“enabled_by_default”:true,“encoding”:“utf-8”,“icon”:“mdi:format-list-group”,“name”:"GoSungrow Option Fetch Schedule”,“object_id”:“GoSungrow-option-fetchschedule”,“options”:[“2m”,“3m”,“4m”,“5m”,“6m”,“7m”,“8m”,“9m”,“10m”],“retain”:true,“state_topic”:“homeassistant/select/GoSungrow/GoSungrow-option-fetchschedule/state”,“unique_id”:“GoSungrow-option-fetchschedule”,“value_template”:“{{ value }}”}
2023/05/24 09:33:00 MQTT[homeassistant/select/GoSungrow/GoSungrow-option-loglevel/state] → debug
2023/05/24 09:33:01 MQTT[homeassistant/select/GoSungrow/GoSungrow-option-fetchschedule/state] → 5m
2023/05/24 09:33:01 MQTT[homeassistant/select/GoSungrow/GoSungrow-option-sleepdelay/config] → {“command_template”:“{{ value }}”,“command_topic”:“homeassistant/select/GoSungrow/GoSungrow-option-sleepdelay/cmd”,“device”:{“connections”:[[“GoSungrow”,“GoSungrow-options”],[“GoSungrow-options”,“GoSungrow”]],“identifiers”:[“GoSungrow”],“manufacturer”:“GoSungrow”,“model”:“GoSungrow”,“name”:“GoSungrow options - Options”,“suggested_area”:“GoSungrow”,“sw_version”:“GoSungrow https://github.com/MickMake/GoSungrow",“via_device”:“GoSungrow”},“enabled_by_default”:true,“encoding”:“utf-8”,“icon”:“mdi:format-list-group”,“name”:"GoSungrow Option Sleep Delay After Schedule”,“object_id”:“GoSungrow-option-sleepdelay”,“options”:[“0s”,“10s”,“20s”,“30s”,“40s”,“50s”,“60s”],“retain”:true,“state_topic”:“homeassistant/select/GoSungrow/GoSungrow-option-sleepdelay/state”,“unique_id”:“GoSungrow-option-sleepdelay”,“value_template”:“{{ value }}”}
2023/05/24 09:33:01 MQTT[homeassistant/select/GoSungrow/GoSungrow-option-sleepdelay/state] → 40s
2023/05/24 09:33:01 MQTT[homeassistant/select/GoSungrow/GoSungrow-option-servicestate/config] → {“command_template”:“{{ value }}”,“command_topic”:“homeassistant/select/GoSungrow/GoSungrow-option-servicestate/cmd”,“device”:{“connections”:[[“GoSungrow”,“GoSungrow-options”],[“GoSungrow-options”,“GoSungrow”]],“identifiers”:[“GoSungrow”],“manufacturer”:“GoSungrow”,“model”:“GoSungrow”,“name”:“GoSungrow options - Options”,“suggested_area”:“GoSungrow”,“sw_version”:“GoSungrow https://github.com/MickMake/GoSungrow",“via_device”:“GoSungrow”},“enabled_by_default”:true,“encoding”:“utf-8”,“icon”:“mdi:format-list-group”,“name”:"GoSungrow Option Service State”,“object_id”:“GoSungrow-option-servicestate”,“options”:[“Run”,“Restart”,“Stop”],“retain”:true,“state_topic”:“homeassistant/select/GoSungrow/GoSungrow-option-servicestate/state”,“unique_id”:“GoSungrow-option-servicestate”,“value_template”:“{{ value }}”}
2023/05/24 09:33:01 MQTT[homeassistant/select/GoSungrow/GoSungrow-option-servicestate/state] → Run
2023/05/24 09:33:01 INFO: Caching Sungrow metadata…
2023/05/24 09:33:01 INFO: Cached 687 Sungrow data points…
PsId: required
JSON request: {“ps_id”:1151610}
2023/05/24 09:33:02 ERROR: strconv.Atoi: parsing “1446478_1446479”: invalid syntax
Error: strconv.Atoi: parsing “1446478_1446479”: invalid syntax
Usage:
GoSungrow mqtt run [flags]
Aliases:
run,
Examples:
GoSungrow mqtt run
Flags: Use “GoSungrow help flags” for more info.
Additional help topics:
ERROR: strconv.Atoi: parsing “1446478_1446479”: invalid syntax
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped

Where am I wrong?

Hi all, also trying desperately to get this to work for automations but getting error “Can’t find DeviceType 43 attached to ps_id xxxxxx”. Ps list command shows I only have device types 14 & 22 but I also have a battery that doesn’t show up separately for some reason. I’m really just wanting the feed in stats to show up as an step in my automations but can’t get anything to appear in HA due to this error by the looks of it.