Lutron dimmer switches will not load after upgrade to 66.0 hassio

I was abl to get the new smarybridge.py script, and the new certs. Both of my lights now show up in HA, but when I try to use them, I get the following error:

Error executing service <ServiceCall light.turn_on: entity_id=['light.family_room_family_room_ceiling_fan_light']>
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/core.py", line 1002, in _event_to_service_call
    await service_handler.func(service_call)
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/light/__init__.py", line 360, in async_handle_light_service
    await light.async_turn_on(**params)
  File "/usr/lib/python3.5/asyncio/coroutines.py", line 210, in coro
    res = func(*args, **kw)
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/light/lutron_caseta.py", line 57, in async_turn_on
    to_lutron_level(brightness))
  File "/srv/homeassistant/lib/python3.5/site-packages/pylutron_caseta/smartbridge.py", line 182, in set_value
    return self._writer.write(cmd)
AttributeError: 'NoneType' object has no attribute 'write'

Anyone have any ideas where I’ve fouled this up?

+1 for me

Pulled the (now merged) smartbridge.py into the lib/python3.6/site-packages/pylutron_caseta and my lights all work again.

Thanks to all who worked on this!

It doesn’t appear I have this directory, /usr/lib/python3.6/site-packages/pylutron_caseta/

So, it doesn’t have a smartbridge.py in it.

Can i just create this directory and create the file for it?

I reran my python scripts, manually added the pylutron_caseta/smartbridge.py as it didnt have it.

This is still what i get.

Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/homeassistant/setup.py", line 142, in _async_setup_component
    result = await component.async_setup(hass, processed_config)
  File "/usr/lib/python3.6/site-packages/homeassistant/components/lutron_caseta.py", line 57, in async_setup
    yield from bridge.connect()
  File "/usr/lib/python3.6/site-packages/pylutron_caseta/smartbridge.py", line 40, in connect
    yield from self._login()
  File "/usr/lib/python3.6/site-packages/pylutron_caseta/smartbridge.py", line 284, in _login
    yield from self._load_devices()
  File "/usr/lib/python3.6/site-packages/pylutron_caseta/smartbridge.py", line 314, in _load_devices
    for device in device_json['Body']['Devices']:

I also can’t seem to find it. I attempt ot follow where it says it is, but it doesn’t seem to exist. Any luck?

Any idea how I can find /usr/lib/python3.6/site-packages/pylutron_caseta/ on Hassio via SSH?

I ran the “find” command in the cli, it doesn’t exist, not sure other hassio users found theirs

@Loonoco You need to do it from the docker instance. I did it by using the debug cli.

https://developers.home-assistant.io/docs/en/hassio_debugging.html

Thank you- I’m wondering if I should access the host to try and change the files- or hope it comes to next update of Hassio?!

Hassio update to versio 0.68.0 today fixed this issue. HA once again works with the Standard Lutron Hub.

You may need to change the entity Ids in your automation, mine change with the room name now appended to the entity id.

I’m using my original certs and keys, I didn’t have to re-generate them.

Thanks to all that help fix this issue.

1 Like

I was dealing with this problem a while back. I could not for the like of me successfully run the script on my mac. I ran it in a virtual environment on my mac and it worked like a charm. Please try that :+1::crossed_fingers:

-rev

“You may need to change the entity Ids in your automation, mine change with the room name now appended to the entity id.”

I am struggling with this. I now have a mix & match of entity IDs as I have set them up originally, and entity IDs that were somehow changed with the room name up front.

Is there a way to change the entity ID back to how I set them up originally? Failing that, it seems I have to change entity ID names in my customization folders, group folders, my automation folders, and maybe more.

I have tried:

  • entity.registtry.yaml … my Lutron devices are not there (only z-wave and cast platforms)
  • Changing in front end (configuration / customization): I get an error message that my customization.yaml is not integrated correctly in configuration.yaml

Any ideas what to do? I am getting tired repairing my home automation system all the time. Due to breaking automations my WAF is also totally low :frowning:

The name change appears to come from the Lutron App. You may be able to delete the room name in the App, but I have not tried that, I have already changed my automations.

Yeah, does not look like I am able to delete the room anywhere in the app. I can assign a different room, but that does not change anything.

Thanks for your help anyway.

Big shout out to who ever fixed this. Thank you, thank you, thank you. !!!

You guys are amazing.

They don’t appear in the entity registry because the component does not assign enough information to create a unique ID for each switch.
The needed information has been added to the development branch of the pylutron_caseta component in a recent pull request so it will eventually trickle down to HA in a future release. This won’t help you now since you’ve probably already edited all your groups and automations with the new entity ids (as I have) but will help prevent this from happening next time Lutron decides to break something.

Thanks, this information is very helpful.

You are right, I spent quite some time to change groups and automations. I encountered additional stuff I think was changed by Lutron that added work for me (i.e. you can’t change the range extender in the app anymore - at least I think to remember that was possible before. The Lutron system now assigns the range extender function to the next added lamp module, so if you need to change you need to remove the lamp module with the current extension, than add the lamp module where you want the extender to the Lutron system, then re-add the previously removed module, yadda yadda ya…).

Whatever, this is clearly not a HA issue, but solely a Lutron issue. I hate that I bought into their system and now feel trapped.

Which switches did you go to? I find myself in the same situation, no neutral wires.