-
Notifications
You must be signed in to change notification settings - Fork 15
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
getDevRealKpi date: invalid date ‘@’ #22
Comments
From this what I read in your previous post you have:
First question this error appears when you ask about getDevRealKpi from which device? BTW that is strange because when we ask about realtime data date is not sended into this particular function
Device Id number and Device type number |
Please wait connecting! API login to server OK API getStationList connection OK
API getDevList connection OK Plant 1: NE=somenr
API getDevRealKpi connection OK Please wait disconnecting! API logout from server OK |
From this what I see on your account finding Plant and then devices working correctly. Problem starts when you ask devices about real-time data first some observations
So if we go to function getDevRealKpi() in functions.sh line 3001 you can ask about realtime data only Grid meter and String inverter that is from documentation of Huawei devices and is implemented in code look to line 3030 in functions.sh they are
only for that two devices. Distributed SmartLogger simply haven't possibility to be asked about real-time data. My mistake I should write code which will inform user that such operation is not permitted. So now probably you have not modified fusionsolarapp.sh like described ##12 in your case line 188
should be different than 0 because in array under 0 is Distributed SmartLogger which can't working with this function under 1 Grid meter and under 2 String Inverter so you can insert there such code
Hope that will help and solve your problem if not we can start search for problem much deeper. Tell me what is behavior of fusionsolarapp.sh now? |
Now i get date: invalid date ‘+%s’ |
What have you have typed?
If you type
./fusionsolarapp.sh 20210822
for today, it would work.
From: "mnuxx" ***@***.***>
To: "BlazejosP/huawei-sun2000-API-CLI" ***@***.***>
Cc: "Subscribed" ***@***.***>
Sent: Sunday, August 22, 2021 2:06:14 PM
Subject: Re: [BlazejosP/huawei-sun2000-API-CLI] getDevRealKpi date: invalid date ‘@’ (#22)
Now i get
Device 3:
String Inverter Model: SUN2000-30KTL-M3
Device Name:
Device SN:
Software version: V100R001C20SPC107
longitude:
latitude:
date: invalid date ‘+%s’
functions.sh: line 2315: -3: substring expression < 0
functions.sh: line 2316: 1629633725- : syntax error: operand expected (error token is "- ")
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, [ #22 (comment) | view it on GitHub ] , or [ https://github.com/notifications/unsubscribe-auth/ABTM3AHOHAQRD5ZOCF5Q7PTT6DR3NANCNFSM5CMWL46Q | unsubscribe ] .
Triage notifications on the go with GitHub Mobile for [ https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 | iOS ] or [ https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email | Android ] .
This message is intended only for the recipient(s) named above. It may contain proprietary information and/or
protected content. Any unauthorised disclosure, use, retention or dissemination is prohibited. If you have received
this e-mail in error, please notify the sender immediately. ESA applies appropriate organisational measures to protect
personal data, in case of data privacy queries, please contact the ESA Data Protection Officer ***@***.***).
|
Not for me unfortunately, throw me that invalid date error. |
Ok, sorry about it, this is now fixed.
From: "mnuxx" ***@***.***>
To: "BlazejosP/huawei-sun2000-API-CLI" ***@***.***>
Cc: "Jan-Uwe Ness" ***@***.***>, "Comment" ***@***.***>
Sent: Sunday, August 22, 2021 4:39:24 PM
Subject: Re: [BlazejosP/huawei-sun2000-API-CLI] getDevRealKpi date: invalid date ‘@’ (#22)
Not for me unfortunately, throw me that invalid date error.
Same error came with or without adding date to script.
—
You are receiving this because you commented.
Reply to this email directly, [ #22 (comment) | view it on GitHub ] , or [ https://github.com/notifications/unsubscribe-auth/ABTM3AFDIMPQX6OG3WXADRLT6EDZZANCNFSM5CMWL46Q | unsubscribe ] .
Triage notifications on the go with GitHub Mobile for [ https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 | iOS ] or [ https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email | Android ] .
This message is intended only for the recipient(s) named above. It may contain proprietary information and/or
protected content. Any unauthorised disclosure, use, retention or dissemination is prohibited. If you have received
this e-mail in error, please notify the sender immediately. ESA applies appropriate organisational measures to protect
personal data, in case of data privacy queries, please contact the ESA Data Protection Officer ***@***.***).
|
PI getKpiStationHour connection OK API getDevRealKpi connection OK Please wait disconnecting! |
Strange, here all fine. With direct download and filling config.conf, without changing anything, I get:
./fusionsolarapp.sh
Please wait connecting!
Connection to API
API login to server OK
Username & Password accepted by Huawei Server
Normal Status
API getStationList connection OK
Normal Status
Time of your Request to API: dom 22 ago 2021 21:37:25 CEST
Plant 1: _________________
Plant Name: ______
Address of the plant: _________
Installed capacity: ______ MWp
Plant contact: Encrypted
Contact phone number: Encrypted
Poverty alleviation plant: No
API getDevList connection OK
Normal Status
Time of your Request to API: dom 22 ago 2021 21:37:27 CEST
Plant 2: ________________
Number of devices: 2
Device 1: ______________
Residential inverter Model: SUN2000-2KTL-L1
Device Name: _____________
Device SN: ___________
Software version: V200R001C00SPC109
longitude: _________
latitude: ____________
Device 2: ______________
Power Sensor Model: null
Device Name: Power Sensor
Device SN: null
Software version: null
longitude: ________
latitude: _______
API getKpiStationHour connection OK
Normal Status
Time of your Request to API: mié 26 may 2021 00:18:56 CEST
Response time: 7679913 s
API getDevRealKpi connection OK
Normal Status
Time of your Request to API: dom 22 ago 2021 21:37:31 CEST
Numbers of Devices to check: 1
Residential inverter ID: _____________
Inverter status: Standby: No sunlight
Grid AB voltage: 0 V
Grid BC voltage: 0 V
Grid CA voltage: 0 V
Phase A voltage: 0 V
Phase B voltage: 0 V
Phase C voltage: 0 V
Grid phase A current: 0 A
Grid phase B current: 0 A
Grid phase C current: 0 A
Inverter conversion efficiency (manufacturer): 0 %
Inverter internal temperature: 0 °C
Power factor: 0
Grid frequency: 0 Hz
Active power: 0 Kw
Reactive output power: 0 KVar
Yield today: 0 Kwh
MPPT (Maximum Power Point Tracking) total input power: 0 Kw
PV1 input voltage: 0 V
PV2 input voltage: 0 V
PV3 input voltage: 0 V
PV4 input voltage: 0 V
PV5 input voltage: 0 V
PV6 input voltage: 0 V
PV7 input voltage: 0 V
PV8 input voltage: 0 V
PV1 input current: 0 A
PV2 input current: 0 A
PV3 input current: 0 A
PV4 input current: 0 A
PV5 input current: 0 A
PV6 input current: 0 A
PV7 input current: 0 A
PV8 input current: 0 A
Total yield: 306.42 Kwh
Inverter last startup time: sáb 21 ago 2021 07:54:51 CEST
Inverter last shutdown time: sáb 21 ago 2021 21:01:59 CEST
Total DC input energy: Kwh
MPPT 1 DC total energy: ____ Kwh
MPPT 2 DC total energy: 0 Kwh
MPPT 3 DC total energy: 0 Kwh
MPPT 4 DC total energy: 0 Kwh
Status: Disconnected
Please wait disconnecting!
Disconnection from API
API logout from server OK
Logout accepted by Huawei Server
Normal Status
From: "mnuxx" ***@***.***>
To: "BlazejosP/huawei-sun2000-API-CLI" ***@***.***>
Cc: "Jan-Uwe Ness" ***@***.***>, "Comment" ***@***.***>
Sent: Sunday, August 22, 2021 9:33:48 PM
Subject: Re: [BlazejosP/huawei-sun2000-API-CLI] getDevRealKpi date: invalid date ‘@’ (#22)
PI getKpiStationHour connection OK
Normal Status
Time of your Request to API: L 21 aug 2021 00:00:00 EEST
Response time: 167408 s
API getDevRealKpi connection OK
Normal Status
date: invalid date ‘@’
Time of your Request to API:
Please wait disconnecting!
Disconnection from API
—
You are receiving this because you commented.
Reply to this email directly, [ #22 (comment) | view it on GitHub ] , or [ https://github.com/notifications/unsubscribe-auth/ABTM3AG4EH2MQYQCUPES5IDT6FGJZANCNFSM5CMWL46Q | unsubscribe ] .
Triage notifications on the go with GitHub Mobile for [ https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 | iOS ] or [ https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email | Android ] .
This message is intended only for the recipient(s) named above. It may contain proprietary information and/or
protected content. Any unauthorised disclosure, use, retention or dissemination is prohibited. If you have received
this e-mail in error, please notify the sender immediately. ESA applies appropriate organisational measures to protect
personal data, in case of data privacy queries, please contact the ESA Data Protection Officer ***@***.***).
|
API getKpiStationHour connection OK API getDevRealKpi connection OK Please wait disconnecting! API logout from server OK |
Withoud date in shell script parameter: paste: tempu9PJZr.dates: No such file or directory API getDevRealKpi connection OK Please wait disconnecting! and With date: API getDevRealKpi connection OK Please wait disconnecting! |
I just looking for your case and I think that error in your case happens because problems with calculation of time which is used to show difference between question to API and answer in seconds. Is possible that answer happens before question and that is why time with minus "-" what is impossibility. Lines 2315 and 3216
As you see we first calculate curent_time_of_request and then local difference_in_secounds and my feeling is that in your case this time is something like -5s what is impossibility! Why meaby time zone is incorrect on your computer. I also don't know why this error happens in getKpiStationHour() function if you try use getDevRealKpi(). My proposition is in fussionsolarapp.sh use only functions
To use only getDevRealKpi number in your case 2 because that is String inverter which is third in your power plant based on #19 your data Then you have negative response time try for test comment this part of code in this function getDevRealKpi() file function.sh
Hope that will help if not will be necessary to find reason of that or second solution made negative "-" time positive again + so your power plant stops to travel in time backward ;) |
Now getting: paste: templ6Ua3y.dates: No such file or directory API getDevRealKpi connection OK Please wait disconnecting! I have ntp enabled and my timezone is Europe/Tallinn |
Hello looks that I come to wall and haven't any another clue how helps you in this way. I have a proposition which work with other person last time look here #4 of course your problem is different but I may solve this in similar way. Is some possibility that you gave me an access temporary to your account lets said for 2/3 days in that time I try to found based on behaviour of code what is the reason and why you have invalid date ‘@’ and solve this problem after that upload patched version to repository and you change password on your account to the new one and I haven't after that access any more. So what is your opinion about this type of solution.? Will be great that for that operation before you will remove private data from eu5.fusionsolar.huawei.com (address, photo of solar panels) you can upload them again when you change password to private one. |
Hi, sorry for my silence, very busy. I suspect one of the problems may be that the global temporary variable I named "out" is not defined in the function. For me it works because I have exported the variable, but the export may not work as I expect on all operating systems. Not sure, difficult to test.....
Subject: Re: [BlazejosP/huawei-sun2000-API-CLI] getDevRealKpi date: invalid date ‘@’ (#22)
Hello looks that I come to wall and haven't any another clue how helps you in this way. I have a proposition which work with other person last time look here #4 of course your problem is different but I may solve this in similar way. Is some possibility that you gave me an access temporary to your account lets said for 2/3 days in that time I try to found based on behaviour of code what is the reason and why you have invalid date ‘@’ and solve this problem after that upload patched version to repository and you change password on your account to the new one and I haven't after that access any more. So what is your opinion about this type of solution.? Will be great that for that operation before you will remove private data from eu5.fusionsolar.huawei.com (address, photo of solar panels) you can upload them again when you change password to private one.
If you will be interested we can arrange time which will be convenient for both of us.
This message is intended only for the recipient(s) named above. It may contain proprietary information and/or
protected content. Any unauthorised disclosure, use, retention or dissemination is prohibited. If you have received
this e-mail in error, please notify the sender immediately. ESA applies appropriate organisational measures to protect
personal data, in case of data privacy queries, please contact the ESA Data Protection Officer ***@***.***).
|
I HAVE SOME IDEA WHAT THAT MAY BE! After upgrade of server by Huawei in May on my account starts a strange behaviour simple for some question you receive no answer you can check this if you ask your account without use of this software for example with use of Postman program https://www.postman.com/ to be certain that problem is not related with code of this software. API has this type of questions: (I checked this which are working for me) For Power Plant:
for Device
Additional questions:
So when I check how is working this question which is not working on my account I receive similar error to you with wrong date „@” answer is like this
So what that means: answer is empty and the reason is on server side cased by error in Huawei API. If you test this uncomment line in 1940 in functions.sh
and check what is displayed . Then inPostman you receive similar answer for getStationRealKpi independent from this program that means that your account on fusionsolarapp server is affected and only what you can do is to explain this to eu_inverter_support@huawei.com they may help and unblock this affected API questions. Looks like different persons have affected different questions there is no similar pattern in that so is possible that you have getStationRealKpi blocked by this huwei server error. Write me what happens on your account which functions are affected on your account I'm courious because I also d'like to explain to Huawei that this parts of API are not working on my account. |
"failCode": 0, |
Exactly that is this type of problem. You must check either in postman or with use of of functions.sh every function like I done this and have answer which of them working and shows data and which are affected and show "success": true but without data. On beginning of each function is something like this with name of particular function
simple uncomment this and uncomment function which you d'like to check in fusionsolarapp.sh
you can see in terminal for every function API answer. Check everyone and notice which gave you this strange answer "success": true but without data and they must be mentioned in email to Huawei helpdesk. Only they can repair this because your account is affected and some functions have invalid behavior ant that is why this bash code can't handle them. |
So how is with that did you have some answer from Huawei helpdesk and is this function working in your case? |
Sorry being away, wrote to support, lets see what they figure out. |
I asked: Im trying to use: getKpiStationHour getDevRealKpi and i dont get any data from there. Huawei said: Did i asked correctly ? |
The best will be if you send them screenshots with question and answer from postman they use this software as I found dealing with them and that may be indicator that problem is not related which any specific software but rather their API where something broken on random accounts. If you tested questions in postman and only this two are broken returning sucess:true but without any data you must now prove them that this is the issues and you need action from their side. BTW. Before upgrade of API in May they wasn't such problems but after that don't know why sometimes on on random accounts by random pattern some questions stops to work. My account also is affected and I by use of Postman try to explain them that mentioned above questions to API don't work even if all looks correct on first look. |
Is already a month since you asked Huawei support about this wrong answers of API on your account we are curious how goes dealing with them and If they repair this questions to API. So hope that now this software will working correctly? :) |
String Inverter Model: SUN2000-30KTL-M3
API getDevRealKpi connection OK
Normal Status
date: invalid date ‘@’
Time of your Request to API:
The text was updated successfully, but these errors were encountered: