Lutron Caseta Interface


#41

I’d like to also setup Lutron but it’s a bit confusing as there are no instructions on the components page. Also there was a mention above of an “integration report” in the app we needed to export. Not sure what that is since the iOS app has nothing of the sort. Any help to get going would be appreciated. Thanks.


#42

I’ve made some headway with the Lutron Caseta Smartbridge (non-pro).

See https://www.reddit.com/r/homeautomation/comments/5mg3zu/rudimentary_lutron_caseta_non_pro_control/ and https://community.smartthings.com/t/beta-lutron-caseta-integration-using-raspberry-pi-pro-or-standard-bridge/62748/106

Copy this as the ssh key:
-----BEGIN RSA PRIVATE KEY-----
MIIEogIBAAKCAQEApX6g2uGLyC8ZDw13Vvn/lgp4pf5BrEy2oZf+yFouGOn+UI+J
7d9yWWrP8nUJXIzz1YQ3Fs4YgDFus5bu1g/3XuK3J7kk5lVuz3wTgqDGw2jIP3mb
IUIlonEvJp+5aKNjMUkFGHkWo6nlqXx0nQjFrqhU1bZTPKwKON35IrauqmQaI+z7
pA2DEW1w2a/sO+Y4t/iBzTU0U4M9C/5PcT5GRtfb23RFP5NaiE38OC68rWfqFR91
+37smywvX1vaxhVbP5DkZXtZNBDK5jXtQ3j0dHwnKSyu7JDmhhq/pHgMEZaxtAjE
ziFJdP56P8Hy0TdXcvG/Wfw+F94KltOsp/wJfQIDAQABAoIBABvlX2nl0PEad0fh
RjeEBoAdHb8lP56yg6pze3/8K38JmlOsDlzpaFYIOistbTmLjOJ12e9fKCQbsQRW
scWlhVYaMzNf8wdcaURSLtu7DCYOOIryjaKqirt6Bq+lBtTLjcHWBCTe7GEEF3Fd
SC7cNq49M6eehyNYAJUbXY5rar/PwEpKFE/5LuTP4xXjJCvCsMffcenBj/rZp7g8
nigZ4pboNJNY7ODpTg4J2tk6x5HPSoYr9aM8CL4IjG4pcoJe8ROXm5YM+JQSwL1d
nUH4SA4qQOpE3cHLtxfmAoJ8vwu7tIpxD5YMMAACg1dVZGPgVVSOlTXH9jxC2vfn
GVQa98ECgYEA27HMMeWPFbgVuscR6cVmCriAuKlhYvJJkhYFjJV8qWMvgwsjOdl6
O1wGzW4IWSzzSoz0MdBs1ikUj1FlfriGpRWBQkT7rdIGwbKus3BXSIt52b/3cCvx
2H1qS/P9gAW8yfw6LcIGA9L26BOWCDqtmMX1aJ/zkVdrafr7AOIf+w0CgYEAwNfm
AW3oSald1NpG1CoB6rA7VJg9ulXm2t0Ha8czQ483pFjkDaaETQyIO+dtTg1sqrbO
dcFn+FF66fBlQN/ZNGb9+IbGSdITkI5iV5D1RSXJVuxaZFkX6IZPwwBgL6ouBPW2
lNfg06j4RKj32fddPxtjJIwTkOo6VUbSCbbh7DECgYBjDuIRRX6kvmId25C6JWWD
Q/nWSZk9sh12HzPVVbnl7nEH10fE18iDZ1Ux34EoJFp2rOOWanIIhnFcxcjLwIwF
d5LWvJ/2mhKt19Fp2yef8DO6+RGqpEXh5Xq+UH9m8C9Vq8LXyvpHUyI9NkeZ4ktP
7UJgMG70g8RM/vuaRFtDKQKBgGHD0qZ82tulUp2bf3cGSOx7JckQWZMDA8OHdMCu
P44LqHDYY92Lwtzw8ow0GpUMdz/g57CJObWJUWAScLLACXTole8OHK7GIwcROEge
hEnnCzjXIEhpZpaKqRs6MIlZpHT9QPAata94pUzhwK2vG4Xn045uuWipZqNfARLN
taGxAoGAQGFYb63lBeGS2vkUyovP2kMwBF0E6Y+3Il+TGjwPalyg+TyNzEAvkOUe
2iy8Eul9rT6qcByzNXnNAMRHYhXDWQWmRaHM/lzyIkNr/O3UBEQKiSew/YhH6s1W
iMwh+x+ekyFOxb98aNqlnEH/7PsQonzWThpzcAAojllTt9AIbbc=
-----END RSA PRIVATE KEY-----

then chmod 0600 key-file-name

Then play around with the commands.
ssh -i key -T [email protected]

This turns my lights to 50% (you’ll have to edit for your ip etc):
echo '{"CommuniqueType":"CreateRequest","Header":{"Url":"/zone/1/commandprocessor"},"Body":{"Command":{"CommandType":"GoToLevel","Parameter":[{"Type":"Level","Value":100}]}}}'| ssh -i key -T [email protected]


#43

@jhn this has been working great for me so far. quick question for you, though: is there a way to add the caseta files to the custom component directory so that i can upgrade home assistant?


#44

@adamfox I’m sure there is but I haven’t tried that myself so I don’t know exactly how. I just upgraded to the latest version myself and I’ll see if I can get my current code to a state where I can make a pull request, I might have some time this upcoming week. Would be better for everyone if this was just part of hass proper.


#45

I just saw this thread; I have successfully integrated lights with a Lutron Caseta Pro Hub using the exported json configuration from the lutron app.

Changes here



#46

I was working on the HA interface for the Lutron Caseta but, after seeing how Vera integrates with the Caseta Pro hub and imports the configuration automatically, I figured that this was a waste of time without that capability. I got tired of manually importing the json and hand coding the interaction with the web interface that was clunky and restrictive.

I will come back to HA when it has matured to a level that doesn’t require hand coding configurations for nearly everything.


#47

scott, thanks for this. trying to get it working. what’s the configuration.yaml format here? I’m trying something like to below but getting Key Errors

lutron:
    lutron_host: [IP_ADDRESS]
    lutron_user: lutron
    lutron_password: integration
    luron_caseta: true
    lutron_caseta_config: config.json

#48

There are two threads going with similar questions, head over to this one to consolidate: Lutron Configuration in 0.37

Scott


#49

I’ve been using your wonderful Caseta interface for a while now without a hitch across a ton of lights and pico remotes, including custom templates for all sorts of additional pico remote functionality. Been totally great.

It looks like all the changes that have been happening finally reached a breaking point in 0.40, however. After the update it’s failing to set up for me.

Included in the log:
Traceback (most recent call last):
File “/usr/src/app/homeassistant/helpers/entity_component.py”, line 148, in _async_setup_platform
entity_platform.async_schedule_add_entities, discovery_info
File “/usr/src/app/homeassistant/components/sensor/caseta.py”, line 92, in async_setup_platform
yield from async_add_devices(devices)
TypeError: ‘NoneType’ object is not iterable

[Edit] Looking at the change notes a second time, this would appear at first glance to be the culprit :

If you are using async custom components, the passed in async_add_devices method is now a callback instead of a coroutine function.

[Edit 2] Indeed, that was it, changing the various components to:

async_add_devices(devices)
from
yield from async_add_devices(devices)
fixed everything right up for me.


#50

That was a fairly easy fix so I just went ahead and did it. I’ve had less time to work on this than I expected unfortunately but now it seems that there’s an effort going on by other people to get official support for Caseta so that’s good. You can find my fix in the caseta-0.40 branch on my github.


#51

Thanks! I’d gone poking around and fixed it here as well.

Hopefully one of these implementations goes in to the full release. I’ve been quite happy with your work, so I haven’t made an effort to try out the other branch. Regardless, thanks for the work you put in to making this!


#52

So with the official Caseta interface can we use the lights in an automation? Are we able to see when it is turned on and the level? Can we detect button presses on the switch and pico remote? It sounds like jhn and ScottD have something working somewhere but this was a few months ago, has this been reviewed and merged in? Sounds like it is very very close to supporting everything that we could possibly want to do with this system.

I have a rooted Wink hub but if this is possible with the Caseta hub I will dump it in an instant.


#53

Hey,

The Caseta switches and dimmers show up in HA has switches and lights. So you can turn them on / off and set the dimmer level manually or part of an automation. The pico remotes can control the devices they are linked to and HA will report the updated status. Pico remotes​ are not registered in HA directly. If you have the Serena blinds, they work too.

I hope this helps.


#54

Yes this does. Thanks. Was looking at other peoples code and they had the pico remotes working so hoping we can get that in the official.


#55

It seems that to keep compatibility with both the regular Caseta hub and the “Pro” Caseta hub in the caseta component that’s part of the general HA release, we can’t have direct support for the Pico remotes. Only the Pro hub offers that, and I believe it’s a different protocol.

It would be nice if there were a single component that would be able to switch between the two options (even if we have to specify something like “hub_type: pro” in configuration), but otherwise has the same features and functionality to simplify use and documentation (and hub upgrades!).

Unfortunately I lack the Python expertise to make that happen myself. I’m going to try jhn’s branch to see if I can make it work in the meantime.


#56

My understanding was that jhn’s branch worked with both the regular and the pro. Including with the pico remotes.


#57

If you get it working report back. I was thinking of trying out that branch locally on my computer and seeing what all it was capable of doing. Looking at the code it seems that the Pico remotes are treated as a sensor. I am not a Python dev so messing with the code would take more time than I really have.


#58

I have the pro hub with pico remotes but mine dont show up in HA. Is there something I have to do to get them to show?


#59

The code is not in ha yet. Jfh hs the work in his branch however it seems that it was not used to create what is in the release. Putty too because the pico remotes were working apparently.


#60

I’m not sure it does - it relies on the telnet integration interface (which the basic hub doesn’t offer) and the integration report pulled from the Lutron app.

The lutron_caseta component that’s now part of HA does work with the basic hub (and the pro hub), and it uses the ssh interface. But as a side effect, it can’t handle Pico remotes on either hub.

I should be able to test this with my setup in a day or two, and I have a combination of dimmers, switches, and remotes. I would LOVE to use the Pico remotes to control various Zigbee smart bulbs I have around the house, which I used to be able to do in Staples Connect before it went belly-up.