Lutron Caseta Interface

@kevinfcook Fade works on the non-Pro bridge if you program it into a scene (virtualbutton) or Pico button. It does not have arbitrary “Go to level xx, fade yy seconds” for any dimmer, like on the Pro bridge Telnet interface. I’ve tried many different parameters on the GoToLevel request but no luck so far.

There is no actual Python code support for setting fade times for scenes or Pico buttons in pylutron-caseta library, but it could be added using the commands I’ve documented above. Not sure how it would be handled in Home Assistant as it is likely a one-time activity when programming your scenes.

Assuming it were supported in pylutron-caseta as a service call, you could do it with an input select populated with your scene names, an input slider for fade and delay and a script or automation to run it. Stick it all in a group and put it into a ‘Settings’ view in the frontend.

@upsert ok, that’s a shame. Maybe there’s just something you haven’t uncovered yet. How are you figuring all of this out? Just trying different combinations of keys?

As for scene transitions, let me play around with it to see what I can come up with. I think I’ve uncovered something interesting. For example for my virtual button #4:

{"CommuniqueType":"ReadRequest","Header":{"Url":"/virtualbutton/4"}}

{"CommuniqueType":"ReadResponse","Header":{"MessageBodyType":"OneVirtualButtonDefinition","StatusCode":"200 OK","Url":"/virtualbutton/4"},"Body":{"VirtualButton":{"href":"/virtualbutton/4","Name":"Cooking","ButtonNumber":3,"ProgrammingModel":{"href":"/programmingmodel/4"},"Parent":{"href":"/project"},"IsProgrammed":true}}}

I’m assuming the virtual button # and the preset # are always the same?

{"CommuniqueType":"ReadRequest","Header":{"Url":"/preset/4"}}

{"CommuniqueType":"ReadResponse","Header":{"MessageBodyType":"OnePresetDefinition","StatusCode":"200 OK","Url":"/preset/4"},"Body":{"Preset":{"href":"/preset/4","Parent":{"href":"/programmingmodel/4"},"PresetAssignments":[{"href":"/presetassignment/94"},{"href":"/presetassignment/93"}],"DimmedLevelAssignments":[{"href":"/dimmedlevelassignment/94"},{"href":"/dimmedlevelassignment/93"}]}}}

I have two dimmers in virtual button #4, so it looks like each is represented by a separate dimmedlevelassignment. I can dive deeper into a preset and see individual dimmers:

{"CommuniqueType":"ReadRequest","Header":{"Url":"/presetassignment/93"}}
{"CommuniqueType":"ReadResponse","Header":{"MessageBodyType":"OnePresetAssignmentDefinition","StatusCode":"200 OK","Url":"/presetassignment/93"},"Body":{"PresetAssignment":{"href":"/presetassignment/93","Parent":{"href":"/preset/4"},"AffectedZone":{"href":"/zone/12"},"Fade":2,"Delay":0,"Level":100}}}

{"CommuniqueType":"ReadRequest","Header":{"Url":"/presetassignment/94"}}
{"CommuniqueType":"ReadResponse","Header":{"MessageBodyType":"OnePresetAssignmentDefinition","StatusCode":"200 OK","Url":"/presetassignment/94"},"Body":{"PresetAssignment":{"href":"/presetassignment/94","Parent":{"href":"/preset/4"},"AffectedZone":{"href":"/zone/11"},"Fade":2,"Delay":0,"Level":100}}}

So, I’m assuming you have to set the fade time separately on each dimmer in a scene. It doesn’t look like there’s a way to set it for the scene as a whole.

I’m thinking we can do this to fade individual lights in pylutron_caseta:

  1. Receive light id and brightness from HA
  2. Dynamically create scene with only that light in it (we can use virtual button 99 since it’s pretty unlikely to get used ever)
  3. Set fade time
  4. Set desired brightness
  5. Activate scene

The same scene can be reused for each light passed to us by HA. It’s clunky, but it might be the only option.

Sorry… I have been on travel. .I will take a look as soon as I am back. Hopefully some time next week. Let’s get it merged. Thanks for the PR.

Cheers!

1 Like

Thanks!! I merged my changes. Looks like scenes will be available in the next release (I assume 0.51).

1 Like

Support for multiple bridges would be great. Many people need multiple bridges to surpass the 50 device limit, and to extend the range of their Caseta systems.

Hey, I know this is a requested feature and would love to support it. The issue comes with testing the multiple bridges. It is very difficult to code for a setup to that I do not have. Having said that, I can add support for multiple bridges and allow the community to beta test the new feature before fully releasing. Looks like we have a few folks that have contributed to this component so we should be able to have some good support. I can’t give a time estimate life is just too busy at the moment. I hope you understand.

Cheers

I think @jhn’s fork here actually supports multiple bridges. Maybe this code could be implemented into yours? Thank you for your contributions, and I totally understand that this isn’t a high priority for you!

caseta:
bridges:
- host: [ip address of first bridge]
devices:
- id: 1
type: switch
- id: 3
type: switch
- host: [ip address of second bridge]
devices:
- id:
type:

Can someone point me to the git repo for the Caseta code that is actually in HASS?

Look at:

homeassistant/components/lutron_caseta.py
homeassistant/components/light/lutron_caseta.py
homeassistant/components/switch/lutron_caseta.py
homeassistant/components/cover/lutron_caseta.py
homeassistant/components/scene/lutron_caseta.py

Hi everyone,
I have a StaplesConnect that i’m now using only to manage the 7 Picos i have, and all the rest is handled by HA. I just bought a Caseta non-PRO hub, thinking i could link the Picos and use them as switches in HA but they don’t show up. I read the whole thread and before I pull the trigger and return the non-PRO, i want to be sure:

are the Pico working (reliably) with HA if i buy a PRO hub?

@lucacri Currently the lutron caseta component in Home Assistant does not produce any events in Home Assistant for pressing Pico buttons, other than the lights levels changing (i.e. no sensors for the remote buttons). Some more work needs to be done on the underlying pylutron library to support this on Smart Bridge Pro hubs.

I’ve been poking around the Python code to see how much work it will be and I think @gurumitts would be amenable to pull requests to implement it.

A work-around is to use the jhn branch mentioned above. Also appears to be not maintained so it does not have scene support, which was added recently.

Also, if you are choosing between a non-Pro and Pro hub, the Pro hub would be potentially getting Pico support in a future release but the non-Pro hub would not support it (it has no Telnet interface). So in my opinion, it is worth it to get a Pro hub even if the features are not yet implemented in Home Assistant.

I would love to get involved with this project. I have been a ST user for quite some time and actually had a project to integrate the caseta switches into ST before they added official support. In fact I think it was linked somewhere above in this thread. I have it working with either a pro or non pro hub pretty reliably and supports the Picos on the pro hub. I had just started working on multi hub support, but have been getting more and more frustrated with ST and am considering switching over so this component is a major priority for me.

I am still trying to wrap my head around how HASS works, but would love to contribute to this project. I have started looking at the current component and will see what I can get done!

I really hope that you can do this. that would be great.
I keep eying out some of the pro hubs on ebay but havent purchased one yet.

I would be ok with just a way to see scene status but im thinking that it is not possible with the regular hub.

Actually scenes are totally possible with the regular hub. My first attempt at this on ST was with a standard hub and I was able to get scenes working. I should say that you could trigger them…I am not 100% certain if the status would work, but it very well may. What I mean is if you trigger a scene to say turn a light to 70% but then change it manually to 100%, I am not certain if either hub reports that the scene is now “off”. I will have to look at that. I am getting my feet wet and hopefully can jump in very soon.

Welcome @njschwartz ! I too am poking around in pylutron and contributing a bit of code. Hopefully working my way up to contribute to Home Assistant.

For the Pro bridge support using Telnet, one thing that needs some thought is a good way to reconcile the LIP server integration IDs with the device IDs from the LEAP interface. Unfortunately they are not the same and I discovered this after removing and adding a device from my bridge. It looks like in your code you treated them as the same?

I have not discovered any method in the LEAP server that lists both the device ID and the LIP Integration ID at the same time. ReadRequest on /device will get you device IDs and ReadRequest on /server/2/id will get you LIP server integration IDs, but not both. The only crossover is the name, so I think the name must be used to correlate the device IDs. From what I can tell the app forces you to use different names for every device, so I think the solution will work. I would be interested to know if you encountered this issue and if so, how you tackled it.

Hey @upsert that is great to hear. I am sure between us all we can get this to be an even greater integration!

So in my original attempt using python you are right that the LEAP and LIP ID’s were sometimes different which caused problems for some people. I am pretty certain they are actually supposed to be the same and for whatever reason they get out of sync. I need to go back and look, but if I remember correctly, the LEAP “zone” is what really mattered. I would think we could easily save both LEAP and LIP Id’s into the device object anyway and go from there. I need to play around with it because I honestly cannot remember what ID was what between the two servers. :slight_smile:

Scenes are already supported in Home Assistant so I assume @benjimatt is talking about just the status of a scene. This is like the LED lights on the scene buttons on a RadioRA 2 keypad. The LED next to the button illuminates if every device controlled by the scene is at the preset level defined in the scene and the LED goes off if any level is different.

In theory it is completely possible on both non-PRO and PRO hubs as every scene has a preset assignment and one could examine every zone level in the preset and compare it to the current level. That being said I’m not sure how efficient it would be to check up to 100 scenes every single time a level changes on any zone. And you would need to make a binary sensor in Home Assistant for every scene so it could have an on/off state.

1 Like

Yea I think you are right on that. There must be some sort of notification somewhere that a scene is still active I am just not sure how Lutron does it. If we can find it that would be the simplest way, but if not, like you said adding it in is still certainly possible but far more of a pain.

The new RA2 Select product line looks interesting.
http://www.lutron.com/en-US/Products/Pages/WholeHomeSystems/RA2Select/Overview.aspx
http://www.lutron.com/en-US/Company-Info/Pages/News/Media-PressCenter/PressReleases/PressReleaseDetail.aspx?prid=742

For anyone seeking RA2 style dimmers, a fan control and a 100 device limit, the RA2 Select looks to fit the bill. The hub hardware looks identical to the Smart Bridge but in black plastic. I expect the differences are only in firmware and likely means it will be easy to integrate with Home Assistant.

They also promise a new Caseta app update. Being able to organize by rooms would be nice. Update: Caseta & RA2 Select app 5.0.1 is now available.

Any word if RA2 Select will be supported by the already existing Homeassistant integrations? Looking at RA2 Select for a new build but want to ensure it will work with HASS.

1 Like