Python IHC soap client
Yet another ihc soap client – this time for python. This is work in progress as I am trying to get this integrated into Home Assistant.
I have not been working much in python before, but since that is the language for Home Assistant I will give it a try. I am publishing this separately in case someone has other use for it. The Home Assistant part will follow later.
Download and install
ihcsdk is now availble in PyPi so you can install it using;
pip install ihcsdk
Or get it from github here:
You should place the library in the “site-packages” folder. The location depends on your platform, but you can find it using:
python -m site --user-site On Window with python 3.6: %APPDATA%Roaming\Python\Python36\site-packages\ihcsdk On raspberry pi/linux: /lib/python3.4/site-packages/ihcsdk (use python3 on raspberry pi)
The example folder has a ihctest.py example. Run it using
python ihctest.py http://myihcip ihcusername ihcpassword ihcresourceid
The ihcresourceid should be a boolean resource. The example will connec and authenticate with the ihc controller, then read the resource, toggle it to the opposite and then setup a notification on the same resource. Try to change the resource value on the controller and you will see the example output the change.
This is more or less the functionallity from my ihc soap client library for esp8266 ported to python. It has authentication, get and set runtime values and notification.
For now I will not document the functionality further until I know if this is something that is going to be more than a experiment.