So I am wondering, does anyone use the august lock with august connect in their setup? I currently live in an apartment where I can’t fully change the locks and the the august lock fits in perfectly with this. I would like to hook it into my home assistant setup I recently started growing (two aeontec zw098 light bulbs with an ecobee 3 lite wifi thermostat). Any help or point would be appreciated.
I got the lock working with the wink component without the need for the wink hub. Turns out the lock works natively with the api as long as you have an august connect for each lock.
I got it to work following this example: Wink Component - Home-assistant.io . This should get you up and running while you wait for your api keys from wink.
@Bman Can you give me some more detail on your setup? Do you have an August connect (I would assume so…)? How does it work without the hub? Does it lock and unlock properly as it’s supposed to?
Sure, so to use the component, I have an august connect. This allows me to use the wink component without a physical wink hub (in accordance to wink’s website). It locks and unlocks properly although the august app does a better job. This may be do to the distance the august connect is from the lock since the august app takes a while to connect remotely. The distance thing came up in the setup of it. Its not bad though.
Hey @Bman
Got my keys and installed the wink following the new instructions. Did you have any problem after restarting the server? What happens to me now is that as soon as I restart I get an error saying that the wink config is wrong even tho the first time it worked fine and I got all the way to the configurator and api authorization.
How did you add the key to Home assistant? If its in the configuration file, you need to take it out. Then restart the server and there should be a configuration card that comes up for wink and that’s where you add the key you received from wink, as I recall.
That part worked perfect. The problem is when I restart the server. It says that there was a problem with the config.
For clarity here are the steps I did:
Got the keys
added wink: to the configuration.yaml
On the configurator box on the dashboard I added the ClientId and Secret
It asked me to go to the Redirect http://myip:port/auth/wink/callback
Accessing the url I was asked to log in.
Logged in and got a message saying that everything was ok and suggesting to restart
file .wink.conf was created with acees_token, client_id, client_secret and refresh_token
After restarting:
Error on the log files saying that there was an issue with the configuration
2017-11-03 12:01:43 ERROR (MainThread) [homeassistant.setup] Error during setup of component wink
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/homeassistant/setup.py", line 194, in _async_setup_component
component.setup, hass, processed_config)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/futures.py", line 332, in __iter__
yield self # This tells Task to wait for completion.
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/tasks.py", line 250, in _wakeup
future.result()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/futures.py", line 245, in result
raise self._exception
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/concurrent/futures/thread.py", line 55, in run
result = self.fn(*self.args, **self.kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/homeassistant/components/wink/__init__.py", line 361, in setup
pywink.get_subscription_key())
File "/Users/pedro/.homeassistant/deps/lib/python/site-packages/pywink/api.py", line 566, in get_subscription_key
first_device = response_dict.get('data')[0]
IndexError: list index out of range
`indent preformatted text by 4 spaces`
That seems odd - I would raise as an issue on GitHub. What it looks like is happening is that pywink is requesting a list of hubs, getting none, and so erroring. Clearly you should be able to use the platform without a hub.
I’m expecting API keys in a couple of days, will be interesting to see if I can reproduce this error.
Actually scratch that. Took a look at the python-wink code and it looks like get_subscripion_key() calls on wink to provide it with a response of a dict containing your devices, and expects that response to not be empty so that it can use the first device in the dict. Might be an obvious question but do you have any devices added to your wink app/account?
Hmm yeah something strange is happening. So that call to get_subscription_key basically calls the api.wink.com/users/me/wink_devices endpoint to get all the accounts devices, and then gets the subscription key from the first device. Apparently no devices are being returned…
@miratur
Ahhh okay I was able to re-crete this with a new account. So… not sure how it should be handled, shouldn’t crash thats for sure lol. I am guessing that you don’t have the lock paired to your account yet? You need to pair the August lock with the offical Wink app on iOS or Android first and then restart HomeAssistant.
I suppose you could query wink_devices early on in the initialization process and if it returns NULL you could log “No devices found in your Wink account. Please pair your devices with Wink and then restart Home Assistant.” Or something to that effect - after all, the wink platform is pretty useless if wink doesn’t have any devices to control/pass to Home Assistant.