@StarScream159 same thing, based on your error I am pretty sure you have the correct file, but it could have some formatting errors. Can you re-download from the link above and try again?
I samba into my RPI3, inside the HASSBIAN/homeassistant folder i created the custom_components folder then inside the
custom_components folder i place the wink.py then i edit configuration.yaml with wink: then restart homeassistant
I get an error at the home page
Invalid Config
The following components and platforms could not be set up:
wink
Please check your config
This time I viewed the ārawā file from github and did a āsave page asā then moved the file to the server (instead of doing a copy + paste of the contents in vi).
This is what is in the log now:
Jul 13 10:27:02 centbox scl[26543]: 2017-07-13 10:27:02 INFO (Thread-9) [custom_components.wink] Using new oauth authentication
Jul 13 10:27:02 centbox scl[26543]: 2017-07-13 10:27:02 INFO (Thread-9) [homeassistant.loader] Loaded configurator from homeassistant.components.configurator
Jul 13 10:27:02 centbox scl[26543]: 2017-07-13 10:27:02 ERROR (MainThread) [homeassistant.setup] Error during setup of component wink
Jul 13 10:27:02 centbox scl[26543]: Traceback (most recent call last):
Jul 13 10:27:02 centbox scl[26543]: File "/opt/homeassistant/lib/python3.5/site-packages/homeassistant/setup.py", line 190, in _async_setup_component
Jul 13 10:27:02 centbox scl[26543]: component.setup, hass, processed_config)
Jul 13 10:27:02 centbox scl[26543]: File "/opt/rh/rh-python35/root/usr/lib64/python3.5/asyncio/futures.py", line 358, in __iter__
Jul 13 10:27:02 centbox scl[26543]: yield self # This tells Task to wait for completion.
Jul 13 10:27:02 centbox scl[26543]: File "/opt/rh/rh-python35/root/usr/lib64/python3.5/asyncio/tasks.py", line 290, in _wakeup
Jul 13 10:27:02 centbox scl[26543]: future.result()
Jul 13 10:27:02 centbox scl[26543]: File "/opt/rh/rh-python35/root/usr/lib64/python3.5/asyncio/futures.py", line 274, in result
Jul 13 10:27:02 centbox scl[26543]: raise self._exception
Jul 13 10:27:02 centbox scl[26543]: File "/opt/rh/rh-python35/root/usr/lib64/python3.5/concurrent/futures/thread.py", line 55, in run
Jul 13 10:27:02 centbox scl[26543]: result = self.fn(*self.args, **self.kwargs)
Jul 13 10:27:02 centbox scl[26543]: File "/opt/homeassistant/custom_components/wink.py", line 228, in setup
Jul 13 10:27:02 centbox scl[26543]: _request_app_setup(hass, config)
Jul 13 10:27:02 centbox scl[26543]: File "/opt/homeassistant/custom_components/wink.py", line 148, in _request_app_setup
Jul 13 10:27:02 centbox scl[26543]: 'type': 'string'}]
Jul 13 10:27:02 centbox scl[26543]: File "/opt/homeassistant/lib/python3.5/site-packages/homeassistant/components/configurator.py", line 52, in request_config
Jul 13 10:27:02 centbox scl[26543]: request_id = instance.request_config(
Jul 13 10:27:02 centbox scl[26543]: AttributeError: 'bool' object has no attribute 'request_config'
Jul 13 10:27:02 centbox scl[26543]: 2017-07-13 10:27:02 INFO (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: service_data=title=Invalid config, message=The following components and platforms could not be set up:
Jul 13 10:27:02 centbox scl[26543]: * [wink](https://home-assistant.io/components/wink/)
Jul 13 10:27:02 centbox scl[26543]: Please check your config, notification_id=invalid_config, service_call_id=139889918886464-1, domain=persistent_notification, service=create>
Jul 13 10:27:02 centbox scl[26543]: 2017-07-13 10:27:02 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: new_state=<state persistent_notification.invalid_config=The following components and platforms could not be set up:
Jul 13 10:27:02 centbox scl[26543]: * [wink](https://home-assistant.io/components/wink/)
Jul 13 10:27:02 centbox scl[26543]: Please check your config; title=Invalid config @ 2017-07-13T10:27:02.466192-04:00>, old_state=None, entity_id=persistent_notification.invalid_config>
I am running this with python3.4 so maybe it is an issue with python3.5? I will have to try this when I get home. I know there are a few other people running this without issue so I am not sure what is going on.
Also, what version of HA are you running?
O, and another thing. This error is coming from the configurator not from wink.py so I guess it is possible something is different in the version of HA you are running.
CentOS Linux release 7.3.1611 (Core)
Python 3.5.1 (in virtualenv)
Home Assistant v 0.48.1
Wink Hub 2 Firmware: 3.8.1-0-gaa5707514d-hub2-app
Other version information:
(homeassistant)[root@centbox homeassistant]# pip3 install --upgrade homeassistant
Requirement already up-to-date: homeassistant in ./lib/python3.5/site-packages
Requirement already up-to-date: pyyaml<4,>=3.11 in ./lib/python3.5/site-packages (from homeassistant)
Requirement already up-to-date: async-timeout==1.2.1 in ./lib/python3.5/site-packages (from homeassistant)
Requirement already up-to-date: pytz>=2017.02 in ./lib/python3.5/site-packages (from homeassistant)
Requirement already up-to-date: typing<4,>=3 in ./lib/python3.5/site-packages (from homeassistant)
Requirement already up-to-date: aiohttp==2.2.0 in ./lib/python3.5/site-packages (from homeassistant)
Requirement already up-to-date: chardet==3.0.2 in ./lib/python3.5/site-packages (from homeassistant)
Requirement already up-to-date: requests==2.14.2 in ./lib/python3.5/site-packages (from homeassistant)
Requirement already up-to-date: jinja2>=2.9.5 in ./lib/python3.5/site-packages (from homeassistant)
Requirement already up-to-date: voluptuous==0.10.5 in ./lib/python3.5/site-packages (from homeassistant)
Requirement already up-to-date: pip>=7.1.0 in ./lib/python3.5/site-packages (from homeassistant)
Requirement already up-to-date: astral==1.4 in ./lib/python3.5/site-packages (from homeassistant)
Requirement already up-to-date: multidict>=2.1.4 in ./lib/python3.5/site-packages (from aiohttp==2.2.0->homeassistant)
Requirement already up-to-date: yarl<0.11,>=0.10.0 in ./lib/python3.5/site-packages (from aiohttp==2.2.0->homeassistant)
Requirement already up-to-date: MarkupSafe>=0.23 in ./lib/python3.5/site-packages (from jinja2>=2.9.5->homeassistant)
I was thinking. Iāve had a hard time getting Home Assitant working in general. I had a lot of problems with dependencies not installing and throwing errors when starting. So Iām manually had to install a few. I know I had a hard time getting pubnubsub-handler/pubnub installed. So could it be something to do with the version of my dependencies?
Also, Iād like to add that even if I remove the OAUTH stuff and just use my email/password, I still get a ton of errors in my log related to Wink. (This was when I was using the non-custom component py file.) However, even with the errors, on the States page it didnāt say there was a problem with Wink (like a configuration error). But none of my lights/switches showed up anywhere. (Doesnāt help that I donāt really understand how to add the lights/switches. I thought it was auto.)
EDIT: Actually, I just tried it again to get you a log of what I see with just email/password & the non-custom component py file and it worked fine. I even see my lights/swtiches on the States page now. SUUUPPPER weird.
I was able to reproduce your error when running 0.48.1 but canāt in 0.49 (dev) there must have been a change to the configurator between 0.48 and now, so unfortunately you wonāt be able to run this. Sorry.
So you will not be able to use your client_id/secret until 0.49 is release (as long as this new wink.py gets added PR is still open waiting review)
While you wait you should be able to revert to username/password config and run that.
I was able to reproduce your error as well, but only when running 0.48.1 without adding the wink.py to the custom_component directory. It sounds like it isnāt picking up the file. However this doesnāt matter because like I told @StarScream159 you will not be able to use this version of the wink.py
Sorry for leading you both to believe this would work, I wasnāt aware there were changes to the configurator.
You should be able to use username/password to authenticate for now.
I see a new version was released, I upgraded but am still faced with the ā401 Response from Wink API. Maybe Bearer token is expired?ā response when I attempt to use my API creds to connect to Wink.
After I tried to set it up it keeps telling me to authorize wink by going to https://www.externaldomain.com/auth/wink , which I know wonāt work. So I saw this post and changed my base URL to the local IP.
However, I am still getting the external domain address when I try to configure Wink. I am guessing that it takes a bit to update on the Wink end of things? Did you have to wait?
Remove the second uri and make sure you are performing the initial setup on the same network 192.168.1.x
When you configure wink it will always say that external address if that is where you are accessing it, no way around it. Just hit the IP when it tells you to use the URL.
After I removed the 2nd entry I tried again and got the same error. However, this time I noticed that in the api.wink.com redirect url that comes up it was still trying to use the external domain address without a port. So I manually changed that URL in the address bar to have it point to the local address. Once I did that it was able to sign in and authorize.
Iām not sure where it pulls that redirect URL from but it didnāt forget it even when I cleared history and dns.
Thanks so much for this. Mine had almost the same problem. My URL that came up as the external address with a port, but it still would not work. Once I edited the URL to replace the external address with my internal IP address it worked.