This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

SolarEdge monitoring website
#4
(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...
Reply


Messages In This Thread
SolarEdge monitoring website - by baggins - 04.05.2021, 13:44
RE: SolarEdge monitoring website - by baggins - 06.05.2021, 09:40
RE: SolarEdge monitoring website - by admin - 06.05.2021, 09:44
RE: SolarEdge monitoring website - by baggins - 06.05.2021, 10:15
RE: SolarEdge monitoring website - by admin - 08.05.2021, 10:25
RE: SolarEdge monitoring website - by baggins - 08.05.2021, 10:58

Forum Jump: