Wink client_id/client_secret setup isn't working

Yes. All I have in the config is “wink:” nothing after it. The log I posted was grep’d to “wink”. Here is the whole thing; I copied only the relevant parts, I think, as the whole log is pretty long:

Jul 12 20:04:28 centbox scl[25182]: 2017-07-12 20:04:28 INFO (Thread-3) [custom_components.wink] Using new oauth authentication
Jul 12 20:04:28 centbox scl[25182]: 2017-07-12 20:04:28 INFO (Thread-3) [homeassistant.loader] Loaded configurator from homeassistant.components.configurator
Jul 12 20:04:28 centbox scl[25182]: 2017-07-12 20:04:28 ERROR (MainThread) [homeassistant.setup] Error during setup of component wink
Jul 12 20:04:28 centbox scl[25182]: Traceback (most recent call last):
Jul 12 20:04:28 centbox scl[25182]: File "/opt/homeassistant/lib/python3.5/site-packages/homeassistant/setup.py", line 190, in _async_setup_component
Jul 12 20:04:28 centbox scl[25182]: component.setup, hass, processed_config)
Jul 12 20:04:28 centbox scl[25182]: File "/opt/rh/rh-python35/root/usr/lib64/python3.5/asyncio/futures.py", line 358, in __iter__
Jul 12 20:04:28 centbox scl[25182]: yield self  # This tells Task to wait for completion.
Jul 12 20:04:28 centbox scl[25182]: File "/opt/rh/rh-python35/root/usr/lib64/python3.5/asyncio/tasks.py", line 290, in _wakeup
Jul 12 20:04:28 centbox scl[25182]: future.result()
Jul 12 20:04:28 centbox scl[25182]: File "/opt/rh/rh-python35/root/usr/lib64/python3.5/asyncio/futures.py", line 274, in result
Jul 12 20:04:28 centbox scl[25182]: raise self._exception
Jul 12 20:04:28 centbox scl[25182]: File "/opt/rh/rh-python35/root/usr/lib64/python3.5/concurrent/futures/thread.py", line 55, in run
Jul 12 20:04:28 centbox scl[25182]: result = self.fn(*self.args, **self.kwargs)
Jul 12 20:04:28 centbox scl[25182]: File "/opt/homeassistant/custom_components/wink.py", line 228, in setup
Jul 12 20:04:28 centbox scl[25182]: _request_app_setup(hass, config)
Jul 12 20:04:28 centbox scl[25182]: File "/opt/homeassistant/custom_components/wink.py", line 148, in _request_app_setup
Jul 12 20:04:28 centbox scl[25182]: 'type': 'string'}]
Jul 12 20:04:28 centbox scl[25182]: File "/opt/homeassistant/lib/python3.5/site-packages/homeassistant/components/configurator.py", line 52, in request_config
Jul 12 20:04:28 centbox scl[25182]: request_id = instance.request_config(
Jul 12 20:04:28 centbox scl[25182]: AttributeError: 'bool' object has no attribute 'request_config'
Jul 12 20:04:28 centbox scl[25182]: 2017-07-12 20:04:28 INFO (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: service_call_id=140247765255840-1, service_data=notification_id=invalid_config, title=Invalid config, message=The following components and platforms could not be set up:
Jul 12 20:04:28 centbox scl[25182]: * [wink](https://home-assistant.io/components/wink/)
Jul 12 20:04:28 centbox scl[25182]: Please check your config, service=create, domain=persistent_notification>
Jul 12 20:04:28 centbox scl[25182]: 2017-07-12 20:04:28 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: old_state=None, entity_id=persistent_notification.invalid_config, new_state=<state persistent_notification.invalid_config=The following components and platforms could not be set up:
Jul 12 20:04:28 centbox scl[25182]: * [wink](https://home-assistant.io/components/wink/)
Jul 12 20:04:28 centbox scl[25182]: Please check your config; title=Invalid config @ 2017-07-12T20:04:28.220209-04:00>>
Jul 12 20:04:28 centbox scl[25182]: 2017-07-12 20:04:28 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_executed[L]: service_call_id=140247765255840-1>
Jul 12 20:04:28 centbox scl[25182]: 2017-07-12 20:04:28 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: old_state=None, entity_id=media_player.sony_bravia_tv, new_state=<state media_player.sony_bravia_tv=on; media_content_id=App, is_volume_muted=False, supported_features=19901, friendly_name=Sony Bravia TV, source_list=[], media_title=App @ 2017-07-12T20:04:28.384288-04:00>>
Jul 12 20:04:30 centbox scl[25182]: 2017-07-12 20:04:30 INFO (Thread-4) [homeassistant.components.media_player.onkyo] Resetting connection to Receiver

Did you perform any function in the frontend with the wink configurator? Or does it not get that far?

The invalid config error seems strange.

Can you run the below command in your config directory and see what it says?

hass -c . --script check_config

It never gets that far, I get a error box on the States page:

The following components and platforms could not be set up:

  • wink

The output from that command is:

[root@centbox homeassistant]# source /opt/homeassistant/bin/activate
(homeassistant)[root@centbox homeassistant]# hass -c . --script check_config
Testing configuration at /opt/homeassistant/.
2017-07-12 20:20:56 INFO (MainThread) [homeassistant.setup] Setting up http
2017-07-12 20:20:56 INFO (MainThread) [homeassistant.setup] Setting up recorder
2017-07-12 20:20:56 INFO (MainThread) [homeassistant.setup] Setup of domain http took 0.0 seconds.
2017-07-12 20:20:56 INFO (MainThread) [homeassistant.setup] Setup of domain recorder took 0.0 seconds.
2017-07-12 20:20:56 INFO (MainThread) [homeassistant.setup] Setting up api
2017-07-12 20:20:56 INFO (MainThread) [homeassistant.setup] Setting up websocket_api
2017-07-12 20:20:56 INFO (MainThread) [homeassistant.setup] Setting up history
2017-07-12 20:20:56 INFO (MainThread) [homeassistant.setup] Setup of domain api took 0.0 seconds.
2017-07-12 20:20:56 INFO (MainThread) [homeassistant.setup] Setup of domain websocket_api took 0.0 seconds.
2017-07-12 20:20:56 INFO (MainThread) [homeassistant.setup] Setup of domain history took 0.0 seconds.
2017-07-12 20:20:56 INFO (MainThread) [homeassistant.setup] Setting up frontend
2017-07-12 20:20:56 INFO (MainThread) [homeassistant.setup] Setup of domain frontend took 0.0 seconds.
2017-07-12 20:20:56 INFO (MainThread) [homeassistant.setup] Setting up updater
2017-07-12 20:20:56 INFO (MainThread) [homeassistant.setup] Setting up sensor
2017-07-12 20:20:56 INFO (MainThread) [homeassistant.setup] Setting up sun
2017-07-12 20:20:56 INFO (MainThread) [homeassistant.setup] Setting up conversation
2017-07-12 20:20:56 INFO (MainThread) [homeassistant.setup] Setting up group
2017-07-12 20:20:56 INFO (MainThread) [homeassistant.setup] Setting up wink
2017-07-12 20:20:56 INFO (MainThread) [homeassistant.setup] Setup of domain updater took 0.1 seconds.
2017-07-12 20:20:56 INFO (MainThread) [homeassistant.setup] Setup of domain sensor took 0.0 seconds.
2017-07-12 20:20:56 INFO (MainThread) [homeassistant.setup] Setup of domain sun took 0.0 seconds.
2017-07-12 20:20:56 INFO (MainThread) [homeassistant.setup] Setup of domain conversation took 0.0 seconds.
2017-07-12 20:20:56 INFO (MainThread) [homeassistant.setup] Setup of domain group took 0.0 seconds.
2017-07-12 20:20:56 INFO (MainThread) [homeassistant.setup] Setup of domain wink took 0.0 seconds.
2017-07-12 20:20:56 INFO (MainThread) [homeassistant.setup] Setting up media_player
2017-07-12 20:20:56 INFO (MainThread) [homeassistant.setup] Setting up logbook
2017-07-12 20:20:56 INFO (MainThread) [homeassistant.setup] Setting up tts
2017-07-12 20:20:56 INFO (MainThread) [homeassistant.setup] Setting up config
2017-07-12 20:20:56 INFO (MainThread) [homeassistant.setup] Setup of domain media_player took 0.0 seconds.
2017-07-12 20:20:56 INFO (MainThread) [homeassistant.setup] Setup of domain logbook took 0.0 seconds.
2017-07-12 20:20:56 INFO (MainThread) [homeassistant.setup] Setup of domain tts took 0.0 seconds.
2017-07-12 20:20:56 INFO (MainThread) [homeassistant.setup] Setting up automation
2017-07-12 20:20:56 INFO (MainThread) [homeassistant.setup] Setup of domain config took 0.0 seconds.
2017-07-12 20:20:56 INFO (MainThread) [homeassistant.setup] Setup of domain automation took 0.0 seconds.
(homeassistant)[root@centbox homeassistant]#

I’m pretty sure it is using your py script, but is there a way to confirm? Do I need to set permissions on the file? Maybe +x?

Can you PM me your config and a directory listing from inside your config directory and the custom_component folder?

Also, maybe run this on the wink.py

pylint wink.py

Its there a tutorial to get this to work? SORRY, I’m super new. I just install hasbian, I have all my keys from Wink also I went to your GitHub and copy the file wink.py and save in notepad but where do I place that file?

Thank you

No problem. Place the wink.py into a newly created folder inside your config folder called custom_component

Make sure you don’t have any settings under wink: in your config and then restart.

Follow the instruction given in the frontend.

when I create the folder \HASSBIAN\homeassistant\custom_component and i put the file wink.py home assist will not load

The custom component folder needs to be in the same folder as your .yaml files.

Yes thas is where i created the folder custom_component.

It’s long, I’m sorry:

[root@centbox homeassistant]# scl enable rh-python35 bash
[root@centbox homeassistant]# source /opt/homeassistant/bin/activate
(homeassistant)[root@centbox homeassistant]# pylint wink.py
bash: pylint: command not found
(homeassistant)[root@centbox homeassistant]# pip3 install pylint
Collecting pylint
  Downloading pylint-1.7.2-py2.py3-none-any.whl (644kB)
    100% |████████████████████████████████| 647kB 387kB/s
Requirement already satisfied (use --upgrade to upgrade): six in ./lib/python3.5/site-packages (from pylint)
Collecting isort>=4.2.5 (from pylint)
  Downloading isort-4.2.15-py2.py3-none-any.whl (43kB)
    100% |████████████████████████████████| 45kB 2.9MB/s
Collecting mccabe (from pylint)
  Downloading mccabe-0.6.1-py2.py3-none-any.whl
Collecting astroid>=1.5.1 (from pylint)
  Downloading astroid-1.5.3-py2.py3-none-any.whl (269kB)
    100% |████████████████████████████████| 270kB 851kB/s
Collecting lazy-object-proxy (from astroid>=1.5.1->pylint)
  Downloading lazy-object-proxy-1.3.1.tar.gz
Collecting wrapt (from astroid>=1.5.1->pylint)
  Downloading wrapt-1.10.10.tar.gz
Building wheels for collected packages: lazy-object-proxy, wrapt
  Running setup.py bdist_wheel for lazy-object-proxy
  Complete output from command /opt/homeassistant/bin/python3 -c "import setuptools;__file__='/tmp/pip-build-w819b2gx/lazy-object-proxy/setup.py';exec(compile(open(__fil                            e__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /tmp/tmp69jrdmdcpip-wheel-:
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.5
  creating build/lib.linux-x86_64-3.5/lazy_object_proxy
  copying src/lazy_object_proxy/__init__.py -> build/lib.linux-x86_64-3.5/lazy_object_proxy
  copying src/lazy_object_proxy/slots.py -> build/lib.linux-x86_64-3.5/lazy_object_proxy
  copying src/lazy_object_proxy/simple.py -> build/lib.linux-x86_64-3.5/lazy_object_proxy
  copying src/lazy_object_proxy/compat.py -> build/lib.linux-x86_64-3.5/lazy_object_proxy
  copying src/lazy_object_proxy/utils.py -> build/lib.linux-x86_64-3.5/lazy_object_proxy
  running egg_info
  writing src/lazy_object_proxy.egg-info/PKG-INFO
  writing dependency_links to src/lazy_object_proxy.egg-info/dependency_links.txt
  writing top-level names to src/lazy_object_proxy.egg-info/top_level.txt
  warning: manifest_maker: standard file '-c' not found

  reading manifest file 'src/lazy_object_proxy.egg-info/SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  warning: no files found matching '.isort.cfg'
  warning: no previously-included files matching '*.py[cod]' found anywhere in distribution
  warning: no previously-included files matching '__pycache__' found anywhere in distribution
  warning: no previously-included files matching '*.so' found anywhere in distribution
  warning: no previously-included files matching '*.dylib' found anywhere in distribution
  writing manifest file 'src/lazy_object_proxy.egg-info/SOURCES.txt'
  copying src/lazy_object_proxy/cext.c -> build/lib.linux-x86_64-3.5/lazy_object_proxy
  running build_ext
  building 'lazy_object_proxy.cext' extension
  creating build/temp.linux-x86_64-3.5
  creating build/temp.linux-x86_64-3.5/src
  creating build/temp.linux-x86_64-3.5/src/lazy_object_proxy
  gcc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp                            -buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -I/opt/rh/rh-python35/root/usr/include -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -f                            exceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -Isrc/lazy_object_proxy -I/opt/                            rh/rh-python35/root/usr/include/python3.5m -c src/lazy_object_proxy/cext.c -o build/temp.linux-x86_64-3.5/src/lazy_object_proxy/cext.o
  gcc -pthread -shared -L/opt/rh/rh-python35/root/usr/lib64-Wl,-z,relro build/temp.linux-x86_64-3.5/src/lazy_object_proxy/cext.o -L/opt/rh/rh-python35/root/usr/lib64 -lp                            ython3.5m -o build/lib.linux-x86_64-3.5/lazy_object_proxy/cext.cpython-35m-x86_64-linux-gnu.so
  installing to build/bdist.linux-x86_64/wheel
  running install
  running install_lib
  creating build/bdist.linux-x86_64
  creating build/bdist.linux-x86_64/wheel
  creating build/bdist.linux-x86_64/wheel/lazy_object_proxy
  copying build/lib.linux-x86_64-3.5/lazy_object_proxy/__init__.py -> build/bdist.linux-x86_64/wheel/lazy_object_proxy
  copying build/lib.linux-x86_64-3.5/lazy_object_proxy/slots.py -> build/bdist.linux-x86_64/wheel/lazy_object_proxy
  copying build/lib.linux-x86_64-3.5/lazy_object_proxy/simple.py -> build/bdist.linux-x86_64/wheel/lazy_object_proxy
  copying build/lib.linux-x86_64-3.5/lazy_object_proxy/compat.py -> build/bdist.linux-x86_64/wheel/lazy_object_proxy
  copying build/lib.linux-x86_64-3.5/lazy_object_proxy/utils.py -> build/bdist.linux-x86_64/wheel/lazy_object_proxy
  copying build/lib.linux-x86_64-3.5/lazy_object_proxy/cext.c -> build/bdist.linux-x86_64/wheel/lazy_object_proxy
  copying build/lib.linux-x86_64-3.5/lazy_object_proxy/cext.cpython-35m-x86_64-linux-gnu.so -> build/bdist.linux-x86_64/wheel/lazy_object_proxy
  running install_egg_info
  Copying src/lazy_object_proxy.egg-info to build/bdist.linux-x86_64/wheel/lazy_object_proxy-1.3.1-py3.5.egg-info
  running install_scripts
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/tmp/pip-build-w819b2gx/lazy-object-proxy/setup.py", line 115, in <module>
      for root, _, _ in os.walk('src')
    File "/opt/rh/rh-python35/root/usr/lib64/python3.5/distutils/core.py", line 148, in setup
      dist.run_commands()
    File "/opt/rh/rh-python35/root/usr/lib64/python3.5/distutils/dist.py", line 955, in run_commands
      self.run_command(cmd)
    File "/opt/rh/rh-python35/root/usr/lib64/python3.5/distutils/dist.py", line 974, in run_command
      cmd_obj.run()
    File "/opt/homeassistant/lib/python3.5/site-packages/wheel/bdist_wheel.py", line 213, in run
      archive_basename = self.get_archive_basename()
    File "/opt/homeassistant/lib/python3.5/site-packages/wheel/bdist_wheel.py", line 161, in get_archive_basename
      impl_tag, abi_tag, plat_tag = self.get_tag()
    File "/opt/homeassistant/lib/python3.5/site-packages/wheel/bdist_wheel.py", line 155, in get_tag
      assert tag == supported_tags[0]
  AssertionError

  ----------------------------------------
  Failed building wheel for lazy-object-proxy
  Running setup.py bdist_wheel for wrapt
  Complete output from command /opt/homeassistant/bin/python3 -c "import setuptools;__file__='/tmp/pip-build-w819b2gx/wrapt/setup.py';exec(compile(open(__file__).read().                            replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /tmp/tmp4wvueddmpip-wheel-:
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.5
  creating build/lib.linux-x86_64-3.5/wrapt
  copying src/wrapt/__init__.py -> build/lib.linux-x86_64-3.5/wrapt
  copying src/wrapt/arguments.py -> build/lib.linux-x86_64-3.5/wrapt
  copying src/wrapt/decorators.py -> build/lib.linux-x86_64-3.5/wrapt
  copying src/wrapt/importer.py -> build/lib.linux-x86_64-3.5/wrapt
  copying src/wrapt/wrappers.py -> build/lib.linux-x86_64-3.5/wrapt
  running build_ext
  building 'wrapt._wrappers' extension
  creating build/temp.linux-x86_64-3.5
  creating build/temp.linux-x86_64-3.5/src
  creating build/temp.linux-x86_64-3.5/src/wrapt
  gcc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp                            -buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -I/opt/rh/rh-python35/root/usr/include -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -f                            exceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/opt/rh/rh-python35/root/usr/                            include/python3.5m -c src/wrapt/_wrappers.c -o build/temp.linux-x86_64-3.5/src/wrapt/_wrappers.o
  gcc -pthread -shared -L/opt/rh/rh-python35/root/usr/lib64-Wl,-z,relro build/temp.linux-x86_64-3.5/src/wrapt/_wrappers.o -L/opt/rh/rh-python35/root/usr/lib64 -lpython3.                            5m -o build/lib.linux-x86_64-3.5/wrapt/_wrappers.cpython-35m-x86_64-linux-gnu.so
  installing to build/bdist.linux-x86_64/wheel
  running install
  running install_lib
  creating build/bdist.linux-x86_64
  creating build/bdist.linux-x86_64/wheel
  creating build/bdist.linux-x86_64/wheel/wrapt
  copying build/lib.linux-x86_64-3.5/wrapt/__init__.py -> build/bdist.linux-x86_64/wheel/wrapt
  copying build/lib.linux-x86_64-3.5/wrapt/arguments.py -> build/bdist.linux-x86_64/wheel/wrapt
  copying build/lib.linux-x86_64-3.5/wrapt/decorators.py -> build/bdist.linux-x86_64/wheel/wrapt
  copying build/lib.linux-x86_64-3.5/wrapt/importer.py -> build/bdist.linux-x86_64/wheel/wrapt
  copying build/lib.linux-x86_64-3.5/wrapt/wrappers.py -> build/bdist.linux-x86_64/wheel/wrapt
  copying build/lib.linux-x86_64-3.5/wrapt/_wrappers.cpython-35m-x86_64-linux-gnu.so -> build/bdist.linux-x86_64/wheel/wrapt
  running install_egg_info
  running egg_info
  creating src/wrapt.egg-info
  writing dependency_links to src/wrapt.egg-info/dependency_links.txt
  writing src/wrapt.egg-info/PKG-INFO
  writing top-level names to src/wrapt.egg-info/top_level.txt
  writing manifest file 'src/wrapt.egg-info/SOURCES.txt'
  warning: manifest_maker: standard file '-c' not found

  reading manifest file 'src/wrapt.egg-info/SOURCES.txt'
  writing manifest file 'src/wrapt.egg-info/SOURCES.txt'
  Copying src/wrapt.egg-info to build/bdist.linux-x86_64/wheel/wrapt-1.10.10-py3.5.egg-info
  running install_scripts
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/tmp/pip-build-w819b2gx/wrapt/setup.py", line 94, in <module>
      run_setup(with_extensions=True)
    File "/tmp/pip-build-w819b2gx/wrapt/setup.py", line 70, in run_setup
      setup(**setup_kwargs_tmp)
    File "/opt/rh/rh-python35/root/usr/lib64/python3.5/distutils/core.py", line 148, in setup
      dist.run_commands()
    File "/opt/rh/rh-python35/root/usr/lib64/python3.5/distutils/dist.py", line 955, in run_commands
      self.run_command(cmd)
    File "/opt/rh/rh-python35/root/usr/lib64/python3.5/distutils/dist.py", line 974, in run_command
      cmd_obj.run()
    File "/opt/homeassistant/lib/python3.5/site-packages/wheel/bdist_wheel.py", line 213, in run
      archive_basename = self.get_archive_basename()
    File "/opt/homeassistant/lib/python3.5/site-packages/wheel/bdist_wheel.py", line 161, in get_archive_basename
      impl_tag, abi_tag, plat_tag = self.get_tag()
    File "/opt/homeassistant/lib/python3.5/site-packages/wheel/bdist_wheel.py", line 155, in get_tag
      assert tag == supported_tags[0]
  AssertionError

  ----------------------------------------
  Failed building wheel for wrapt
Failed to build lazy-object-proxy wrapt
Installing collected packages: isort, mccabe, lazy-object-proxy, wrapt, astroid, pylint
  Running setup.py install for lazy-object-proxy
  Running setup.py install for wrapt
Successfully installed astroid-1.5.3 isort-4.2.15 lazy-object-proxy-1.3.1 mccabe-0.6.1 pylint-1.7.2 wrapt-1.10.10
(homeassistant)[root@centbox homeassistant]# pylint wink.py
No config file found, using default configuration
************* Module wink.py
F:  1, 0: No module named wink.py (fatal)
(homeassistant)[root@centbox homeassistant]# cd /opt/homeassistant/custom_components/
(homeassistant)[root@centbox custom_components]# pylint wink.py
No config file found, using default configuration
************* Module wink
C:485, 0: Trailing newlines (trailing-newlines)
R:177, 0: Too many local variables (23/15) (too-many-locals)
E:179, 4: Unable to import 'pywink' (import-error)
E:180, 4: Unable to import 'pubnubsubhandler' (import-error)
W:281,24: Unused argument 'event_time' (unused-argument)
W:295,27: Unused argument 'event' (unused-argument)
W:301,26: Unused argument 'event' (unused-argument)
W:307,21: Unused argument 'call' (unused-argument)
W:317,25: Unused argument 'call' (unused-argument)

-----------------------------------
Your code has been rated at 9.35/10

(homeassistant)[root@centbox custom_components]#

That should be custom_components with an s

ok, now it loads but it says invalid config on my dash,
I see this error 2017-07-13 11:23:57 ERROR (MainThread) [homeassistant.setup] Error during setup of component wink

i also see this in the error log
File “/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/wink.py”, line 114, in setup
email = config[DOMAIN][CONF_EMAIL]

my yaml file has wink:

1 Like

So that error is coming from the base wink.py not from the one in the custom components. Are you sure that you are using the file found here https://github.com/w1ll1am23/home-assistant/blob/wink_oauth_authorization/homeassistant/components/wink.py

@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

Thanks for helping us with this.

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.

Oh yeah maybe. Okay, here’s my version numbers:

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.

Im running the latest Hassbian RPI image

Python 3.4.2
Home Assistant
0.48.1

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.

1 Like

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.