Git Product home page Git Product logo

pythonihcsdk's People

Contributors

aradoorolesen avatar dingusdk avatar fgrebenicek avatar jakobdalsgaard avatar msvinth avatar taisholland avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

pythonihcsdk's Issues

IHC Visual Controller

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

How to use the `example.py`?

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

get_user_log() has an error

`In [9]: ihc.client.get_user_log()

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.