Issues with Lutron Caseta, successfully ran (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 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/ /home/homeassistant/.homeassistant/env
homeassistant@hassbian:~/.homeassistant/env $ ls
bin  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 (900kB)
	100% |████████████████████████████████| 901kB 238kB/s 
Collecting requests==2.18.4
  Downloading (88kB)
	100% |████████████████████████████████| 92kB 672kB/s 
Collecting asn1crypto>=0.21.0 (from cryptography==2.1.3)
  Using cached
Collecting cffi>=1.7; platform_python_implementation != "PyPy" (from cryptography==2.1.3)
  Downloading (456kB)
	100% |████████████████████████████████| 460kB 366kB/s 
Collecting idna>=2.1 (from cryptography==2.1.3)
  Using cached
Collecting six>=1.4.1 (from cryptography==2.1.3)
  Using cached
Collecting chardet<3.1.0,>=3.0.2 (from requests==2.18.4)
  Using cached
Collecting urllib3<1.23,>=1.21.1 (from requests==2.18.4)
  Downloading (132kB)
	100% |████████████████████████████████| 133kB 654kB/s 
Collecting certifi>=2017.4.17 (from requests==2.18.4)
  Using cached
Collecting pycparser (from cffi>=1.7; platform_python_implementation != "PyPy"->cryptography==2.1.3)
  Using cached
Building wheels for collected packages: cffi
  Running 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/';f=getattr(tokenize, 'open', open)(__file__);'\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 clean for cffi
Failed to build cffi
Installing collected packages: asn1crypto, pycparser, cffi, idna, six, cryptography, chardet, urllib3, certifi, requests
  Running 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
Open Browser and login at
Enter the URL (of the "error" page you got redirected to (or the code in the URL):
Enter the address of your Caseta bridge device:
Successfully connected to bridge, running LEAP Server version 1.109
(env) homeassistant@hassbian:~/.homeassistant/env $ ls
bin  caseta-bridge.crt  caseta.crt  caseta.key  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?


just implemented the ‘quick fix’ outlined here: and it worked…