(06.05.2021, 09:44)admin Wrote: You have an outdated firmware that causes this error.
Try requesting like this:
Code:https = require('ssl.https')
url = 'https://monitoringapi.solaredge.com/site/1234567/overview?api_key=mykey'
resp = {}
res, code, headers = https.request({
url = url,
method = 'GET',
sink = ltn12.sink.table(resp),
protocol = 'tlsv12'
})
resp = table.concat(resp)
log(res, code, resp)
Success!
The strange thing is that my original script not always fails, sometimes I can get the data...
Thanks.
(06.05.2021, 10:15)baggins Wrote:(06.05.2021, 09:44)admin Wrote: You have an outdated firmware that causes this error.
Try requesting like this:
Code:https = require('ssl.https')
url = 'https://monitoringapi.solaredge.com/site/1234567/overview?api_key=mykey'
resp = {}
res, code, headers = https.request({
url = url,
method = 'GET',
sink = ltn12.sink.table(resp),
protocol = 'tlsv12'
})
resp = table.concat(resp)
log(res, code, resp)
Success!
The strange thing is that my original script not always fails, sometimes I can get the data...
Thanks.
Well, unfortunately now I get the same error as with the original script. Two times out of three it fails and then for some reason it works...