BlazejosP / huawei-sun2000-API-CLI

Huawei SUN2000 compatible devices which working with Huawei Cloud Service command line bash API for monitoring or download data from their FusionSolarApp API
https://www.buymeacoffee.com/blazejosP
GNU General Public License v3.0
110 stars 15 forks source link

Login error #30

Closed arboeh closed 1 year ago

arboeh commented 1 year ago

I followed the instructions and configured the following credentials in config.conf:

declare -A huawei_account_login=(
[login0]="<USERNAME>"
[password0]="**********"
)

declare -A kiosk_mode_url_array=( 
[kioskmode0]="https://eu5.fusionsolar.huawei.com/rest/pvms/web/kiosk/v1/station-kiosk-file?kk=<KIOSK_TOKEN>"
) 

I also tried this URL

https://region01eu5.fusionsolar.huawei.com/pvmswebsite/nologin/assets/build/index.html#/kiosk?kk=<KIOSK_TOKEN>

I'm getting the following error using the same credentials I use for login into the web portal as well:

API login to server Error
Username & Password not accepted by Huawei Server
The third-party system ID does not exist.
Time of your Request to API: Mo 10. Okt 10:19:13 CEST 2022
Your data:
    Username: <USERNAME>
    Password: **********

There is some problem with login_to_API function

Are there restrictions using special charcters in the password?

BlazejosP commented 1 year ago

Hello I don't know about any characters restrictions on side of this software. All characters should be accepted even a "Space" empty character because are between " " you can use even $ @ etc... tested already. Of course they may be some limitations on side of Huawei server which I'm not aware. But in that case in my opinion that is not a issue because as I understand you are able to login with web interface! Is strange to be certain I checked that if login to account is working and as I found all is working OK so at that moment I don't know why your account is not login. But you can check this:

Check password and login in config.conf remove characters < and > if are not part of your login&password to web interface.

[login0]="<--here login-->" [password0]="<--here password-->"

Try First to login with use of textual interface fusionsolarapp.sh and here check lines 184 and 185 is important to have your credentials in array with index 0 if this is what you use in config.conf if you have with different index in fusionsolarapp.sh change this accordingly

`

Function to login to API is necessary to be first need this arguments syntax like "login_to_API login0 password0" or with different number if you use different login&password instead

login_to_API login0 password0 `

Hope that is an issue and that will help if not we can check other options like writing to Huawei and checking if your developer account is activated but check this first.

In case of kiosk mode I think I how some idea . Don't use link from commented area only with your kk number copy instead whole link from kioskmode activation area in web interface and then paste this whole link to config.conf `

[kioskmode0]="https://eu5.fusionsolar.huawei.com/rest/pvms/web/kiosk/v1/station-kiosk-file?kk=XXXXXXXXXX"

`