SolarEdgeTech/pyctuator

https support

PvanHengel opened this issue · 4 comments

Good Morning,

Now that I got this up and running with the correct python version, it seems the library does not support https for registration urls. See this line here as an example:

conn = http.client.HTTPConnection(reg_url_split.hostname, reg_url_split.port)

Is there a way we can detect https vs http, or port 443 as an example, to change to use the HTTPSConnection connection?

Thanks!
Peter

Hi Peter,
That's a good question...
Will look into this.
Thanks
Michael

Thank you happy to help where possible, it might make more sense to shift and use the requests library, not sure if there is a reason for using the lower level httpconnection over that? I think it could handle both quite easily.

You are right that using requests would be much easier, however our goal and requirement was to avoid using any library that's not really really really required.
I'm sure we'll find reasonable solution without requests - i'll probably get to dive into this later this week, however if you have a reasonable workaround that doesn't require adding a dependency, please issue a PR.
Thanks again,
Michael

Fixed in v0.13.2