Python Plugin framework - HTTPS session

Python and python framework

Moderator: leecollings

Post Reply
pipiche
Posts: 2035
Joined: Monday 02 April 2018 20:33
Target OS: Linux
Domoticz version:
Contact:

Python Plugin framework - HTTPS session

Post by pipiche »

If I'm not mistaken, the HTTPS doesn't create an https schema

Code: Select all

        if (Parameters["Mode1"] == "443"): self.sProtocol = "HTTPS"
        self.httpConn = Domoticz.Connection(Name=self.sProtocol+" Test", Transport="TCP/IP", Protocol=self.sProtocol, Address=Parameters["Address"], Port=Parameters["Mode1"])
        self.httpConn.Connect()
For instance when doing it, I can only connect via http:// schema while using https:// crash the plugin
Barberousse
Posts: 141
Joined: Wednesday 02 December 2015 21:47
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: France
Contact:

Re: Python Plugin framework - HTTPS session

Post by Barberousse »

One of my plugin (https://github.com/guillaumezin/DomoticzLinky) manages to connect with https, it even manipulates cookies, what do you mean by "via https schema"? What address do you give? What is your exact error message? What are your OS, Python and SSL library versions?
User avatar
Dnpwwo
Posts: 820
Joined: Sunday 23 March 2014 9:00
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Melbourne, Australia
Contact:

Re: Python Plugin framework - HTTPS session

Post by Dnpwwo »

You are going to need to supply a crash dump and a Python dump if possible by running from the command line and piping the output to a log.
The reasonable man adapts himself to the world; the unreasonable one persists to adapt the world to himself. Therefore all progress depends on the unreasonable man. George Bernard Shaw
pipiche
Posts: 2035
Joined: Monday 02 April 2018 20:33
Target OS: Linux
Domoticz version:
Contact:

Re: Python Plugin framework - HTTPS session

Post by pipiche »

I’m currently away. Will come back later end of the month


Envoyé de mon iPhone en utilisant Tapatalk
pipiche
Posts: 2035
Joined: Monday 02 April 2018 20:33
Target OS: Linux
Domoticz version:
Contact:

Re: Python Plugin framework - HTTPS session

Post by pipiche »

Barberousse wrote: Saturday 07 September 2019 21:12 One of my plugin (https://github.com/guillaumezin/DomoticzLinky) manages to connect with https, it even manipulates cookies, what do you mean by "via https schema"? What address do you give? What is your exact error message? What are your OS, Python and SSL library versions?
Ok, I'll investigate further, but mainly if I do https://my-domoticzip:9443 it failed, and some domoticz thread crashed, while if I do http://my-domoticzip:9443 it works

On the Server side (Domoticz) it is RPI running Fedora 30 distribution and a full re-compiled version of Domoticz beta.
On the Client side MacOS with Safari, Chrome or Firefox client

Will investigate next week and come back.

But if I look into your LinkyPlugin , if I'm not mistaken the plugin is not acting as a Web Server, but more as a Web Client towars the Enedis Webserver . In my case, the plugin implement a Web Server in order to handle Web request , and my feeling is in the Python Framework the HTTPS protocol is not implemented as such and so performed only as HTTP.
pipiche
Posts: 2035
Joined: Monday 02 April 2018 20:33
Target OS: Linux
Domoticz version:
Contact:

Re: Python Plugin framework - HTTPS session

Post by pipiche »

Dnpwwo wrote: Sunday 08 September 2019 8:07 You are going to need to supply a crash dump and a Python dump if possible by running from the command line and piping the output to a log.
Do you confirm that you have implemented the SSL part into the Python Framework when creating a WebServer ?
pipiche
Posts: 2035
Joined: Monday 02 April 2018 20:33
Target OS: Linux
Domoticz version:
Contact:

Re: Python Plugin framework - HTTPS session

Post by pipiche »

pipiche wrote: Wednesday 25 September 2019 14:56
Dnpwwo wrote: Sunday 08 September 2019 8:07 You are going to need to supply a crash dump and a Python dump if possible by running from the command line and piping the output to a log.
Do you confirm that you have implemented the SSL part into the Python Framework when creating a WebServer ?
@Dnpwwo, do you confirm that HTTPS is implemented in the python plugin Framework ? and we can use (server mode) ?
pipiche
Posts: 2035
Joined: Monday 02 April 2018 20:33
Target OS: Linux
Domoticz version:
Contact:

Re: Python Plugin framework - HTTPS session

Post by pipiche »

Please do take the HTTP Listener plugin and instead of listening on Protocol HTTP, just put HTTPS , you will see that the Python Framework simply crash
Post Reply