-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error 'er_invalid_appkey' / 'Request is not encrypted' #101
Comments
It seems that the entire payload is encrypted:
I think they are using the standard CryptoJS as seen in their source: |
Hi, same problem.
The key not change:
Regards |
I have the same Problem. [13:45:06] INFO: Login to iSolarCloud using gateway https://gateway.isolarcloud.eu ... | --appkey | | GOSUNGROW_APPKEY | SunGrow: api application key. | 93D72E60331ABDCDC7B39ADC2D1F32B3 ERROR: appkey is incorrect 'er_invalid_appkey' |
Hallo, |
Same problem |
Same problem with the Australian server as well. I did upgrade my firmware and noticed I got a Session Expired error in the app which forced me to log in again |
Same here, issue appears to start last week https://augateway.isolarcloud.eu/ [3.0.7] - 2023-09-04 Tried init: false |
Hi, I have the same Problem. [20:55:36] INFO: Login to iSolarCloud using gateway https://gateway.isolarcloud.eu ... Examples: Flags: Use "GoSungrow help flags" for more info. Additional help topics: ERROR: appkey is incorrect 'er_invalid_appkey' It also says: |
same problem, the same error |
As @BTDrink mentioned the payload is encrypted. The session_key (ie. "webDK6Xl15mzc2RW") is generated on client side. It is then encrypted with public key (rsaEncryption (PKCS 1)) and send in the header:
|
Same issue, following for a fix |
Same Problem here |
Same problme here - appkex 93D72E60331ABDCDC7B39ADC2D1F32B3 is used [07:02:06] INFO: Login to iSolarCloud using gateway https://gateway.isolarcloud.eu ... Examples: |
same here |
Same here.
If I use this appkey "B0455FBE7AA0328DB57B59AA729F05D8" than I get an other error... about encryption. They probably changed the encryption method.
|
same problem here. Hoping for a fix ... 😳 @MickMake |
same problem, waiting for the correction.. thx |
Body is encrypted using the randomKey and standard AES in ECB mode with PKCS7 padding. Decryption is done using the same key and parameters. The The randomKey is random generated by using a prefix ( Hope that helps bringing the project back to working. Got the functions done in NodeJS but not in Go at this time: import * as CryptoJS from "crypto-js";
import NodeRSA from "node-rsa";
export function randomKey() {
return "and" + randomString(13);
}
export function encryptAES<T>(data: T, key: string): string {
const d = CryptoJS.enc.Utf8.parse(JSON.stringify(data));
const k = CryptoJS.enc.Utf8.parse(key);
return CryptoJS.AES.encrypt(d, k, {
mode: CryptoJS.mode.ECB,
padding: CryptoJS.pad.Pkcs7,
})
.ciphertext.toString()
.toUpperCase();
}
export function decryptAES<T>(data: string, key: string): T {
const d = CryptoJS.format.Hex.parse(data);
const k = CryptoJS.enc.Utf8.parse(key);
const dec = CryptoJS.AES.decrypt(d, k, {
mode: CryptoJS.mode.ECB,
padding: CryptoJS.pad.Pkcs7,
});
return JSON.parse(CryptoJS.enc.Utf8.stringify(dec)) as T;
}
export function encryptRSA(publicKey: string, value: string): string {
const key = new NodeRSA();
key.setOptions({ encryptionScheme: "pkcs1" });
key.importKey(publicKey, "pkcs8-public-pem");
return key.encrypt(value, "base64");
} |
The key values for the app are: const ACCESS_KEY = "kme8xdq4fp88wps563qd5d57vw6jxrf4"
const APP_KEY = "3A51762ED80A39AD3DF3DB3CE6767884"
const SECRET_KEY = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDlcwFJfpjOsy5U6KBpDEC9ZU_sgjD4AQ_Io0MuuGmQq8wdeLoozOdXRlkyZ2GovikSa6IXMkJ25NeChWGwBDTsnXuvZ3JIFqiTNt5eMtb42u2iHumWtv7fsjj17FFknOIIVzUMPBJ3eIb2" |
Additionally there is the |
It looks like there was an app key that allowed non-encrypted requests, but it's gone now. Some kind of integration got discontinued on their end perhaps? |
Keys found for the web interface:
|
is there an easy patch path here? Changing definitely sees the change in error message, happy to test, as I can replicate this, just crawling through their .js tome |
Same issue. Following for fix. Please! |
Same error here, pls explain way around |
Hi, Same issue |
Same issue here |
Here we go. A first minimal MVP. The import json
import random
import string
from base64 import b64decode, b64encode, urlsafe_b64decode
from datetime import datetime
import requests
from Crypto.Cipher import AES, PKCS1_v1_5
from Crypto.PublicKey import RSA
from Crypto.Util.Padding import pad, unpad
def encrypt_hex(data_str, key):
cipher = AES.new(key.encode("UTF-8"), AES.MODE_ECB)
date_byte = cipher.encrypt(pad(data_str.encode("UTF-8"), 16))
return date_byte.hex()
def decrypt_hex(data_hex_str, key):
cipher = AES.new(key.encode("UTF-8"), AES.MODE_ECB)
text = unpad(cipher.decrypt(bytes.fromhex(data_hex_str)), 16).decode("UTF-8")
return json.loads(text)
public_key = RSA.import_key(
urlsafe_b64decode(
"MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCkecphb6vgsBx4LJknKKes-eyj7-RKQ3fikF5B67EObZ3t4moFZyMGuuJPiadYdaxvRqtxyblIlVM7omAasROtKRhtgKwwRxo2a6878qBhTgUVlsqugpI_7ZC9RmO2Rpmr8WzDeAapGANfHN5bVr7G7GYGwIrjvyxMrAVit_oM4wIDAQAB"
)
)
cipher = PKCS1_v1_5.new(public_key)
def encrypt_RSA(data_str):
ciphertext = cipher.encrypt(data_str.encode("UTF-8"))
return b64encode(ciphertext).decode("UTF-8")
def random_word(length):
characters = string.ascii_lowercase + string.ascii_uppercase + string.digits
random_word = "".join(random.choice(characters) for _ in range(length))
return random_word
def get_data(url, data):
random_key = "web" + random_word(13)
data["api_key_param"] = {
"timestamp": int(datetime.now().timestamp() * 1000),
"nonce": random_word(32),
}
data["appkey"] = "B0455FBE7AA0328DB57B59AA729F05D8"
data_str = json.dumps(data, separators=(",", ":"))
data_hex = encrypt_hex(data_str, random_key)
headers = {
"content-type": "application/json;charset=UTF-8",
"sys_code": "200",
"x-access-key": "9grzgbmxdsp3arfmmgq347xjbza4ysps",
}
headers["x-random-secret-key"] = encrypt_RSA(random_key)
response = requests.post(url, data=data_hex, headers=headers)
return decrypt_hex(response.text, random_key)
token = get_data(
"https://gateway.isolarcloud.eu/v1/userService/login",
{
"user_account": "[email protected]",
"user_password": "XXXXXXXX",
},
)["result_data"]["token"]
get_data(
"https://gateway.isolarcloud.eu/v1/commonService/queryMutiPointDataList",
{
"ps_key": "XXXXXXX_14_1_2",
"points": "p13003",
"start_time_stamp": "20231108000000",
"end_time_stamp": "20231109000000",
"token": token,
},
) @0SkillAllLuck: Grüsse nach Bern! |
Here is another working Python example of how to use query the new Sungrow API. The scope of the code below is very similar to his contribution, with some extra additions:
You will see that the post method has a isFormData flag. The code associated with that flag being true is reverse engineered based on what I was able to make out of minified Sungrow encryption code. I do not know a call for which the flag should be set to true, so in that particular case there may be some issues... import base64
import string
import random
from typing import Optional
import time
import json
import requests
from cryptography.hazmat.primitives import serialization, asymmetric, padding
from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes
from cryptography.hazmat.backends import default_backend
# TODO: Getting these values directly from the files by the Sungrow API is better than hardcoding them...
LOGIN_RSA_PUBLIC_KEY: asymmetric.rsa.RSAPublicKey = serialization.load_pem_public_key(b"-----BEGIN PUBLIC KEY-----\nMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDJRGV7eyd9peLPOIqFg3oionWqpmrjVik2wyJzWqv8it3yAvo/o4OR40ybrZPHq526k6ngvqHOCNJvhrN7wXNUEIT+PXyLuwfWP04I4EDBS3Bn3LcTMAnGVoIka0f5O6lo3I0YtPWwnyhcQhrHWuTietGC0CNwueI11Juq8NV2nwIDAQAB\n-----END PUBLIC KEY-----")
APP_RSA_PUBLIC_KEY: asymmetric.rsa.RSAPublicKey = serialization.load_pem_public_key(bytes("-----BEGIN PUBLIC KEY-----\n" + "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCkecphb6vgsBx4LJknKKes-eyj7-RKQ3fikF5B67EObZ3t4moFZyMGuuJPiadYdaxvRqtxyblIlVM7omAasROtKRhtgKwwRxo2a6878qBhTgUVlsqugpI_7ZC9RmO2Rpmr8WzDeAapGANfHN5bVr7G7GYGwIrjvyxMrAVit_oM4wIDAQAB".replace("-", "+").replace("_", "/") + "\n-----END PUBLIC KEY-----", 'utf8'))
ACCESS_KEY = "9grzgbmxdsp3arfmmgq347xjbza4ysps"
APP_KEY = "B0455FBE7AA0328DB57B59AA729F05D8"
def encrypt_rsa(value: str, key: asymmetric.rsa.RSAPublicKey) -> str:
# Encrypt the value
encrypted = key.encrypt(
value.encode(),
asymmetric.padding.PKCS1v15(),
)
return base64.b64encode(encrypted).decode()
def encrypt_aes(data: str, key: str):
key_bytes = key.encode('utf-8')
data_bytes = data.encode('utf-8')
# Ensure the key is 16 bytes (128 bits)
if len(key_bytes) != 16:
raise ValueError("Key must be 16 characters long")
cipher = Cipher(algorithms.AES(key_bytes), modes.ECB(), backend=default_backend())
encryptor = cipher.encryptor()
padder = padding.PKCS7(algorithms.AES.block_size).padder()
padded_data = padder.update(data_bytes) + padder.finalize()
encrypted_data = encryptor.update(padded_data) + encryptor.finalize()
return encrypted_data.hex()
def decrypt_aes(data: str, key: str):
key_bytes = key.encode('utf-8')
# Ensure the key is 16 bytes (128 bits)
if len(key_bytes) != 16:
raise ValueError("Key must be 16 characters long")
encrypted_data = bytes.fromhex(data)
cipher = Cipher(algorithms.AES(key_bytes), modes.ECB(), backend=default_backend())
decryptor = cipher.decryptor()
decrypted_padded_data = decryptor.update(encrypted_data) + decryptor.finalize()
unpadder = padding.PKCS7(algorithms.AES.block_size).unpadder()
decrypted_data = unpadder.update(decrypted_padded_data) + unpadder.finalize()
return decrypted_data.decode('utf-8')
def generate_random_word(length: int):
char_pool = string.ascii_letters + string.digits
random_word = ''.join(random.choice(char_pool) for _ in range(length))
return random_word
class SungrowScraper:
def __init__(self, username: str, password: str):
self.baseUrl = "https://www.isolarcloud.com"
# TODO: Set the gateway during the login procedure
self.gatewayUrl = "https://gateway.isolarcloud.eu"
self.username = username
self.password = password
self.session: "requests.Session" = requests.session()
self.userToken: "str|None" = None
def login(self):
self.session = requests.session()
resp = self.session.post(
f"{self.baseUrl}/userLoginAction_login",
data={
"userAcct": self.username,
"userPswd": encrypt_rsa(self.password, LOGIN_RSA_PUBLIC_KEY),
},
headers={
"_isMd5": "1"
},
timeout=60,
)
self.userToken = resp.json()["user_token"]
return self.userToken
def post(self, relativeUrl: str, jsn: "Optional[dict]"=None, isFormData=False):
userToken = self.userToken if self.userToken is not None else self.login()
jsn = dict(jsn) if jsn is not None else {}
nonce = generate_random_word(32)
# TODO: Sungrow also adjusts for time difference between server and client
# This is probably not a must though. The relevant call is:
# https://gateway.isolarcloud.eu/v1/timestamp
unixTimeMs = int(time.time() * 1000)
jsn["api_key_param"] = {"timestamp": unixTimeMs, "nonce": nonce}
randomKey = "web" + generate_random_word(13)
userToken = self.userToken
userId = userToken.split('_')[0]
jsn["appkey"] = APP_KEY
if "token" not in jsn:
jsn["token"] = userToken
jsn["sys_code"] = 200
data: "dict|str"
if isFormData:
jsn["api_key_param"] = encrypt_aes(json.dumps(jsn["api_key_param"]), randomKey)
jsn["appkey"] = encrypt_aes(jsn["appkey"], randomKey)
jsn["token"] = encrypt_aes(jsn["token"], randomKey)
data = jsn
else:
data = encrypt_aes(json.dumps(jsn, separators=(",", ":")), randomKey)
resp = self.session.post(
f"{self.gatewayUrl}{relativeUrl}",
data=data,
headers={
"x-access-key": ACCESS_KEY,
"x-random-secret-key": encrypt_rsa(randomKey, APP_RSA_PUBLIC_KEY),
"x-limit-obj": encrypt_rsa(userId, APP_RSA_PUBLIC_KEY),
"content-type": "application/json;charset=UTF-8"
}
)
return decrypt_aes(resp.text, randomKey)
s = SungrowScraper("MY_USERNAME", "MY_PASSWORD")
resp = s.post(
"/v1/powerStationService/getPsListNova",
jsn={
"share_type_list": ["0", "1", "2"]
}
)
print(resp) |
Davvero?😄 Se cambio appkey nella configurazione e metto questa riparte
tutto?
Il mar 23 apr 2024, 18:59 Hannes ***@***.***> ha scritto:
… Hello @ALL <https://github.com/ALL> !
use GoSungrow config write --appkey ANDROIDE13EC118BD7892FE7AB5A3F20 and
it works ;-)
Greetings :)
—
Reply to this email directly, view it on GitHub
<#101 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AO6MNOFSQTSDW7BF42V5CHLY62HNFAVCNFSM6AAAAABAAXZAJCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANZSHEZDSNBZGE>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Funziona davvero 😁😁😁😁 sono felicissimo grazie mille
Il mar 23 apr 2024, 20:12 Diego Grechi ***@***.***> ha scritto:
… Davvero?😄 Se cambio appkey nella configurazione e metto questa riparte
tutto?
Il mar 23 apr 2024, 18:59 Hannes ***@***.***> ha scritto:
> Hello @ALL <https://github.com/ALL> !
>
> use GoSungrow config write --appkey ANDROIDE13EC118BD7892FE7AB5A3F20 and
> it works ;-)
>
> Greetings :)
>
> —
> Reply to this email directly, view it on GitHub
> <#101 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AO6MNOFSQTSDW7BF42V5CHLY62HNFAVCNFSM6AAAAABAAXZAJCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANZSHEZDSNBZGE>
> .
> You are receiving this because you commented.Message ID:
> ***@***.***>
>
|
Look, to be honest, I think recommending:
rather than:
might be bordering on bad advice. Please see the tests below. If anyone is actually using the ANDROID key in a working system, can you please post additional details. In particular, which gateway you are using? I'm using Test using the "ANDROID" key - fails
Test using the "B0455" key - succeeds
|
@howi303 - see if this helps (the |
I got the "unknown error 'Request is not encrypted'" earlier today. I was using the B0455* appkey and switched to the ANDROID* appkey and GoSungrow works again! I'm on the gateway.isolarcloud.eu host.
|
Ciao..si funziona anche a mé e sono contento però non ti vede tutti i sensori.quando inserisco le card di lovelace sono incomplete.anche a tè?Il 30 apr 2024 21:37, mattiassjogren ***@***.***> ha scritto:
I got the "unknown error 'Request is not encrypted'" earlier today. I was using the B0455* appkey and switched to the ANDROID* appkey and GoSungrow works again! I'm on the gateway.isolarcloud.eu host.
[19:22:10] INFO: Setting up GoSungrow config ...
[19:22:12] INFO: Writing GoSungrow config ...
Using config file '/data/.GoSungrow/config.json'
New config:
+-------------------+------------+---------------------------+--------------------------------+----------------------------------+
| FLAG | SHORT FLAG | ENVIRONMENT | DESCRIPTION | VALUE (* = DEFAULT) |
+-------------------+------------+---------------------------+--------------------------------+----------------------------------+
| --config | | GOSUNGROW_CONFIG | GoSungrow: config file. | /data/.GoSungrow/config.json |
| --debug | | GOSUNGROW_DEBUG | GoSungrow: Debug mode. | false * |
| --quiet | | GOSUNGROW_QUIET | GoSungrow: Silence all | false * |
| | | | messages. | |
| --timeout | | GOSUNGROW_TIMEOUT | Web timeout. | 1m0s |
| --user | -u | GOSUNGROW_USER | SunGrow: api username. | XXXXXXX |
| --password | -p | GOSUNGROW_PASSWORD | SunGrow: api password. | XXXXXXX |
| --appkey | | GOSUNGROW_APPKEY | SunGrow: api application key. | ANDROIDE13EC118BD7892FE7AB5A3F20 |
| --host | | GOSUNGROW_HOST | SunGrow: Provider API URL. | https://gateway.isolarcloud.eu |
| --token-expiry | | GOSUNGROW_TOKEN_EXPIRY | SunGrow: last login. | 2024-04-13T04:23:09 |
| --save | -s | GOSUNGROW_SAVE | Save output as a file. | false * |
| --dir | | GOSUNGROW_DIR | Save output base directory. | * |
| --mqtt-user | | GOSUNGROW_MQTT_USER | HASSIO: mqtt username. | XXXXXXX |
| --mqtt-password | | GOSUNGROW_MQTT_PASSWORD | HASSIO: mqtt password. | XXXXXXX |
| --mqtt-host | | GOSUNGROW_MQTT_HOST | HASSIO: mqtt host. | core-mosquitto |
| --mqtt-port | | GOSUNGROW_MQTT_PORT | HASSIO: mqtt port. | 1883 |
| --modbus-user | | GOSUNGROW_MODBUS_USER | Modbus username. | * |
| --modbus-password | | GOSUNGROW_MODBUS_PASSWORD | Modbus password. | * |
| --modbus-host | | GOSUNGROW_MODBUS_HOST | Modbus host. | * |
| --modbus-port | | GOSUNGROW_MODBUS_PORT | Modbus port. | 502 * |
+-------------------+------------+---------------------------+--------------------------------+----------------------------------+
[19:22:12] INFO: Login to iSolarCloud using gateway https://gateway.isolarcloud.eu ...
Email: ***@***.***
Create Date: Tue Nov 07 18:08:40 CST 2023
Login Last Date: 2024-05-01 03:22:13
Login Last IP:
Login State: 1
User Account: XXXXXXX
User Id: XXXXXX
User Name: XXXXX
Is Online: false
Token: 359009_9bXXXXXXXXXXXXXXXXXXXXXXX
Token File: /data/.GoSungrow/AppService_login.json
[19:22:13] INFO: Syncing data from gateway https://gateway.isolarcloud.eu ...
2024/04/30 19:22:13 INFO: Connecting to MQTT HASSIO Service...
2024/04/30 19:22:13 INFO: Connecting to SunGrow...
2024/04/30 19:22:13 INFO: Found SunGrow 2 devices
2024/04/30 19:22:13 INFO: Caching Sungrow metadata...
2024/04/30 19:22:14 INFO: Cached 841 Sungrow data points...
2024/04/30 19:22:15 INFO: Syncing 164 entries with HASSIO from queryDeviceList.
CUCUCUCUCUCU-CUCU-CU--CU-
2024/04/30 19:22:15 INFO: Syncing 155 entries with HASSIO from getPsList.
2024/04/30 19:22:15 INFO: Syncing 212 entries with HASSIO from getPsDetail.
CU?CUCUCUCUCU???CUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCU?CUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCU?CUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCU?CUCUCUCUCUCUCUCUCUCUCUCUCU?CUCUCUCUCUCUCUCUCUCUCU?CUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCUCU
CU?CUCU??CUCUCUCUCU?CUCUCUCUCU?CU?CUCUCUCUCU?CUCUCUCU?CUCU?CUCUCUCU?CUCUCUCUCU?????CUCU??CU?CUCU?CU???CUCUCUCUCUCU????CUCUCU???CUCUCUCU?CUCUCUCU??CUCUCUCUCUCU?CUCUCUCU?CUCUCUCUCUCUCUCU?CU?CUCUCUCUCU?CU?CU?CU??CU???CUCU?CUCU???CUCUCUCUCUCU?CUCU???CU?CUCUCUCU?CUCUCU?CU?CUCUCUCUCUCUCU??CUCUCU?CU?CUCU?CUCUCUCU?CUCUCU???CUCUCU?CU??CUCUCUCUCUCUCUCUCUCU?CU??
2024/04/30 19:22:15 INFO: Starting ticker...
2024/04/30 19:22:15 INFO: Fetch Schedule: 5m
2024/04/30 19:22:15 INFO: Sleep Delay: 40s
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: ***@***.***>
|
sure it works :P i do not know why nobody believes me :D i also have been on eu |
@Sn0w3y I think it's less a question of (dis)believing what you say vs trying the Still, thanks to all the responses, the hypothesis that the actual value of the APPKEY might be tied to the iSolarCloud server seems to be gaining traction. I have updated the gist to consolidate everything about iSolarCloud host URLs and APPKEYs, as well as instructions for the three main use-cases (the HA add-on, the standalone binary, and manual editing of a JSON file). The new material is here. Now, if anyone has anything to add/challenge/critique and, in particular, knows of different iSolarCloud servers and/or APPKeys then please mention it, either by adding to this issue or by making a comment on the gist. |
Same situation here (except on the https://augateway.isolarcloud.com host). I use the HA add-on, and it was running fine after installing via Paraphraser's patching instructions a few couple months back, no indication in the logs about what sparked the 'Request is not encrypted' to return. Changing to the |
I have had the exact same experience - augateway, B0455* used to work, and it stopped working a few days ago and was fixed by android* key just this morning. |
@Shaydengy so, do you recall doing anything between "when the |
I can't say with confidence sorry. I'm completely new to HA and having been setting it all up over the last week, so have lost track of events, as you could imagine. However, I've looked through the sensor historicals - it looks like my gosungrow sensors stopped working at 3:04:22am 30 April. I wouldn't have made any edits after 10pm the night prior, so it doesn't seem to be from anything I've done. Let me know if there's anything further you'd like me to check. |
Here the ANDROID app_key shows another error: ERROR: Appkey: empty string When using any other: ERROR: appkey is incorrect 'er_invalid_appkey' |
A bit more context might help but, for now, on the assumption you are using Home Assistant, please review gist part 2 and double check that you followed all the steps, including the steps at configuration. The first error sounds like you didn't have an appkey at all. The second one is either not following all the steps in part 2 or perhaps not trying both appkeys in the configuration section. I'm using the |
Thanks man you are a GOD.
|
For authentication i am getting below error code:
are you aware about this |
@Pistro From where did you find LOGIN_RSA_PUBLIC_KEY |
The basic issue reported at the point when that comment was written (Dec 2023) has been fixed.
No. As far as I know, this is the first mention of a result code E914. I have no idea what it means.
No idea. The string
returns no hits. The only place that string seems to be mentioned is in this issue where it’s part of some code provided by @Pistro but whether that code is original or borrowed/adapted from somewhere else is something I don’t know. I think it became the basis of the fix provided by @triamazikamno but I don’t know that for certain. However, if you take a snippet from the assignment on the right hand side of that code and do something like:
then you do get hits. But those are buried in the Now, let me put all that to one side. It’s not at all clear exactly what problem you are facing or how you are trying to run GoSungrow. GoSungrow can be run:
You need to explain what you are trying to do. And, then, if you are seeing errors, you need to provide all of the context. If you whittle it down to just the line you think is the error you make it really hard for anyone to help you. In this situation, less is not more. To the best of my knowledge, if you:
then GoSungrow will start working again. I think the only people who continue to have trouble once they’ve followed the gist are those who have multiple Sungrow inverters on a single account. There seems to be some problem which shows up as an inability of GoSungrow to convert a non-integer string to an integer. Insofar as I’m aware, there’s no fix for that. We will simply have to wait until this site’s maintainer gets back. |
sungrow may have changed something. I am getting: [result_msg] => Abnormal network environment |
I went to their website and it said "The system has detected abnormality in your account, for the security of your account, please change your password immediately." I just confirmed the message and now the API connection works again. 🤷♂️ |
Hi, I'm trying to get it work... I've installed goSunGrow and use de android appkey, I don't see any error about key or encription but i do not get the properly data i think. This is what i've got in the log: 15:59:23] INFO: Login to iSolarCloud using gateway https://gateway.isolarcloud.eu ... Any Idea o help??? |
I am getting no results from getPsList. Not sure why, maybe because I don't own any, I just have share access? Maybe you have the same issue? Do I have to send parameters with getPsList? The doc lists nothing: https://github.com/MickMake/GoSungrow/blob/master/iSolarCloud/AppService/getPsList/data.go My getPsList result is:
nothing in result_data. Otherwise every other api call works if I pass the ps_id I got from the website. |
No idea. I just ran a test. The output is below (sanitised to remove account details and paid etc but otherwise exactly what I see).
"GoSungrow-mac" because I've cross-compiled for other platforms and I want to know which binary I'm looking at. |
@allocater2 I have the same issue - the plant is shared with me and I can't see it in the PsList. Did you figure out how to work around this? If you can also share how you obtained your ps_id from the website that would be helpful. |
Thank you so much everyone here. I got the ps_id and current production by polling getPsList: userId = token.split('_')[0] payload = get_data2( The getData also needs to provide the x-limit-obj def get_data2(url, data, limitObj): |
Since tonight I get with
https://gateway.isolarcloud.eu
in HA the following error:ERROR: appkey is incorrect 'er_invalid_appkey
Checking with
https://portaleu.isolarcloud.com/
I realized that the appkey could have changed toB0455FBE7AA0328DB57B59AA729F05D8
(at least I find this key when searching for the termappkey
) .When doing a direct request at
/v1/userService/login
at least I don't get any more an invalid_appkey error but now anRequest is not encrypted
error.When looking at the source of
https://portaleu.isolarcloud.com/#/dashboard
there is the following function:e.data.set("appkey", a.a.encryptHex(e.data.get("appkey"), h))
Did Sungrow changed the API access? How to deal with this change?
The text was updated successfully, but these errors were encountered: