Lutron Caseta Interface

@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?

@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.

1 Like

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


1 Like

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.

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

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

Scott

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.

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.

1 Like

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!

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.

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.

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.

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.

1 Like

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

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.

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?

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.

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.

1 Like

How would telnet be any different from ssh? Both can remote in. Does the pro hub offer something special over telnet that cannot be done via ssh? Perhaps a different user? Just trying to understand what telnet could provide that ssh would not.

Why are the docs on this lutron hub so hard to find?!

It’s not a matter of what CAN be done, it’s what Lutron has done to artificially limit the regular hub vs. the pro hub. I don’t think the ssh interface was ever intended to be used this way, but someone found the key and was able to get in and poke around to see what was available. Now that key is “in the wild” and used by projects like this.

Both hubs are exactly the same hardware. Firmware is the only difference.