Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

https / SSL support ? #61

Open
vntbrd opened this issue Nov 21, 2022 · 0 comments
Open

https / SSL support ? #61

vntbrd opened this issue Nov 21, 2022 · 0 comments

Comments

@vntbrd
Copy link

vntbrd commented Nov 21, 2022

Hello,

Possible to support https?
Domoticz can only be configured in https. (Self-signed or not). In this case, SmartVirtualThermostat cannot work.

For my part I modified plugin.py to add

import ssl

ctx = ssl.create_default_context()
ctx.check_hostname = False
ctx.verify_mode = ssl.CERT_NONE

And I modified line 660 (https) :

url = "https://{}:{}/json.htm?{}".format(Parameters["Address"], Parameters["Port"], parse.quote(APICall, safe="&="))

And line 670 (context=ctx) :

response = request.urlopen(req, context=ctx)

I am aware that the modification is not clean (I am not a dev). But it works for my use case.
This is a good lead for people who have the same problem as me.

Best regards,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant