Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrations stops functioning after a physical input to Sunnata Keypad Device #2

Open
MouseRatt opened this issue Jun 26, 2022 · 16 comments

Comments

@MouseRatt
Copy link

Hi Danaues - INCREDIBLE work on the integration, was using an MQTT way of bringing RA3 devices into HA previously.

I've noticed that the integration unfortunately breaks though whenever I physically use a Sunnata Keypad device to control lights/trigger a scene. It throws failures to call switch/light services once a Sunnata keypad has been interacted with. Reload the integration or restarting home assistant fixes the issue

I don't see anything in the logs regarding this, is there something specific i should add to my config yaml to record log events from your integration branch to help with debugging this? I used "pip install git+https://github.com/danaues/pylutron-caseta@ra3" and tried adding 'homeassistant.components.lutron_caseta: debug' to my config.yaml but didn't see anything in the log.

Alternatively, is there a way to disable the RA3 integration from discovering the Sunnata keypads and see if that helps? I tried disabling the device through HA but it did not solve the problem.

@danaues
Copy link
Owner

danaues commented Jun 27, 2022

@MouseRatt, Thanks! I've just today ordered some Sunnata 4 Button and 3 ButtonRL keypads. Hopefully they show up sometime this week, and I can start testing it out.

@danaues
Copy link
Owner

danaues commented Jun 27, 2022

Short term, I can let them masquerade as 3 and 4 button Pico's until we get the HA integration updated to support them. I'll start looking into it.

danaues pushed a commit that referenced this issue Jun 27, 2022
update compatablity for homeassistant lutron_caseta component
@danaues
Copy link
Owner

danaues commented Jun 30, 2022

@MouseRatt , I've implemented the changes. Unfortunately for it to work I had to modify the lutron_caseta component within HA as well. I'll figure out how to get that pushed to HA, but for now you can download my modified lutron_caseta module to config/custom_components/pyluton_caseta to override the default one. More instructions coming soon.

You will also have to repeat the instructions at the beginning of this thread to update the pylutron-caseta with the new one.

Works for these Sunnata Keypads:
2 Button
3 Button Raise Lower
4 Button

@danaues
Copy link
Owner

danaues commented Jun 30, 2022

If you download the contents of this folder into ./config/custom_components/lutron_caseta you should be able to test the keypads out. Mine are working great.

https://github.com/danaues/core/tree/lutron_caseta-ra3keypads/homeassistant/components/lutron_caseta

@danaues
Copy link
Owner

danaues commented Jun 30, 2022

This is what I have in my configuration.yaml for debug logging

I just go into Settings/System/Logs to see the output

logger:
default: info
logs:
homeassistant.components.cloud: debug
homeassistant.components.lutron_caseta: debug
pylutron_caseta: debug

@danaues
Copy link
Owner

danaues commented Jul 4, 2022

@MouseRatt , I've just successfully pushed some changes into the HA integration that will allow your SunnataKeypads to work without crashing. Should be included in the next HA release. So give it a test once the new July release is issued.

@danaues
Copy link
Owner

danaues commented Jul 6, 2022

@MouseRatt, missed the 2022.7 release, but it's approved and should be in the next release.

@MouseRatt
Copy link
Author

Amazing! I will check it out! Should be targeted for 2022.7.1 then?

@MouseRatt
Copy link
Author

MouseRatt commented Jul 23, 2022

@danaues

Is there a new way to utilize your pylutron edits? My RA3 hub is no longer responding/working in home assistant.

I typically do the following:
-go to your console on your HA system
-you should have the "ha > " prompt
-enter the command "login", and you get a "#" prompt
-enter the command "docker exec -it $(docker ps -f name=homeassistant -q) bash" and you get a "bash-5.1#" prompt
-enter the command "pip uninstall pylutron-caseta" and answer "y" when asked to proceed (or it will skip if not installed)
-enter the command "pip install git+https://github.com/danaues/pylutron-caseta@ra3"

edit

@danaues

Sorry, to clarify, I did download your lutron_caseta component from the "core" repository on your github, and placed it in my custom component, added a version number to ensure it loads, but I am getting the following error.

Logger: homeassistant.config_entries
Source: custom_components/lutron_caseta/init.py:157
Integration: Lutron Caséta
First occurred: 2:47:48 PM (1 occurrences)
Last logged: 2:47:48 PM

Error setting up entry 192.168.0.95 for lutron_caseta
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 335, in async_setup
result = await component.async_setup_entry(hass, self)
File "/config/custom_components/lutron_caseta/init.py", line 157, in async_setup_entry
await bridge.connect()
File "/usr/local/lib/python3.9/site-packages/pylutron_caseta/smartbridge.py", line 104, in connect
await self._login_completed
File "/usr/local/lib/python3.9/site-packages/pylutron_caseta/smartbridge.py", line 543, in _login
await self._load_devices()
File "/usr/local/lib/python3.9/site-packages/pylutron_caseta/smartbridge.py", line 588, in _load_devices
for device in device_json.Body["Devices"]:
TypeError: 'NoneType' object is not subscriptable

@danaues
Copy link
Owner

danaues commented Jul 24, 2022

@MouseRatt , sorry about that. I’m trying to get these changes integrated into the main code, but having to make some changes to satisfy the maintainers requests. It’s breaking the compatibility.

Use this branch instead, it should still work for you: ra3-occupancy
Same as you were using before, but added occupancy stuff. I won’t merge this, so it will continue to work for you, even as I break things on the other branch.

command "pip install git+https://github.com/danaues/pylutron-caseta@ra3-occupancy"

@MouseRatt
Copy link
Author

@danaues no worries at all, I actually ended up rolling all the way back to your 5/4/2022 edits (had to make my own fork to roll back to that commit).. for some reason the ra3 occupancy fork was throwing errors for me also

@JonGilmore
Copy link

@MouseRatt can you link me to the commit sha that you're using that is working? I haven't been able to get this going either yet...

@MouseRatt
Copy link
Author

@JonGilmore https://github.com/MouseRatt/pylutron-caseta@ra3

(Note it's really my own private copy of danaues' forked repository until HA edits are working, all credit to danaues)

@JonGilmore
Copy link

@JonGilmore https://github.com/MouseRatt/pylutron-caseta@ra3

(Note it's really my own private copy of danaues' forked repository until HA edits are working, all credit to danaues)

Thanks buddy, this got me going - really appreciate it!

@danaues
Copy link
Owner

danaues commented Aug 9, 2022

@JonGilmore, @MouseRatt
Glad you got it working. I'm getting really close to having RA3 support merged into the main pylutron-caseta module.

PR#101
gurumitts#101

@danaues
Copy link
Owner

danaues commented Aug 9, 2022

Hey @daytonturner, JohnGilmore and MouseRatt have it working based on my older commits. I was forced to make some changes to get it merged with the main Module, which is why it broke.

If you want to use my current RA3 branch, you can use my revisions to the HA integration from this branch:

https://github.com/danaues/core/tree/lutron_caseta_ra3/homeassistant/components/lutron_caseta

You will have to customize the manifest again if you place it in your custom components folder

I have 2 PR's to merge the integration changes into HA core as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants