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

Support Spring 2018 protocol #23

Merged
merged 3 commits into from
Apr 17, 2018
Merged

Conversation

mdonoughe
Copy link
Collaborator

It looks like with the new firmware:

  • certificates have been reissued
  • the bridge sends some unsolicited messages on connection
  • the names of devices have been prefixed with the names of rooms? My Home Assistant was not happy after patching this code in, but it could have been something I did in the Lutron app when I installed new switches a couple weeks ago.

The existing script to get the certificates should still get the certificates, despite printing an error at the end. I've put an updated copy of the script directly in the repository.

Unexpected messages are now ignored during the connection phase. If you're somehow still running the old firmware this shouldn't be a problem.

Fixes #22

@mdonoughe
Copy link
Collaborator Author

The Travis cache may have bad data in it. I don't think I can do anything to make that 3.4 test run succeed.

@jdeath
Copy link

jdeath commented Apr 16, 2018

New script pulls down certs without error, but cannot control in homeassistant

I downloaded new smartbridge.py, replaced file in cloned git zip, then did pip install. Am I missing something?

@sfnetwork
Copy link

sfnetwork commented Apr 16, 2018

works perfectly, my non pro lutron hub works again now.
I simply modified "smartbridge.py" (using the updated one here)

@mhofman
Copy link

mhofman commented Apr 16, 2018

For the home assistant integration, it might be a good opportunity to use the entity registry, and avoid future renames.

@glassbase
Copy link

I am up and working with this PR on non-pro.

@jdeath
Copy link

jdeath commented Apr 16, 2018

I'm up now too. thanks mdonoughe. I just did a wget into the /srv/..../pylutron-caseta/ directory

@Coolie1101
Copy link

@mdonoughe
Many, many, many thanks.

Back up and running on non pro hub 👍

@djrausch
Copy link

Working for me as well on non pro! 👍

@brettzie
Copy link

Where can I find this directory on hassio?

@Tim91084
Copy link

This does work. Couple notes for others. I had to delete the certs I had already in the directory, otherwise the script wouldn't fetch the new certs. The name prefixing is annoying (had to update all my automations). If you're looking for where to replace the smartbridge.py file and using a docker install, it's here: /usr/local/lib/python3.6/site-packages/pylutron_caseta

@gurumitts
Copy link
Owner

Ill get this merged today and push out a new version to pip today - probably this evening.

@Coolie1101
Copy link

@gurumitts
@Tim91084
FYI: On Hassbian, all I did was update smartbridge,py in /srv/homeassistant/lib/python3.5/site-packages/pylutron_caseta

@gurumitts gurumitts merged commit c83e5cb into gurumitts:master Apr 17, 2018
@xnaron
Copy link

xnaron commented Apr 17, 2018

@Tim91084 on my hassio docker install the smartbridge.py is in the /usr/lib/python3.6/site-packages/pylutron_caseta folder. However any changes to the file are immediately lost on restart of home assistant. I think the only way I can make them persistent is if I create a new image for the container. I've tried that before but hassio doesn't like it. I'm not sure if I am missing an easy fix for this or if I'll just have to wait to these changes get pushed out to hassio.

@xnaron
Copy link

xnaron commented Apr 17, 2018

@brettzie did you get this working on hassio? If so how? thanks

@jchong
Copy link

jchong commented Apr 18, 2018

I'm not using hassio but I am using the docker container. I fixed it by mounting the smartbridge.py file in docker:

/path/to/smartbridge.py:/usr/local/lib/python3.6/site-packages/pylutron_caseta/smartbridge.py

@xnaron
Copy link

xnaron commented Apr 18, 2018

@jchong Thanks I ended up doing something similar after I posted.

@marclefevre
Copy link

I am having the same issue and have tried to upgrade as follows:

(homeassistant) homeassistant@hassbian:/srv/homeassistant/lib/python3.5/site-packages $ pip3 install --upgrade pylutron_caseta
Looking in indexes: https://pypi.python.org/simple, https://www.piwheels.org/simple
Collecting pylutron_caseta
  Downloading https://www.piwheels.org/simple/pylutron-caseta/pylutron_caseta-0.5.0-py3-none-any.whl
myusps 1.3.2 has requirement requests==2.12.4, but you'll have requests 2.18.4 which is incompatible.
netdisco 1.2.4 has requirement zeroconf==0.19.1, but you'll have zeroconf 0.20.0 which is incompatible.
Installing collected packages: pylutron-caseta
  Found existing installation: pylutron-caseta 0.3.0
    Uninstalling pylutron-caseta-0.3.0:
      Successfully uninstalled pylutron-caseta-0.3.0
Successfully installed pylutron-caseta-0.5.0

Did this pick up the fix? When I restart, I still get the configuration failure.

@pdblood
Copy link

pdblood commented Apr 19, 2018

Home assistant will reinstall the old version of pylutron-caseta when you restart it. You need to edit this file:

./homeassistant/components/lutron_caseta.py

and change this:

REQUIREMENTS = ['pylutron-caseta==0.3.0']

to this:

REQUIREMENTS = ['pylutron-caseta==0.5.0']

Then restart home assistant and it should pick up the change. This worked for me.

@marclefevre
Copy link

Thanks. That worked.

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

Successfully merging this pull request may close these issues.

None yet