gurumitts / pylutron-caseta

Apache License 2.0
153 stars 98 forks source link

support for ra3 phantom keypads? #122

Closed JonGilmore closed 1 year ago

JonGilmore commented 1 year ago

Thanks for all of the hard work on this! Is it possible to get this to support phantom keypads?

image

The big benefit of using phantom keypads (which I previously used in ra2 with pylutron) is that you can create all kinds of scenes to trigger without using actual buttons on your physical keypads. Here's an example:

image
danaues commented 1 year ago

@JonGilmore I was just thinking about this the other day.

Shouldn't be a problem to add support for this and the HomeOwner Keypad. The key is that neither of these keypads supply a serial number, so we just have to work around that.

I'll address it this week.

JonGilmore commented 1 year ago

Sweet, thanks! Let me know how I can help out

danaues commented 1 year ago

Need to add support in 2 places.

This adds support to pylutron-caseta https://github.com/gurumitts/pylutron-caseta/pull/123

Second is the lutron_caseta HA integration. I'll PR the Blank serial handling for this as soon as I'm able.

I'll let you know when you can help test it.

swamplynx commented 1 year ago

@danaues will this also allow HA to "push" buttons on the keypads, or is there more work to be done there? I know it is / was on your roadmap. Definitely a critical feature for me so that HA can execute Lutron scenes.

danaues commented 1 year ago

@swamplynx already coded and working, just have to PR into HA one feature at a time. It's next in line after adding this keypad support.

danaues commented 1 year ago

@JonGilmore how do press/trigger these buttons in your RA3 system? The PhantomKeypad doesn't show up in the Lutron App on my phone. Makes it difficult to test the button presses.

danaues commented 1 year ago

https://github.com/gurumitts/pylutron-caseta/pull/123 has been merged adding support to pylutron-caseta

Home Assistant PR79958 has been created to add support to HA https://github.com/home-assistant/core/pull/79958

danaues commented 1 year ago

https://github.com/home-assistant/core/pull/79958 has been merged as well

@JonGilmore would you please close this Issue, as implementation is now complete.

Thanks.

danaues commented 1 year ago

@swamplynx

Home assistant PR 79963 for button presses https://github.com/home-assistant/core/pull/79963

JonGilmore commented 1 year ago

@JonGilmore how do press/trigger these buttons in your RA3 system? The PhantomKeypad doesn't show up in the Lutron App on my phone. Makes it difficult to test the button presses.

Haha, thats a great question. As far as I'm aware, there's no way to trigger them via the app. When I used these heavily with ra2 (and pylutron), they just showed up as scenes w/in homeassistant and I'd turn them "on" to trigger them, which worked great.

sleepovr commented 1 year ago

This is why the Homeowner Keypad was added to the Lutron Ra3 system. I dont remember in being there in Ra2 but i could be wrong. Phantom buttons are used to trigger scenes through automation integration. Home Owner Keypad allows the same thing but is available in the app.

danaues commented 1 year ago

ok thanks. makes sense.

https://github.com/home-assistant/core/pull/79963 was just merged adding support for Both keypads and button presses

swamplynx commented 1 year ago

Random GitHub question. But what (specifically on the HA core repo) determines when merged changes get added to a release, and is there a way to tell what code is in a release (aside from downloading and taking a peek)? For example in the HA lutron_caseta component the keypad changes were merged 6 days ago into dev, and 10.4 was released 4 days ago, but it doesn’t have those keypad changes. Is there another process I am missing somewhere that determines dev being promoted to a release? Sorry for the rookie Q, just never worked with git project this expansive before.

danaues commented 1 year ago

@swamplynx Check out the calendar titled "Upcoming Events" in this link. https://developers.home-assistant.io/

I think it works like this; changes/new features will hit the beta release first then mainstream for the next major release if everything works ok during beta.
Bug fixes can/might be pushed into current minor releases, but I'm not sure how they decide.

So I think the keypad changes probably make it into a minor October beta release, and hopefully into the November 11.0 main release.

danaues commented 1 year ago

I think the RC branch of core is where the beta is created from. https://github.com/home-assistant/core/tree/rc

I don't think any of the recent lutron_caseta PR's have been merged into it yet.

danaues commented 1 year ago

Looking through the commits on the RC branch, I think we might have to wait for Nov Beta, and December release for these Keypad PRs to make it in.

swamplynx commented 1 year ago

Damn. I'm trying to avoid having to redo my entity names / automations when the official branch gets updated. Can I just clone the dev lutron_caseta branch to custom_components? It should pull the v0.16 pylutron pre-req due to the updated manifest, right? Then when the official build catches up, I can just remove lutron_caseta from custom_components and it will go back to using the official component?

danaues commented 1 year ago

Yes, you can do that.

You have to add this line to your manifest file for it to work as a custom component (doesn't matter what the version number is, you just need the line)

"version": "0.18.0",
danaues commented 1 year ago

so your /config/custom_components/lutron_caseta/manifest file would look like this:

{
  "domain": "lutron_caseta",
  "name": "Lutron Cas\u00e9ta",
  "documentation": "https://www.home-assistant.io/integrations/lutron_caseta",
  "requirements": ["pylutron-caseta==0.16.0"],
  "config_flow": true,
  "zeroconf": ["_leap._tcp.local."],
  "homekit": {
    "models": ["Smart Bridge"]
  },
  "codeowners": ["@swails", "@bdraco", "@danaues"],
  "version": "0.18.0",
  "iot_class": "local_push",
  "loggers": ["pylutron_caseta"]
}
swamplynx commented 1 year ago

Awesome. I'm all set. Curious... What is the impetus on adding the Lutron home name as a prefix to all the devices? Not a big deal, but I imagine it will require everyone to rename every device, whereas if it were just area-device, and your Lutron and HA areas aligned there would be no need in many cases to rename devices.

danaues commented 1 year ago

My entities aren't named lutron_home. Is that your base area? The latest update uses the full Area Tree to form the name. Have a look at the notes on this PR https://github.com/home-assistant/core/pull/80221

swamplynx commented 1 year ago

Strange. All my devices imported as lutron_home lutron_area lutron_device_name. lutron_home is at the top of my Designer tree, but only as the home / project name. In the Lutron app, it shows correctly as the home name. In the config entry json though it oddly shows my Lutron home name as an area, and as the parent to all my actual areas. The integration also auto created HA areas for each lutron_home lutron_area.

danaues commented 1 year ago

Can you send me a screen capture of the Lutron Designer tree and a copy of the diagnostic text file from HA?

danaues commented 1 year ago

What system? HWQSX?

swamplynx commented 1 year ago

RA3

danaues commented 1 year ago

RA3 - Me too

let's move this discussion off of this thread.

Can you open an issue for this here, and we'll get this figured out: https://github.com/danaues/lutron_caseta/issues

swamplynx commented 1 year ago

Issue opened.