adamkempenich / magichome-python

MagicHome Wifi protocol for python.
MIT License
58 stars 16 forks source link

Initiation not working #3

Closed reg-is closed 8 years ago

reg-is commented 8 years ago

In the readme file, it is writen to use the MagicHomeAPi() method, which isn't defined. Shouldn't it be the __init__() method instead?

For __init__(self, device_ip, device_type, keep_alive=True), what am I suposed to enter for self and keep_alive=True?

UPDATE: Sorry, I never worked with Python before. I found the solution for my problem now

adamkempenich commented 8 years ago

Sorry to not get back to this! If anyone else is unfamiliar with Python and happens upon this, self carries information about each device into each of the functions. _keep/alive=true fixes a bug in the MagicHome devices, where a device will 'sleep' if it doesn't receive any communication after an extended amount of time. If you don't want this functionality, you can override it by setting your third function parameter to false.

TL;DR, no values are needed for self and _keep/alive