Hi,
I am trying your example, but i am not getting any value output.
have you seen this before?
for example checking the webdata_now with the curl command | less
Hi,
I am trying your example, but i am not getting any value output.
have you seen this before?
for example checking the webdata_now with the curl command | less
Thanks, this was, what I was looking for as i also have them in my status.js file
Hey Dannyplace, Could you please share the modifications ?
Just to note that as of today the Solarman API address has changed to https://globalapi.solarmanpv.com. Iâve tested with new address and instructions on this thread are still good apart from the older API address.
@Skully maybe you can update the first post to reflect this?
Extract from email announcement belowâŚ
Now we are delighted to inform you that we have successfully upgrade data centers. If you are using the âInternational Data Centerâ, we kindly remind that you use the new OPENAPI domain https://globalapi.solarmanpv.com to access the platform, replacing the previous domain https://api.solarmanpv.com. Your APPID and APPSECRET will remain the same, but you will need to obtain a new token to access the platform.
If you require historical data during the upgrade, we recommend that you use the historical data interface (Interface 3.4 and Interface 4.3) to supplement it after the upgrade is completed.
Noted the email and that my stats had died⌠Updated and all working well for me.
Strange is that Iâve updated my token from globalapi.solarmanpv.com , to obtain values for HA , Iâm still using api.solramanpv.com . Iâve tried with global and I got ERROR.
Urghhhhh yes mine worked for about 1.5hrs on globalapi, just heading to bed and saw your message⌠I had a look and its failed again. Using globalapi token but changed back to api.solramanpv.com same as you now works again. Iâll see what the morning brings Seems they are still tinkering.
Didnât work for two days. The error I got was AUTH_USER_ALREADY_MIGRATED.
Then I found this thread and your posts. I changed https://api.solarmanpv.com to https://globalapi.solarmanpv.com and itâs working again like a charm.
Thanks!
Is there anybody here who can share there code to acces the new Global-API of Solarman? I had it running flawlessly before the upgrade and just canât get it to work anymore. I tried to locally access the inverter (Trannergy) but couldnât get any information from it, neither with the HA integration. So I want to get the API way running again, but canât get it doneâŚ
Thnx in advace!!
Itâs exactly the same instructions as in the thread here, just the API address is updated/changed.
Use https://globalapi.solarmanpv.com/ instead of https://api.solarmanpv.com/ in your commands and everything else is the same.
Rogier, if it has been working flawlessly, send a mail to the support desk asking to elevate your api authentication level for the user account you are using as the authentication fails. It most likely takes a week or so to get response, but it solves the issue (besides of course the move to the global api url)
I wish you were right⌠I used to use the code below to get data, where !secret solarman_api_url was https://api.solarmanpv.com/device/v1.0/currentData?appId=MyAppId&language=en&=
Changing it to globalapi.solarmanpv.com didnât give any dataâŚ
- platform: rest
resource: !secret solarman_api_url
method: POST
name: "DV1"
scan_interval: 180
headers:
Authorization: !secret solarman_authorization
Content-Type: application/json
payload: '{ "deviceSn": "MyDeviceSerial"}'
value_template: "{{ value_json.dataList[1].value }}"
OMG⌠I tried via regbin to acces the API and it worked out. I then figured out that there was a new bearer key on the new URL. Changed bearer and the info was backâŚ
To help others with the same issue. Watch the words in capitals you need to replace with you own info
To get your bearer key:
curl --request POST
âurl âhttps://globalapi.solarmanpv.com/device/v1.0/currentData?appId=YOURAPPID&language=en&=â
âheader âAuthorization: bearer HERETHEBEARERFROMSTEP1â
âheader âContent-Type: application/jsonâ
âdata â{
âdeviceSnâ: âYOURDEVICESNâ
}â
You will now get info from your inverter
so your wish came trueâŚI was right
always better to focus on checking code, syntax, etc than jumping at people telling you the proven right way to do somethingâŚglad you got there in the end
So, Iâve spent too much time trying to get this to work. Iâve finally got the Bearer token, which is a huge long alpha-numeric string with dots and dashes etc. Do I use the entire thing?
When I get to step 2 above I receive this error - {
âcodeâ: â2101006â,
âmsgâ: âinvalid paramâ,
âsuccessâ: false,
ârequestIdâ: âxxxâ
}
I believe Iâm using the correct code/syntax:
curl --request POST
âurl âhttps://globalapi.solarmanpv.com/account/v1.0/token?appId=xxx&language=enâ
âheader âAuthorization: bearer xxxâ
âheader âContent-Type: application/jsonâ
âdata â{
âdeviceSnâ: âxxxâ
}â
Assuming Iâm able to get this sorted, how do I actually use the information? Do I create sensor in the config.yaml? I have managed to get some of the solar production values to work with the direct IP connection, but I really want to get some battery data if I can.
Hi, i get this error in curl commands
{
âcodeâ: â2101025â,
âmsgâ: â{âerrorâ:âinvalid_requestâ,âerror_descriptionâ:â",âcodeâ:âAUTH_INVALID_USERNAME_OR_PASSWORDâ,âparamâ:null}",
âsuccessâ: false,
ârequestIdâ: âc93359b2c5dbdd9câ,
âaccess_tokenâ: null,
âtoken_typeâ: null,
ârefresh_tokenâ: null,
âexpires_inâ: null,
âscopeâ: null,
âuidâ: null
}
I used the email and password to access solarman.pv, where am I going wrong?
Hi Vince
Same here:
{
"code": "2101025",
"msg": "{\"error\":\"invalid_request\",\"error_description\":\"\",\"code\":\"AUTH_INVALID_USERNAME_OR_PASSWORD\",\"param\":null}",
"success": false,
"requestId": "7370cc33a1eba4c5",
"access_token": null,
"token_type": null,
"refresh_token": null,
"expires_in": null,
"scope": null,
"uid": null
}
Solarman have sent me an API ID that Iâm using for the APP ID, is this correct?
Iâve tried a few SHA256 websites, changing my Solarman password and email address but canât pull the access token.
curl --request POST \
--url 'https://api.solarmanpv.com/account/v1.0/token?appId=20xxxxxxxxxxxxx&language=en&=' \
--header 'Content-Type: application/json' \
--data '{
"appSecret": "8exxxxf9b6xxxxxxxxxxxxxxxxxxxx",
"email": "[email protected]",
"password": "b5xxxxbe78b0exxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}'
Thanks
sensors:
- name : "PV Serial Number"
value_template: >
{%- for dict_item in value_json.dataList -%}
{%- if dict_item.key == "SN1"-%}
{{dict_item.value}}
{%- endif -%}
{%- endfor -%}
unit_of_measurement: ''
- name : "PV Machine Model (New)"
value_template: >
{%- for dict_item in value_json.dataList -%}
{%- if dict_item.key == "MMN"-%}
{{dict_item.value}}
{%- endif -%}
{%- endfor -%}
unit_of_measurement: ''
- name : "PV Marketing Electricity Standard"
value_template: >
{%- for dict_item in value_json.dataList -%}
{%- if dict_item.key == "ES_STA1"-%}
{{dict_item.value}}
{%- endif -%}
{%- endfor -%}
unit_of_measurement: ''
- name : "PV Input Mode"
value_template: >
{%- for dict_item in value_json.dataList -%}
{%- if dict_item.key == "MODEi1"-%}
{{dict_item.value}}
{%- endif -%}
{%- endfor -%}
unit_of_measurement: ''
- name : "PV DSP Version"
value_template: >
{%- for dict_item in value_json.dataList -%}
{%- if dict_item.key == "DSPv1"-%}
{{dict_item.value}}
{%- endif -%}
{%- endfor -%}
unit_of_measurement: ''
- name : "PV ARM Version"
value_template: >
{%- for dict_item in value_json.dataList -%}
{%- if dict_item.key == "ARMv1"-%}
{{dict_item.value}}
{%- endif -%}
{%- endfor -%}
unit_of_measurement: ''
- name : "PV Upgrade Flag Bit"
value_template: >
{%- for dict_item in value_json.dataList -%}
{%- if dict_item.key == "UFB1"-%}
{{dict_item.value}}
{%- endif -%}
{%- endfor -%}
unit_of_measurement: ''
- name : "PV Pack1-BMSVersion"
value_template: >
{%- for dict_item in value_json.dataList -%}
{%- if dict_item.key == "BAT_1_BMS_V"-%}
{{dict_item.value}}
{%- endif -%}
{%- endfor -%}
unit_of_measurement: ''
- name : "PV Pack2-BMSVersion"
value_template: >
{%- for dict_item in value_json.dataList -%}
{%- if dict_item.key == "BAT_2_BMS_V"-%}
{{dict_item.value}}
{%- endif -%}
{%- endfor -%}
unit_of_measurement: ''
- name : "PV Pack3-BMSVersion"
value_template: >
{%- for dict_item in value_json.dataList -%}
{%- if dict_item.key == "BAT_3_BMS_V"-%}
{{dict_item.value}}
{%- endif -%}
{%- endfor -%}
unit_of_measurement: ''
- name : "PV Pack4-BMSVersion"
value_template: >
{%- for dict_item in value_json.dataList -%}
{%- if dict_item.key == "BAT_4_BMS_V"-%}
{{dict_item.value}}
{%- endif -%}
{%- endfor -%}
unit_of_measurement: ''
- name : "PV Pack5-BMSVersion"
value_template: >
{%- for dict_item in value_json.dataList -%}
{%- if dict_item.key == "BAT_5_BMS_V"-%}
{{dict_item.value}}
{%- endif -%}
{%- endfor -%}
unit_of_measurement: ''
I am able to pull data from only 2 of the above defined sensors
hi, how do I actually run this? running HA on a VM.