dingusdk / pythonihcsdk Goto Github PK
View Code? Open in Web Editor NEWAn library for making soap connection to the IHC Controller using python
License: GNU General Public License v3.0
An library for making soap connection to the IHC Controller using python
License: GNU General Public License v3.0
Really cool project!
i am today using openhab to integrate with my ihc controller and it is working ok
i am now trying to migrate my openhab installtion to Home Assistant and found your lib.
my controller will only serve APIs over https and when i try to run "python3 ihctest.py https://ip username password" i get a starange ssl error.
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 578, in urlopen
chunked=chunked)
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 351, in _make_request
self._validate_conn(conn)
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 816, in validate_conn
conn.connect()
File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 289, in connect
ssl_version=resolved_ssl_version)
File "/usr/lib/python3/dist-packages/urllib3/util/ssl.py", line 308, in ssl_wrap_socket
return context.wrap_socket(sock, server_hostname=server_hostname)
File "/usr/lib/python3.5/ssl.py", line 385, in wrap_socket
_context=self)
File "/usr/lib/python3.5/ssl.py", line 760, in init
self.do_handshake()
File "/usr/lib/python3.5/ssl.py", line 996, in do_handshake
self._sslobj.do_handshake()
File "/usr/lib/python3.5/ssl.py", line 641, in do_handshake
self._sslobj.do_handshake()
ssl.SSLError: [SSL: PARSE_TLSEXT] parse tlsext (_ssl.c:720)
i am using python 3.5.3 on Ubuntu 17
do you have any idea why it is not working
it might be worth mentioning that IHC Captain also works ok with my IHC controller
Hi
I'm just trying to get a better knowledge of how to use the library outside Home Assistant.
By cloning the repo, and installing the modules, it's returning the following with python 2.7:
Traceback (most recent call last):
File "example.py", line 11, in <module>
from ihcsdk.ihccontroller import IHCController
File "/home/USERNAME_REMOVED/_Testing/PythonIhcSdk/ihcsdk/ihccontroller.py", line 22
def __init__(self, url: str, username: str, password: str):
Executed with python 3.5, it's returning the following error:
Traceback (most recent call last):
File "example.py", line 11, in <module>
from ihcsdk.ihccontroller import IHCController
File "/home/USERNAME_REMOVED/_Testing/PythonIhcSdk/ihcsdk/ihccontroller.py", line 39
f"{url}/wsdl/controller.wsdl", verify=client.connection.cert_verify()
I have tried to add the parameters in the execution-command:
python3 example.py http://IPGOESHERE:5050 Username Password IHCDeviceID
And by creating the .parameters
, with no luck, too.
I tried to pull one of the older releases, with no luck, tested with Python 3.5:
Traceback (most recent call last):
File "example.py", line 11, in <module>
from ihcsdk.ihccontroller import IHCController
File "/home/USERNAME_REMOVED/_Testing/TestNew/PythonIhcSdk-2.7.1/ihcsdk/ihccontroller.py", line 9, in <module>
from ihcsdk.ihcclient import IHCSoapClient, IHCSTATE_READY
File "/home/USERNAME_REMOVED/_Testing/TestNew/PythonIhcSdk-2.7.1/ihcsdk/ihcclient.py", line 311
f'./SOAP-ENV:Body/ns1:getSystemInfo1/ns1:{param}',
^
SyntaxError: invalid syntax
error Traceback (most recent call last)
in ()
----> 1 ihc.client.get_user_log()
~/devel/priv/PythonIhcSdk/ihcsdk/ihcclient.py in get_user_log(self, language)
243 if not base64data:
244 return False
--> 245 compresseddata = base64.b64decode(base64data)
246 return zlib.decompress(compresseddata, 16+zlib.MAX_WBITS).decode('ISO-8859-1')
247 return False
error: Error -3 while decompressing data: incorrect header check`
If, I however, just do
compresseddata = base64.b64decode(base64data) return (compresseddata.decode('UTF-8'))
in ihcclient.py/get_user_log
I get a correctly formatted log in my console. So it might be that my version of the IHC doesn't compress the log on output?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.