gurumitts / pylutron-caseta

Apache License 2.0
153 stars 97 forks source link

Add support for new Caseta devices (Diva & Claro) #115

Closed contactcr closed 2 years ago

contactcr commented 2 years ago

Need support added for new Caseta devices that were released Sept 13, 2022

From Lutron: https://www.casetawireless.com/us/en/products/dimmers-switches

New dimmer and on/off switch plus an accessory switch.

Sample from report w/ new Diva dimmer:

    "27": {
      "device_id": "27",
      "current_state": 76,
      "fan_speed": null,
      "zone": "14",
      "name": "Kitchen_Main Lights",
      "button_groups": null,
      "type": "DivaSmartDimmer",
      "model": "DS-6WCL",
      "serial": 80817422
    }
nyknicks8 commented 2 years ago

Already installed and didn’t realize support was needed. Any easy way to update it myself until It’s formally added to HA? Otherwise I may have to put back the old lutron dimmer

billchurch commented 2 years ago

New lutron user and installing the Diva line of switches, this support would be helpful.

danaues commented 2 years ago

@nyknicks8 , @billchurch It's an easy fix to add support for this. I'll send you some instructions for testing.

danaues commented 2 years ago

@nyknicks8 @billchurch Follow these instructions to test out the changes. It might be a little bit before you see this in the official HomeAssistant version. It just takes time.

You will have to re-apply these steps each time you upgrade home assistant, until the changes have been included in the actual release.

Manually install the unreleased version of pylutron-caseta inside the homeassistant container (for hassio, home assistant OS):

Please respond back and confirm that they are working properly.

Thanks,

danaues commented 2 years ago

Do either of you have a Claro smart switch to confirm the DeviceType that it reports?

nyknicks8 commented 2 years ago

@danaues I run HA in docker on my Synology NAS. I tried your commands several times and it appears after I restart HA it reverts back to the old pylutron-caseta. I confirmed it does that because my current version is 0.13.1. When I update using your steps it goes to 0.15.1, but after restart goes back to 0.13.1. Not sure how to make the update persist.

mdonoughe commented 2 years ago

Try installing pylutron-caseta into your config/deps directory instead. I've only ever run core so I don't know how to do it on your system. Just remember to remove it later or else you'll still be running this version after a newer version is released.

nyknicks8 commented 2 years ago

It works. I had to add --skip-pip to the execution command so it doesn't downgrade pylutron-caseta on restart.

Thank you for the quick update. Saved me time from putting back the old dimmer.

contactcr commented 2 years ago

I picked up a Claro switch today ill try to install it and confirm the type tonight. My HA is headless Hass OS so no console here and not sure the ssh addon can run these commands.

usingapc commented 2 years ago

I have Claro and Diva Dimmers installed and would like to try this temp fix. I run on Hass OS and don't think I can use your instructions via console. Any other ideas/ways to try this?

danaues commented 2 years ago

@usingapc @contactcr, Unfortunately, for Hass OS, , you have to do it on the actual console (KB and mouse). I won't work through an SSH terminal. If it's virtualized, you can access the VMs console to enter the commands.

usingapc commented 2 years ago

Thanks @danaues I appreciate your help. Can you provide any instructions to test this with the actual console (KB and mouse)? Is it an option or am I out of luck until the new updates get released?

danaues commented 2 years ago

@usingapc, yep the instructions are just up above, 4th or 5th post.

usingapc commented 2 years ago

@danaues Please forgive me. I'm sure this is a stupid question but how do I open the actual console on Hass OS? I can't seem to find a good answer when googling it and I don't see anything under Developer Tools or Settings. Thanks!

danaues commented 2 years ago

@usingapc no problem at all. We're talking about the physical console, ie Monitor, keyboard attached to the actual device that is running Hass OS. If you're running a pi, you will have to connect a monitor and keyboard to it, and use that.

danaues commented 2 years ago

@usingapc , @contactcr

You might be able to use the instructions here to access the OS console over SSH on port 22222 I've never used this, but looks like it might solve your problem if you really want to do it over SSH.

https://community.home-assistant.io/t/add-on-hassos-ssh-port-22222-configurator/264109

mdonoughe commented 2 years ago

https://pypi.org/project/pylutron-caseta/0.15.2/

pg11041 commented 2 years ago

Thanks for this information! I too recently picked up a Diva smart simmer and was not able to get it working right out of the box. I am still new to Home Assistant so it took me a bit of time to understand that the HA console is NOT the same thing as the ssh terminal window you can initiate through the web UI. This finally pushed me to move my Home Assistant from a Raspberry Pi to a VM hosted on my UNRAID server to prevent having to break out a separate keyboard and monitor.

After running the pip install command, I also had an issue with the library reverting to the previous version upon restart. What fixed this for me was updating manifest.json in the config directory (/usr/src/homeassistant/homeassistant/components/lutron_caseta on my system) to set the "requirements" line version to 0.15.1. Note that this is done in the homeassistant Docker container.

that1guy commented 2 years ago

Running HA in a VM on top of Unraid. When I reboot HA I see I'm still running 0.13.1

What am I doing wrong in my custom_components folder?

image

Below is the original manifest.json file I can see when I VNC/SSH into the VM on Unraid, but I can't edit this file because I don't know how to install nano or VIM (text editor).

image
TheLeGare commented 2 years ago

I was able to install the update and add all of my Diva and Claro switches show up as devices however there is a 3 - 5 second delay between when I press any of my wall switches to when the status is updated in Home Assistant. This delay is not present for either of my pico remotes. I'm not sure if this is related to the update as it is all a new install but any ideas would be appreciated.

TheLeGare commented 2 years ago

Below is the original manifest.json file I can see when I VNC/SSH into the VM on Unraid, but I can't edit this file because I don't know how to install nano or VIM (text editor).

@that1guy I was able to edit it using VI, have you tried that?

that1guy commented 2 years ago

Success. Thanks @TheLeGare.

nyknicks8 commented 2 years ago

I was able to install the update and add all of my Diva and Claro switches show up as devices however there is a 3 - 5 second delay between when I press any of my wall switches to when the status is updated in Home Assistant. This delay is not present for either of my pico remotes. I'm not sure if this is related to the update as it is all a new install but any ideas would be appreciated.

I notice the same delay only with the Diva and not the older Caseta dimmers and switches. It appears the delay also occurs on the Lutron app when using the physical switch, so there must be an issue with Lutron itself rather than HA. Hopefully Lutron updates their firmware

TheLeGare commented 2 years ago

I notice the same delay only with the Diva and not the older Caseta dimmers and switches. It appears the delay also occurs on the Lutron app when using the physical switch, so there must be an issue with Lutron itself rather than HA. Hopefully Lutron updates their firmware

Ya, I hadn't noticed that it was happening in the Lutron app too. It does seem like we just have to wait for an update there. Historically, has Lutron generally been good about fixing stuff like this?

nyknicks8 commented 2 years ago

I notice the same delay only with the Diva and not the older Caseta dimmers and switches. It appears the delay also occurs on the Lutron app when using the physical switch, so there must be an issue with Lutron itself rather than HA. Hopefully Lutron updates their firmware

Ya, I hadn't noticed that it was happening in the Lutron app too. It does seem like we just have to wait for an update there. Historically, has Lutron generally been good about fixing stuff like this?

Looks like it is fixed for me. Lutron may have pushed an update

TheLeGare commented 2 years ago

Looks like it is fixed for me. Lutron may have pushed an update

The delay is still there for me. Let me know if you may have done anything that helped. Otherwise, I'll just hope mine works soon.

that1guy commented 2 years ago

7 Diva smart switches installed over here. No delay observed.

Is there an easy way know when Diva compatibility makes it into the Home Assistant master release?

mdonoughe commented 2 years ago

That was added in 0.15.2 and it's already in Home Assistant: https://github.com/home-assistant/core/blob/master/homeassistant/components/lutron_caseta/manifest.json

that1guy commented 1 year ago

@mdonoughe It isn't in any of the official releases though yet, it looks like, correct? https://github.com/home-assistant/core/releases

gonzotek commented 1 year ago

0.15.2 is listed in the full changelog of 2022.10: https://www.home-assistant.io/changelogs/core-2022.10

Bump pylutron_caseta to 0.15.2 (@bdraco - #78900) ([lutron_caseta docs])