Issues with Lutron Caseta, successfully ran get_lutron_cert.py (I think)

I have many Lutron Caseta switches, and cannot for the life of me get them to talk to my home assistant instance. I have had them working in days of yore, before the get_lutron_cert.py script was necessary. I have also successfully run the script, both on my Mac and on a raspberry pi. But recently (actually months of frustration, hours of working on this) I cannot for the life of me get this to work. I know there are countless threads on this (I have read all of them) but they are all pretty old and I was wondering if anyone has a solution. Any help / pointers greatly appreciated. Please find my terminal session attached:

	(env) pi@hassbian:/home $ cd homeassistant
(env) pi@hassbian:/home/homeassistant $ cd .homeassistant
(env) pi@hassbian:/home/homeassistant/.homeassistant $ sudo rm -r env
(env) pi@hassbian:/home/homeassistant/.homeassistant $ sudo -u homeassistant -H -sto
homeassistant@hassbian:~/.homeassistant $ python3 -m venv env
homeassistant@hassbian:~/.homeassistant $ cd env
homeassistant@hassbian:~/.homeassistant/env $ mv /home/homeassistant/.homeassistant/get_lutron_cert.py /home/homeassistant/.homeassistant/env
homeassistant@hassbian:~/.homeassistant/env $ ls
bin  get_lutron_cert.py  include  lib  pyvenv.cfg  share
homeassistant@hassbian:~/.homeassistant/env $ source ./env/bin/activate
bash: ./env/bin/activate: No such file or directory
homeassistant@hassbian:~/.homeassistant/env $ cd .
homeassistant@hassbian:~/.homeassistant/env $ cd ..
homeassistant@hassbian:~/.homeassistant $ source ./env/bin/activate
(env) homeassistant@hassbian:~/.homeassistant $ cd env
(env) homeassistant@hassbian:~/.homeassistant/env $ pip3 install cryptography==2.1.3 requests==2.18.4
Collecting cryptography==2.1.3
  Downloading https://www.piwheels.org/simple/cryptography/cryptography-2.1.3-cp35-cp35m-linux_armv7l.whl (900kB)
	100% |████████████████████████████████| 901kB 238kB/s 
Collecting requests==2.18.4
  Downloading https://files.pythonhosted.org/packages/49/df/50aa1999ab9bde74656c2919d9c0c085fd2b3775fd3eca826012bef76d8c/requests-2.18.4-py2.py3-none-any.whl (88kB)
	100% |████████████████████████████████| 92kB 672kB/s 
Collecting asn1crypto>=0.21.0 (from cryptography==2.1.3)
  Using cached https://files.pythonhosted.org/packages/ea/cd/35485615f45f30a510576f1a56d1e0a7ad7bd8ab5ed7cdc600ef7cd06222/asn1crypto-0.24.0-py2.py3-none-any.whl
Collecting cffi>=1.7; platform_python_implementation != "PyPy" (from cryptography==2.1.3)
  Downloading https://files.pythonhosted.org/packages/93/1a/ab8c62b5838722f29f3daffcc8d4bd61844aa9b5f437341cc890ceee483b/cffi-1.12.3.tar.gz (456kB)
	100% |████████████████████████████████| 460kB 366kB/s 
Collecting idna>=2.1 (from cryptography==2.1.3)
  Using cached https://files.pythonhosted.org/packages/14/2c/cd551d81dbe15200be1cf41cd03869a46fe7226e7450af7a6545bfc474c9/idna-2.8-py2.py3-none-any.whl
Collecting six>=1.4.1 (from cryptography==2.1.3)
  Using cached https://files.pythonhosted.org/packages/73/fb/00a976f728d0d1fecfe898238ce23f502a721c0ac0ecfedb80e0d88c64e9/six-1.12.0-py2.py3-none-any.whl
Collecting chardet<3.1.0,>=3.0.2 (from requests==2.18.4)
  Using cached https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl
Collecting urllib3<1.23,>=1.21.1 (from requests==2.18.4)
  Downloading https://files.pythonhosted.org/packages/63/cb/6965947c13a94236f6d4b8223e21beb4d576dc72e8130bd7880f600839b8/urllib3-1.22-py2.py3-none-any.whl (132kB)
	100% |████████████████████████████████| 133kB 654kB/s 
Collecting certifi>=2017.4.17 (from requests==2.18.4)
  Using cached https://files.pythonhosted.org/packages/60/75/f692a584e85b7eaba0e03827b3d51f45f571c2e793dd731e598828d380aa/certifi-2019.3.9-py2.py3-none-any.whl
Collecting pycparser (from cffi>=1.7; platform_python_implementation != "PyPy"->cryptography==2.1.3)
  Using cached https://www.piwheels.org/simple/pycparser/pycparser-2.19-py2.py3-none-any.whl
Building wheels for collected packages: cffi
  Running setup.py bdist_wheel for cffi ... error
  Complete output from command /home/homeassistant/.homeassistant/env/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-boat9ywz/cffi/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmp998m19vtpip-wheel- --python-tag cp35:
  usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
	 or: -c --help [cmd1 cmd2 ...]
	 or: -c --help-commands
	 or: -c cmd --help

  error: invalid command 'bdist_wheel'

  ----------------------------------------
  Failed building wheel for cffi
  Running setup.py clean for cffi
Failed to build cffi
Installing collected packages: asn1crypto, pycparser, cffi, idna, six, cryptography, chardet, urllib3, certifi, requests
  Running setup.py install for cffi ... done
Successfully installed asn1crypto-0.24.0 certifi-2019.3.9 cffi-1.12.3 chardet-3.0.4 cryptography-2.1.3 idna-2.8 pycparser-2.19 requests-2.18.4 six-1.12.0 urllib3-1.22
(env) homeassistant@hassbian:~/.homeassistant/env $ python3 get_lutron_cert.py
Open Browser and login at https://device-login.lutron.com/oauth/authorize?redirect_uri=https%3A%2F%2Fdevice-login.lutron.com%2Flutron_app_oauth_redirect&client_id=e001a4471eb6152b7b3f35e549905fd8589dfcf57eb680b6fb37f20878c28e5a&response_type=code
Enter the URL (of the "error" page you got redirected to (or the code in the URL): https://device-login.lutron.com/lutron_app_oauth_redirect?code=162503084a19a6142f05045c5d6390e138e14ee9864d6a9c1e75939cba2451e9
Enter the address of your Caseta bridge device: 192.168.1.20
Successfully connected to bridge, running LEAP Server version 1.109
(env) homeassistant@hassbian:~/.homeassistant/env $ ls
bin  caseta-bridge.crt  caseta.crt  caseta.key  get_lutron_cert.py  include  lib  pyvenv.cfg  share

I was not concerned about:

Failed building wheel for cffi

Because I understand that wheel is precompiled for python3. But perhaps this is the issue?

-Rev

just implemented the ‘quick fix’ outlined here: https://github.com/home-assistant/home-assistant/issues/15421 and it worked…