Adding Lutron Caseta Bridge Home Assistant is a bit complicated. The Component page gives a link to the python script to generate the necessary files and directs to follow the instructions at the top of the script. But the instructions in the script are not easy for newbies to follow. Here is what I did to get it done. These are for mac, but should be easy to follow in other OS as well. This assumes that python3 is installed.
- Copy the python script to a new directory, something like ~/Desktop/Caseta
- Open a terminal and change to that directory
- run <python -m venv env>
- run <pip install cryptography==2.1.3 requests==2.18.4>
- run <python get_lutron_cert.py>
- It’ll ask you to go to the URL stated. Something like ”
Open Browser and login at https://device-login.lutron.com/oauth/authorize?client_id=…… 20878c28e5a&redirect_uri=https%3A%2F%2Fdevice-login.lutron.com%2Flutron_app_oauth_redirect&response_type=code”
Login to your Lutron account
- The browser will generate an error. Do not move close the tab. Copy the URL on the error page just generated.
- Paste the URL into the Command Prompt. ”
Enter the URL (of the “error” page you got redirected to (or the code in the URL): >
Type in your Lutron Bridge’s local IP address, at Enter the address of your Caseta bridge device: (This should be something like ‘192.168.1.xx’)
- If everything has gone perfect, it’ll give you a successfully connected to LEAP statement. I got an error statement: (but it did not matter)
Traceback (most recent call last):
File "get_lutron_cert.py", line 156, in <module>
- This will result in three files in your subdirectory. Copy all three to your <config> folder on your HA installation.
- When setting up Home Assistant, use the following configuration in your configuration.yaml file:
host: <your local ip address>
Restart your Home Assistant and you will see the Lutron dimmers added to your system.
It is a good idea to reserve the local ip that was used to generate the keys in your router. I generally reserve all my device ip once they work successfully in Home Assistant.
I referred to several fragmented sources to get the full picture of this integration. Particularly, I am thankful to the following: