Python framework beta support for secure connections

Python and python framework

Moderator: leecollings

Post Reply
User avatar
Dnpwwo
Posts: 820
Joined: Sunday 23 March 2014 9:00
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Melbourne, Australia
Contact:

Python framework beta support for secure connections

Post by Dnpwwo »

The next beta fill formally add secure transport support to the Python framework.

Secure protocols HTTPS and MQTTS are supported but any TCP/IP connection can be made secure by specifying TLS/IP as the transport instead.

For Example:

Code: Select all

self.httpConn = Domoticz.Connection(Name="Test", Transport="TLS/IP", Protocol="HTTP", Address=Parameters["Address"], Port="443")
self.httpConn = Domoticz.Connection(Name="Test", Transport="TCP/IP", Protocol="HTTPS", Address=Parameters["Address"], Port="443")
are functionally the same and will open an SSL session to the target address.

Domoticz does not rigorously enforce TLS certificate checks as yet so this should only be used to trusted targets.
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
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest