1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-22 02:51:03 +00:00

Merge pull request #1364 from quotengrote/deye_apikey

Deye/Solarman: remove AppId variable
This commit is contained in:
Kenyon Ralph 2023-04-10 09:17:08 -07:00 committed by GitHub
commit e2c256a7e5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -68,7 +68,7 @@ function get_data {
## create request body for panel data
SLRM_DATA_REQUEST_BODY=$(jq --null-input --arg deviceSn "${SLRM_DEVICE_SN}" '{"deviceSn": $deviceSn}')
## get panel data
SLRM_DATA=$(curl --silent --request POST --url "https://api.solarmanpv.com/device/v1.0/currentData?appId=${SLRM_APPID}&language=en&=" --header "Authorization: bearer ${SLRM_BEARER_TOKEN}" --header 'Content-Type: application/json' --data "${SLRM_DATA_REQUEST_BODY}")
SLRM_DATA=$(curl --silent --request POST --url "https://api.solarmanpv.com/device/v1.0/currentData?language=en&=" --header "Authorization: bearer ${SLRM_BEARER_TOKEN}" --header 'Content-Type: application/json' --data "${SLRM_DATA_REQUEST_BODY}")
# wenn "device not found" nicht gefunden wird, dann breche aus beiden Schleifen heraus
if [[ $(echo "$SLRM_DATA" | grep -v -i "device not found") ]] ; then
retry="0"