GoSungrow icon indicating copy to clipboard operation
GoSungrow copied to clipboard

Is this still working?

Open BlueScreenTT opened this issue 10 months ago • 40 comments

Hi

I see that all the pictures are from the "old" interface from Sungrow is this still working with the new version they have released "isolarcloud"

also i can not find anywhere to download the api key

\Thomas

BlueScreenTT avatar Apr 24 '24 05:04 BlueScreenTT

I see that all the pictures are from the "old" interface from Sungrow

Firstly, the owner/maintainer of this repository (@MickMake) has not been active since 2023 so that explains why nothing on the repository has changed recently. I do not know why MickMake has not been active. I also have no knowledge of when, or if, that situation is likely to change. If anyone else has any insights into this, they have yet to share their knowledge. We're all in the dark.

Secondly, although the foregoing explains why the first two images have not been updated, to the best of my knowledge the remaining images are the product of GoSungrow and Home Assistant, so there would seem to be no good reason why those would be affected by changes to the iSolarCloud app UI.

is this still working with the new version they have released "isolarcloud"

GoSungrow still works. Some people report problems such as you'll see being explored in #111. The working hypothesis at the moment is that the people having trouble are more likely to have either multiple inverters, or have replaced an inverter and their existing iSolarCloud account holds both historical and current data. A comment on issue 111 earlier today reported success deleting bogus plant data.

I have no idea about the relative proportions of users who have no trouble with GoSungrow in its current form, vs those who can't get it to work. I'm in the former group.

also i can not find anywhere to download the api key

Please read this gist. At least one of the four use cases summarised at the top probably covers what you want to do. The gist includes the new API key (B0455FBE7AA0328DB57B59AA729F05D8).

Someone else also posted a comment to issue 101 which included ANDROIDE13EC118BD7892FE7AB5A3F20 and said it worked.

I'm using the B0… key. I have not tested the ANDROID… key.


A lot of what is in the gist I mentioned above may seem overly-complicated at first glance and it probably is. However, it's the product of what various contributors have the skills, time and willingness to do.

In an ideal world we (the community of users) would know what is behind MickMake's inactivity and then be in a better position to decide whether to fork the repository. But that would also depend on someone wanting to step up and take ownership of processing pull requests, debugging problems, building release artifacts, distributing Docker images for Home Assistant, and so on. That's a big commitment and nobody has yet put up his/her hand to accept that responsibility.

In short, the situation now is the best we can do.

Paraphraser avatar Apr 24 '24 07:04 Paraphraser

Thank you for the answer :-)

biggest problem now is to get the API key

cant get in contact with the right people that can actually send it to me from Sungrow :-/

ill test to get it working when i finally get the key \Thomas

Den ons. 24. apr. 2024 kl. 09.22 skrev Phill @.***>:

I see that all the pictures are from the "old" interface from Sungrow

Firstly, the owner/maintainer of this repository @.*** https://github.com/MickMake) has not been active since 2023 so that explains why nothing on the repository has changed recently. I do not know why MickMake has not been active. I also have no knowledge of when, or if, that situation is likely to change. If anyone else has any insights into this, they have yet to share their knowledge. We're all in the dark.

Secondly, although the foregoing explains why the first two images have not been updated, to the best of my knowledge the remaining images are the product of GoSungrow and Home Assistant, so there would seem to be no good reason why those would be affected by changes to the iSolarCloud app UI.

is this still working with the new version they have released "isolarcloud"

GoSungrow still works. Some people report problems such as you'll see being explored in #111 https://github.com/MickMake/GoSungrow/issues/111. The working hypothesis at the moment is that the people having trouble are more likely to have either multiple inverters, or have replaced an inverter and their existing iSolarCloud account holds both historical and current data. A comment on issue 111 https://github.com/MickMake/GoSungrow/issues/111#issuecomment-2073954461 earlier today reported success deleting bogus plant data.

I have no idea about the relative proportions of users who have no trouble with GoSungrow in its current form, vs those who can't get it to work. I'm in the former group.

also i can not find anywhere to download the api key

Please read this gist https://gist.github.com/Paraphraser/cad3b0aa6428c58ee87bc835ac12ed37. At least one of the four use cases summarised at the top probably covers what you want to do. The gist includes the new API key ( B0455FBE7AA0328DB57B59AA729F05D8).

Someone else also posted a comment to issue 101 https://github.com/MickMake/GoSungrow/issues/101#issuecomment-2072929491 which included ANDROIDE13EC118BD7892FE7AB5A3F20 and said it worked.

I'm using the B0… key. I have not tested the ANDROID… key.

A lot of what is in the gist I mentioned above may seem overly-complicated at first glance and it probably is. However, it's the product of what various contributors have the skills, time and willingness to do.

In an ideal world we (the community of users) would know what is behind MickMake's inactivity and then be in a better position to decide whether to fork the repository. But that would also depend on someone wanting to step up and take ownership of processing pull requests, debugging problems, building release artifacts, distributing Docker images for Home Assistant, and so on. That's a big commitment and nobody has yet put up his/her hand to accept that responsibility.

In short, the situation now is the best we can do.

— Reply to this email directly, view it on GitHub https://github.com/MickMake/GoSungrow/issues/112#issuecomment-2074251183, or unsubscribe https://github.com/notifications/unsubscribe-auth/AVMLI3ZTMCABG5FSRHNXRMLY65MSBAVCNFSM6AAAAABGWHLDRWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANZUGI2TCMJYGM . You are receiving this because you authored the thread.Message ID: @.***>

BlueScreenTT avatar Apr 25 '24 14:04 BlueScreenTT

The API key is B0455FBE7AA0328DB57B59AA729F05D8.

As I said, it's in the gist.

Paraphraser avatar Apr 25 '24 14:04 Paraphraser

Yes i see :-). Still dont work. Will not connect.:-/

BlueScreenTT avatar Apr 25 '24 14:04 BlueScreenTT

You are going to have to provide more information.

How are you trying to run GoSungrow? Are you doing it as the "add-on" in Home Assistant, or are you running the standalone binary?

If you are using the add-on, have you followed Part 2 of the gist? What do you see in the log inside Home Assistant?

If you are running it standalone, what is it saying when you try to run it? Did you recompile it yourself (gist part 1) or did you download a patched binary (gist part 3)?

Either way it's a good idea to sanitise your email address, iSolarCloud username and password before you post anything here. And, when you post log messages here, please remember to put the text inside triple-back-ticks (known as "code fences"), like this:

``` your log lines here ```

Putting stuff between triple-back-ticks means it appears "as is" and doesn't wrap the lines of text. It makes it much easier for someone else (like me) to see what is going on.

Paraphraser avatar Apr 25 '24 23:04 Paraphraser

So

yes i use the "plugin" in HomeAssistant.

i get the error

[07:17:32] INFO: Login to iSolarCloud using gateway https://augateway.isolarcloud.eu
Error: API httpResponse is 404 Not Found
Usage:
  GoSungrow api login [flags]

Examples:
	GoSungrow api login  


Flags: Use "GoSungrow help flags" for more info.

Additional help topics:

ERROR: API httpResponse is 404 Not Found
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

i have also tried with the .com adr then i get error

[07:33:16] INFO: Login to iSolarCloud using gateway https://augateway.isolarcloud.com ...
Error: unknown error 'Request is not encrypted'
Usage:
  GoSungrow api login [flags]

Examples:
	GoSungrow api login  


Flags: Use "GoSungrow help flags" for more info.

Additional help topics:

ERROR: unknown error 'Request is not encrypted'
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

so there is more life in the .com but i cant get rid of the "secure" error

problem is that i am running on the european server. i cant even login on the international server online so the thought was to use the .EU but yes it dont seem to exist

\Thomas

BlueScreenTT avatar Apr 26 '24 07:04 BlueScreenTT

Assuming you're in the EU, you need to set the gateway to:

https://gateway.isolarcloud.eu/

Compare the correct URL (above) with the incorrect URL you have been using, below:

https://augateway.isolarcloud.eu/

I am pretty sure it's that "au" after the "//" that is your problem.

I only know of two valid URLs. There's the EU one above and https://augateway.isolarcloud.com/ which is the default and is also the one I use myself. There may be other URLs for other parts of the world but I don't know what they are.

Paraphraser avatar Apr 26 '24 09:04 Paraphraser

yes it tries to connect but same problem. "Request is not encrypted" :-(

[09:39:37] INFO: Login to iSolarCloud using gateway https://gateway.isolarcloud.eu ...
Error: unknown error 'Request is not encrypted'
Usage:
  GoSungrow api login [flags]

Examples:
	GoSungrow api login  


Flags: Use "GoSungrow help flags" for more info.

Additional help topics:

ERROR: unknown error 'Request is not encrypted'
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

f....

i give up :-( ill just use the app

BlueScreenTT avatar Apr 26 '24 09:04 BlueScreenTT

"Request is not encrypted" is the direct result of not having performed all of the steps in gist part 2.

If you firmly believe you have done that then, please do this:

  1. Connect to Home Assistant.
  2. Go into the Advanced SSH & Web Terminal.
  3. Type the command:
docker images

Paste the output into your reply between triple-back-ticks.

Paraphraser avatar Apr 26 '24 09:04 Paraphraser

Ill try again. Might have gotten something wrong following the guide

Den fre 26 apr. 2024 11:55Phill @.***> skrev:

"Request is not encrypted" is the direct result of not having performed all of the steps in gist part 2 https://gist.github.com/Paraphraser/cad3b0aa6428c58ee87bc835ac12ed37#encryptionhack .

If you firmly believe you have done that then, please do this:

  1. Connect to Home Assistant.
  2. Go into the Advanced SSH & Web Terminal.
  3. Type the command:

docker images

Paste the output into your reply between triple-back-ticks.

— Reply to this email directly, view it on GitHub https://github.com/MickMake/GoSungrow/issues/112#issuecomment-2079043657, or unsubscribe https://github.com/notifications/unsubscribe-auth/AVMLI34WIAEYOXV2VVEO2DDY7IQCBAVCNFSM6AAAAABGWHLDRWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANZZGA2DGNRVG4 . You are receiving this because you authored the thread.Message ID: @.***>

BlueScreenTT avatar Apr 26 '24 10:04 BlueScreenTT

yeah so i might have messed up something last time. now i get a different error

Sungrow API EndPoint not yet implemented

[11:08:11] INFO: Login to iSolarCloud using gateway  https://gateway.isolarcloud.eu ...
Sungrow API EndPoint not yet implemented
Error: Sungrow API EndPoint not yet implemented
Usage:
  GoSungrow api login [flags]

Examples:
	GoSungrow api login  


Flags: Use "GoSungrow help flags" for more info.

Additional help topics:

ERROR: Sungrow API EndPoint not yet implemented
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

BlueScreenTT avatar Apr 28 '24 11:04 BlueScreenTT

WT.....

after 5 restarts and trying different options on the server connection it suddently connected ! ??

i have no idea what i did

-+
[11:20:56] INFO: Login to iSolarCloud using gateway https://gateway.isolarcloud.eu ...
Email:	xxxxxxx
Create Date:	Wed Mar 13 21:09:35 CST 2024
Login Last Date:	2024-04-28 19:20:56
Login Last IP:	
Login State:	1
User Account:	xxxxxx
User Id:	xxxxxx
User Name:	xxxxxx
Is Online:	false
Token:	xxxxxxxxxx
Token File:	/data/.GoSungrow/AppService_login.json
[11:20:56] INFO: Syncing data from gateway https://gateway.isolarcloud.eu ...
2024/04/28 11:20:56 INFO: Connecting to MQTT HASSIO Service...
2024/04/28 11:20:56 INFO: Connecting to SunGrow...
2024/04/28 11:20:57 INFO: Found SunGrow 3 devices
2024/04/28 11:20:57 INFO: Caching Sungrow metadata...
2024/04/28 11:20:57 INFO: Cached 441 Sungrow data points...
2024/04/28 11:20:58 INFO: Syncing 244 entries with HASSIO from getPsDetail.
CUCUCUCUCUCUCUCUCUCUCU?CUCU?CU?CUCUCUCUCUCUCUCU?CUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCU?CU?CUCUCUCUCUCUCUCU?CUCUCUCUCUCUCUCU?CUCUCUCUCUCUCU?CUCUCUCUCU?CUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCU??CUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCU?CUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCU?CUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCU??CUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCU?CUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCU?CUCUCUCUCUCUCUCUCUCU?CUCUCUCUCUCUCUCUCUCUCU?CUCUCUCUCU
2024/04/28 11:20:58 INFO: Syncing 2436 entries with HASSIO from queryDeviceList.
2024/04/28 11:20:58 INFO: Syncing 148 entries with HASSIO from getPsList.
CU-CUCUCU--CU-CUCUCU---CU---CUCUCUCUCUCUCUCUCUCUCUCUCUCUCU--CU-CU-CU--CU----CUCU-CUCU--CUCUCUCUCUCUCU-CUCU-CU-----CUCU-CUCUCU-CU-CUCU--CUCU-CUCUCU-CUCU---CU-CUCUCU--CUCUCUCUCU---CU---CU-CUCUCU-CUCU--CU-CUCUCUCUCUCUCUCU-CUCUCUCUCU-CUCUCUCU-CU--CUCU--CUCU--CUCUCUCUCUCUCU-CU-CUCUCUCUCUCU--CU---CU-CUCU---CUCUCU---CUCU---CUCU--CUCUCU-CUCU-CUCUCUCU-CU-CU-CU--CU---CUCU-CU-CU---CU-CUCUCUCU-CUCUCUCUCU-CUCU-
CU?CUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCU?CU?CUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCU?CUCUCUCUCUCUCUCUCUCUCUCUCU?CUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCU
2024/04/28 11:20:58 INFO: Starting ticker...
2024/04/28 11:20:58 INFO: Fetch Schedule: 5m
2024/04/28 11:20:58 INFO: Sleep Delay:    40s

BlueScreenTT avatar Apr 28 '24 11:04 BlueScreenTT

A couple of people have reported "EndPoint not yet implemented". See #19 and this gist comment.

The following search suggests the message is probably coming from GoSungrow rather than iSolarCloud:

$ git grep "EndPoint not yet implemented"
iSolarCloud/api/web.go: w.Error = errors.New("Sungrow API EndPoint not yet implemented")

At a guess, it likely means the iSolarCloud API has returned an endpoint (a metric) that GoSungrow doesn't know how to handle.

As to why it has gone away, your guess is as good as mine. The lack of ongoing complaints in those two hits I mentioned above suggests it is transient rather than persistent.

Will it come back? No idea. However, if it does, I will only be able to give you the same answer which boils down to "no idea".

Sorry I can't be more help.

Paraphraser avatar Apr 28 '24 11:04 Paraphraser

And again..

Hello @ALL !

use GoSungrow config write --appkey ANDROIDE13EC118BD7892FE7AB5A3F20 and it works ;-)

Greetings :)

Sn0w3y avatar Apr 30 '24 13:04 Sn0w3y

And again..

Hello @ALL !

use GoSungrow config write --appkey ANDROIDE13EC118BD7892FE7AB5A3F20 and it works ;-)

Greetings :)

That was the solution for me!!! Thanks a lot!!!

jangoetz avatar May 01 '24 15:05 jangoetz

I had done the docker image swap fix a few months back. After the Home Assistant Supervisor 2024.04.4 update the GoSungrow add-on stopped working. I realized the original 3.0.7 docker image had been reloaded and the replacement one was not being used anymore. So, without knowing much about docker images, I removed the triamazikamno image and the backup one, then followed the instructions/part 2 again. After that GoSungrow is working again.

And for the record, I'm using the key B0455FBE7AA0328DB57B59AA729F05D8 with the .eu server.

stniemin avatar May 01 '24 18:05 stniemin

Hmmm. So now we have @stniemin giving us a classic case of the exception proving the rule. My hypothesis of a 1:1 relationship between an AppKey and an iSolarCloud server goes straight out the window.

There must be another explanation.

Every time I look at the ANDROID key, I wonder why it has that prefix?

New hypothesis: There is a relationship between the AppKey each person needs to use and the platform that person employed when first setting up the iSolarCloud account (or, perhaps, registering the most-recent inverter).

In my own case, after my (first and only) Sungrow inverter was set up, I used the iSolarCloud app on my iPad to do all the setup steps. In other words, I used iOS (or, if you're an Apple purist, iPadOS) and the B0455 key works for me.

What's the story with anyone (eg @jangoetz @Sn0w3y @grechi-diego) who has found they need to use the ANDROID key? Did you set things up on an Android device?

Paraphraser avatar May 02 '24 00:05 Paraphraser

Hmmm. So now we have @stniemin giving us a classic case of the exception proving the rule. My hypothesis of a 1:1 relationship between an AppKey and an iSolarCloud server goes straight out the window.

There must be another explanation.

Every time I look at the ANDROID key, I wonder why it has that prefix?

New hypothesis: There is a relationship between the AppKey each person needs to use and the platform that person employed when first setting up the iSolarCloud account (or, perhaps, registering the most-recent inverter).

In my own case, after my (first and only) Sungrow inverter was set up, I used the iSolarCloud app on my iPad to do all the setup steps. In other words, I used iOS (or, if you're an Apple purist, iPadOS) and the B0455 key works for me.

What's the story with anyone (eg @jangoetz @Sn0w3y @grechi-diego) who has found they need to use the ANDROID key? Did you set things up on an Android device?

I can confirm that I did my first Setup on an Android device... But before yesterday, everything worked well with the "B0455" Appkey.

jangoetz avatar May 02 '24 04:05 jangoetz

i used https://gateway.isolarcloud.eu and B0455FBE7AA0328DB57B59AA729F05D8

all still working :-) even after a couple of reboots of my HA installation

BlueScreenTT avatar May 02 '24 07:05 BlueScreenTT

@BlueScreenTT and did you do your original setup with an iOS device or an Android device?

Paraphraser avatar May 02 '24 10:05 Paraphraser

So. i have my own account made from the web but i access the app via Android.

The Electrician responsible for the installation did the config in his app on an Android Phone and then shared the installation with me. So Android almost all the way

BlueScreenTT avatar May 02 '24 10:05 BlueScreenTT

L'ho configurato con un dispositivo Android

Il gio 2 mag 2024, 12:17 Phill @.***> ha scritto:

@BlueScreenTT https://github.com/BlueScreenTT and did you do your original setup with an iOS device or an Android device?

— Reply to this email directly, view it on GitHub https://github.com/MickMake/GoSungrow/issues/112#issuecomment-2090100685, or unsubscribe https://github.com/notifications/unsubscribe-auth/AO6MNOFJ7DISX2JP4TIZUATZAIHFBAVCNFSM6AAAAABGWHLDRWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJQGEYDANRYGU . You are receiving this because you were mentioned.Message ID: @.***>

grechi-diego avatar May 02 '24 10:05 grechi-diego

Hmmm. So now we have @stniemin giving us a classic case of the exception proving the rule. My hypothesis of a 1:1 relationship between an AppKey and an iSolarCloud server goes straight out the window.

There must be another explanation.

Every time I look at the ANDROID key, I wonder why it has that prefix?

New hypothesis: There is a relationship between the AppKey each person needs to use and the platform that person employed when first setting up the iSolarCloud account (or, perhaps, registering the most-recent inverter).

In my own case, after my (first and only) Sungrow inverter was set up, I used the iSolarCloud app on my iPad to do all the setup steps. In other words, I used iOS (or, if you're an Apple purist, iPadOS) and the B0455 key works for me.

What's the story with anyone (eg @jangoetz @Sn0w3y @grechi-diego) who has found they need to use the ANDROID key? Did you set things up on an Android device?

To throw a further spanner into the hypothesis works: I set up my iSolarCloud environment originally with my iPhone, and have never involved an Android device in the process. However, I've just returned to tinkering with this after a while of leaving it be, and in reading through solutions for the API error I've tested the ANDROID api with the augateway.isolarcloud.com host, and it successfully connects. So I'm totally not sure what significance that name has to the end user. Maybe it was involved in the creation of the api at the other end?

TheAussieTim avatar Jun 03 '24 02:06 TheAussieTim

Hey @Paraphraser

Your comments are really cool, and I envy how much u understand. these also show me how out of depth I am. But I do have a question. I have tried installing GoSungrow api on my HA and while install went ok. It crashes and I get error ….

Error: unknown error 'Missing parameter in request header: x-access-key'

I do have proper info from my contacts at sungrow who prepared all details codes and keys and created an API account… but there is nowhere to put in the missing code. How can this be added?

I am totally new to json and did some however little digging in my ssh but cannot seem to find config.json either.

Any pointers? Advice? Help? Would it be possible to discuss trying to add config.json and necessary directory entries to get it to start?

Being upfront… I am super fresh to json config so please do not hate my questions.... I just need little bit of help from someone who knows programming...

I hope once I can get GoSungrow configured I can get it to connect.

And thank u for any kind of reply in advance. Sincerely.

gosungrow_x_access_key

Raf

RafAustralia avatar Aug 23 '24 08:08 RafAustralia

@RafAustralia

I don't think I've seen that error before. I have no idea what it means. I have tried mucking-up my own settings but I can't replicate that problem.

Are you sure you followed all the steps in Gist Part 2?

There has been at least one example where someone eventually found that, although s/he believed the gist steps had been performed correctly, starting over from the beginning solved the problem. Perhaps you could give that a whirl.

I'm no HA expert but my understanding of the way it works is that HA encodes the contents of the configuration tab (YAML) into JSON and passes that to the GoSungrow container when it launches. Inside the container, a startup script parses the JSON and sets up a bunch of environment variables. Then it calls GoSungrow config write which takes the environment variables and generates a config.json. All of this is dynamic and occurs every time the add-on starts. It is that dynamically-generated and non-persistent config.json which is used by GoSungrow (the process) as it goes through the login process and begins fetching data.

This differs from the situation where you compile GoSungrow yourself as a standalone application. I don't know what happens on Windows but on macOS and Linux, you call GoSungrow and pass it various configuration parameters which are then written into:

~/.GoSungrow/config.json

Thereafter, calling GoSungrow api login or other commands reads that file to retrieve credentials. In other words, config.json is something you really only see as a permanent file (which you could actually edit) when you are running GoSungrow standalone.

You can't do any of that when it's running in a Docker container as an add-on for HA.

If you actually want to check the results of the HA startup process (from "Configuration" tab to what GoSungrow (the process running inside the Docker container) actually uses when it starts up, you can do it like this:

  1. Get into the advanced SSH terminal (as per the gist).

  2. Run the docker ps command. You'll see a list of running containers and one of those will contain "gosungrow" in its name. You need the "CONTAINER ID" from that line. It'll be something like "0fab5d5ff74d".

  3. Use the container ID like this:

    $ docker exec 0fab5d5ff74d cat /data/options.json /data/.GoSungrow/config.json
    

If anything is getting "hosed" between the "Configuration" tab and the options.json, you should be able to spot it in the first part of the output; if it's being misinterpreted between options and getting into config.json it will show up in the second part of the output.

I seem to recall that at least one person has run into trouble by using a password that contained characters that didn't survive this double-translation process so maybe that's your problem too.

I hope that all makes sense.

Why is it all so complicated? No idea. Leaving HA to one side, the pattern of passing configuration parameters into Docker containers using environment variables is fairly well-established. It's actually one of the "signatures" of a well-behaved container. Less-well-behaved containers expect you to create config files beforehand, or expect you to run them once so they can set up defaults which you then tweak. In my experience, the GoSungrow container is a bit unique in taking one JSON file, parsing it to environment vars, then re-interpreting back to another JSON file. But maybe that's a common pattern for HA add-ons. Who knows...

Paraphraser avatar Aug 24 '24 07:08 Paraphraser

Hey Phill

Thank you ever so kindly. For responding first and foremost. That in itself is already fantastic. So lets start with a thank you.

My level of code knowledge is way below what you explained. I just started 3 months ago. Fast learner with yaml coded my own version of modbus integration for double inverter but beyond that…. Im just too out of depth.

My downfall is knowledge of ssh commands or lack of there of…

I will explain where I am at.

With the user access key given by you in your explanation notes I can replicate your error request is not encrypted. So its kind of step in right direction. Note here clock date is out of whack. Not sure why. Will come back to that.

That means this access code must have already embossed x-access-key into its root code since its not asking for one.

Normal case of API would require access key, x access code. Rsa possibly. So if I try to use my access key it is obviously asking for one. Cos it doesnt recognise it.

Sungrow team was at my place just month ago. They sent me a proper api access with all credentials. So my gut tells me if only I could get to the file which contains all the 4-5 code lines to enter I would simply connect - thats my logic.

Now. I tried to read through your github explanations. I just found it yesterday. It is so complex. To me. But Im reading. Trying. And I will keep trying.

I downloaded git on my HA. Tried to find wget. Couldnt. Not quite sure how to configure it. Yet I tried manually enter commands to advanced ssh. Typing in the commands as per git but it just returns no such directory or other errors.

U are a coder. Im not. So I guess fore me Im missing the core knowledge to sort this out. I understand your process but just not sure how to get there myself.

I sort of edited my own version of config.json in visual studio - and have it validated online…. Could be a go if only I knew where or how to get it into the right place or how to bring up and replace the files I need.

Im super excited u said hi. Again thank u. Means a lot! Ill keep trying but it will be impossibly dauntingly gruesome slow process.

Ill be in front of a laptop later tonight and will put in some more effort.

Fun with HA hey?

🙏🏼❤️🙏🏼

Raf Sent from Nam Concept’s iPhone

On 24 Aug 2024, at 5:48 PM, Phill @.***> wrote:



@RafAustraliahttps://github.com/RafAustralia

I don't think I've seen that error before. I have no idea what it means. I have tried mucking-up my own settings but I can't replicate that problem.

Are you sure you followed all the steps in Gist Part 2https://gist.github.com/Paraphraser/cad3b0aa6428c58ee87bc835ac12ed37#encryptionhack?

There has been at least one example where someone eventually found that, although s/he believed the gist steps had been performed correctly, starting over from the beginning solved the problem. Perhaps you could give that a whirl.

I'm no HA expert but my understanding of the way it works is that HA encodes the contents of the configuration tab (YAML) into JSON and passes that to the GoSungrow container when it launches. Inside the container, a startup script parses the JSON and sets up a bunch of environment variables. Then it calls GoSungrow config write which takes the environment variables and generates a config.json. All of this is dynamic and occurs every time the add-on starts. It is that dynamically-generated and non-persistent config.json which is used by GoSungrow (the process) as it goes through the login process and begins fetching data.

This differs from the situation where you compile GoSungrow yourself as a standalone application. I don't know what happens on Windows but on macOS and Linux, you call GoSungrow and pass it various configuration parameters which are then written into:

~/.GoSungrow/config.json

Thereafter, calling GoSungrow api login or other commands reads that file to retrieve credentials. In other words, config.json is something you really only see as a permanent file (which you could actually edit) when you are running GoSungrow standalone.

You can't do any of that when it's running in a Docker container as an add-on for HA.

If you actually want to check the results of the HA startup process (from "Configuration" tab to what GoSungrow (the process running inside the Docker container) actually uses when it starts up, you can do it like this:

  1. Get into the advanced SSH terminal (as per the gist).

  2. Run the docker ps command. You'll see a list of running containers and one of those will contain "gosungrow" in its name. You need the "CONTAINER ID" from that line. It'll be something like "0fab5d5ff74d".

  3. Use the container ID like this:

$ docker exec 0fab5d5ff74d cat /data/options.json /data/.GoSungrow/config.json

If anything is getting "hosed" between the "Configuration" tab and the options.json, you should be able to spot it in the first part of the output; if it's being misinterpreted between options and getting into config.json it will show up in the second part of the output.

I seem to recall that at least one person has run into trouble by using a password that contained characters that didn't survive this double-translation process so maybe that's your problem too.

I hope that all makes sense.

Why is it all so complicated? No idea. Leaving HA to one side, the pattern of passing configuration parameters into Docker containers using environment variables is fairly well-established. It's actually one of the "signatures" of a well-behaved container. Less-well-behaved containers expect you to create config files beforehand, or expect you to run them once so they can set up defaults which you then tweak. In my experience, the GoSungrow container is a bit unique in taking one JSON file, parsing it to environment vars, then re-interpreting back to another JSON file. But maybe that's a common pattern for HA add-ons. Who knows...

— Reply to this email directly, view it on GitHubhttps://github.com/MickMake/GoSungrow/issues/112#issuecomment-2308177667, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BIGQNNDGMZMPYYPDGB54OBTZTA3ERAVCNFSM6AAAAABGWHLDRWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMBYGE3TONRWG4. You are receiving this because you were mentioned.Message ID: @.***>

RafAustralia avatar Aug 24 '24 08:08 RafAustralia

@RafAustralia

Have you installed the Advanced SSH & Web Terminal? If not, please do that.

Have you gone to the "Info" tab of Advanced SSH & Web Terminal and:

  1. enabled "Show in sidebar"?
  2. disabled "Protection mode"?

If not, please do that.

Now you should see "Terminal" in the side-bar. When you click it, you will have a terminal window.

This is the same as connecting using an SSH client (ssh on macOS and Linux, something like Putty on Windows). You can do everything you need to do using the Terminal window so you don't actually have to worry about SSH.

Now, "request not encrypted" is pretty much the signature of not having followed all the steps in Part 2 of the gist.

So, let's see what's what.

In the terminal window, please run these commands:

$ docker ps
$ docker images

To be clear, the $ is a convention which means "type the remainder of this command and press return (or "enter" if that's what's written on your keyboard). The first command is just docker ps - right?

You should get something like this:

~ $ docker ps | grep gosungrow
0fab5d5ff74d   ba22da74/amd64-addon-gosungrow:3.0.7                       "/init /usr/local/bi…"   7 hours ago     Up 7 hours                                                                                                                                  addon_ba22da74_gosungrow
~ $ docker images | grep gosungrow
triamazikamno/amd64-addon-gosungrow               3.0.7          f2cbc9418287   8 months ago    161MB
ba22da74/amd64-addon-gosungrow                    3.0.7          f2cbc9418287   8 months ago    161MB
ba22da74/amd64-addon-gosungrow                    3.0.7-backup   2f8714749ba2   11 months ago   161MB

I want you to copy the answers that come back from running those commands and paste those lines into your reply.

You should do it like this. First, a line of triple back-ticks (the back-tick is usually to the left of the "1" on the top row of your keyboard):

```

then you paste your material here, then another line of back-ticks

```

This is known as a "code fence" and it stops GitHub from interpreting everything as running paragraphs.

Now, as to your other points. If you're trying to install tools like git and wget then you're following Part 1 of the gist.

Part 1 of the gist is for compiling GoSungrow to run anywhere except in Home Assistant.

You've said you want to work in Home Assistant. That means you need to follow Part 2 of the gist. Part 1 is irrelevant.

There's nothing stopping you from doing both, providing you actually want to be able to run GoSungrow from both the command line and in Home Assistant. You just need to keep your objectives straight in your mind.

Perhaps, just for now, concentrate on HA. That means focusing on Part 2 and ignoring Parts 1, 3 and 4.

Paraphraser avatar Aug 24 '24 11:08 Paraphraser

Hey Phill

Thank you again…

Yes my SSH is working totally and fully – always has been – I just do not use it much. It is running properly… no issues. Protection mode is disabled.

@.***

But when I type $ docker ps I get the following:

@.*** It says - command not found.

That’s why I said it confuses me as it almost seems the directories are not there…

Maybe and just maybe it did not install fully?

Raf

RafAustralia avatar Aug 24 '24 11:08 RafAustralia

Hey

Running $ docker images however returns the following: image

Raf

This e-mail message may contain confidential or legally privileged information and is intended only for the use of the intended recipient(s). Any unauthorized disclosure, dissemination, distribution, copying or the taking of any action in reliance on the information herein is prohibited. E-mails are not secure and cannot be guaranteed to be error free as they can be intercepted, amended, or contain viruses. Anyone who communicates with us by e-mail is deemed to have accepted these risks. NAM Concept is not responsible for errors or omissions in this message and denies any responsibility for any damage arising from the use of e-mail. Any opinion and other statement contained in this message and any attachment are solely those of the author and do not necessarily represent those of the company.

From: Phill @.> Sent: Saturday, August 24, 2024 9:16 PM To: MickMake/GoSungrow @.> Cc: Rafal Tomaszewski @.>; Mention @.> Subject: Re: [MickMake/GoSungrow] Is this still working? (Issue #112)

@RafAustraliahttps://github.com/RafAustralia

Have you installed the Advanced SSH & Web Terminal? If not, please do that.

Have you gone to the "Info" tab of Advanced SSH & Web Terminal and:

  1. enabled "Show in sidebar"?
  2. disabled "Protection mode"?

If not, please do that.

Now you should see "Terminal" in the side-bar. When you click it, you will have a terminal window.

This is the same as connecting using an SSH client (ssh on macOS and Linux, something like Putty on Windows). You can do everything you need to do using the Terminal window so you don't actually have to worry about SSH.

Now, "request not encrypted" is pretty much the signature of not having followed all the steps in Part 2 of the gist.

So, let's see what's what.

In the terminal window, please run these commands:

$ docker ps

$ docker images

To be clear, the $ is a convention which means "type the remainder of this command and press return (or "enter" if that's what's written on your keyboard). The first command is just docker ps - right?

You should get something like this:

~ $ docker ps | grep gosungrow

0fab5d5ff74d ba22da74/amd64-addon-gosungrow:3.0.7 "/init /usr/local/bi…" 7 hours ago Up 7 hours addon_ba22da74_gosungrow

~ $ docker images | grep gosungrow

triamazikamno/amd64-addon-gosungrow 3.0.7 f2cbc9418287 8 months ago 161MB

ba22da74/amd64-addon-gosungrow 3.0.7 f2cbc9418287 8 months ago 161MB

ba22da74/amd64-addon-gosungrow 3.0.7-backup 2f8714749ba2 11 months ago 161MB

I want you to copy the answers that come back from running those commands and paste those lines into your reply.

You should do it like this. First, a line of triple back-ticks (the back-tick is usually to the left of the "1" on the top row of your keyboard):


then you paste your material here, then another line of back-ticks

This is known as a "code fence" and it stops GitHub from interpreting everything as running paragraphs.

Now, as to your other points. If you're trying to install tools like git and wget then you're following Part 1 of the gist.

Part 1 of the gist is for compiling GoSungrow to run anywhere except in Home Assistant.

You've said you want to work in Home Assistant. That means you need to follow Part 2 of the gist. Part 1 is irrelevant.

There's nothing stopping you from doing both, providing you actually want to be able to run GoSungrow from both the command line and in Home Assistant. You just need to keep your objectives straight in your mind.

Perhaps, just for now, concentrate on HA. That means focusing on Part 2 and ignoring Parts 1, 3 and 4.

— Reply to this email directly, view it on GitHubhttps://github.com/MickMake/GoSungrow/issues/112#issuecomment-2308358396, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BIGQNNCZYPF3G23C4CZVRSTZTBTQJAVCNFSM6AAAAABGWHLDRWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMBYGM2TQMZZGY. You are receiving this because you were mentioned.Message ID: @.@.>>

RafAustralia avatar Aug 24 '24 11:08 RafAustralia

@paraphraser

Hey Phill

got it... sorry was using $ sign... now corrected. see below:

docker ps

RafAustralia avatar Aug 24 '24 11:08 RafAustralia