Lutron Caseta suddenly stopped working

Tags: #<Tag:0x00007f73948ddfd8>

All of a sudden when i try to control my lights via HASS i get an error that says:

Failed to call service light/turn_off. 'NoneType' object has no attribute 'write'

There’s nothing in the log about it failing to initialize or the Lutron component or anything like that. I’m not sure what changed or even what steps to follow next. I can still control the lights via the Lutron app itself.

1 Like

Same here

Log Details (ERROR)
Sun Jan 12 2020 13:47:07 GMT-0800 (Pacific Standard Time)
'Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 564, in async_request_call
await coro
File “/usr/src/homeassistant/homeassistant/components/lutron_caseta/light.py”, line 45, in async_turn_on
self._smartbridge.set_value(self._device_id, to_lutron_level(brightness))
File “/usr/local/lib/python3.7/site-packages/pylutron_caseta/smartbridge.py”, line 182, in set_value
return self._writer.write(cmd)
AttributeError: ‘NoneType’ object has no attribute ‘write’

Forgot to post but a power cycle of both my pi, Lutron hub l, and router fixed it. Even though the lutron app still worked and the pi seemed ok to.

I searched for a thread that was most recent with my error while I was out. Got home after seeing your fix, did the same thing and it works haha. Thank you!

I have this same problem on version 0.103.5, but unfortunately, the Lutron Caseta integration fails within a day or two of each HASS restart.

It’s been flaky for a while but I’m not sure exactly which version introduced the problem.

I will reboot the Lutron hub and report if that is a more durable fix.

I’m seeing the same flaky stuff happening- must’ve been a regression at some point recently.

I’ve noticed the same for past 2 days.

1 Like

Same here. Anyone know what’s going on?

1 Like

Have been bothered by the same issue for a few weeks now. HA restart fixes it just for a few days or so.
It seems like once the connection between pylutron and lutron bridge breaks, ha/pylutron does not revive it, and needs a hard restart

I created an issue in GitHub, maybe we’ll get some attention from developers. This is the kind of issue that may be difficult to fix since it is intermittent.

The issue is logged here: Lutron Caseta component works at startup but eventually fails #31361

If you have a GitHub account, you can give the issue a :+1: to raise its visibility, and/or add comments with additional information.

Same issue here. Did you check to see if your certificates expired? ( I have not gotten a chance). Also, my Lutron Android app just updated, so it could be Lutron.

My cert is good until 2035, so that’s not the issue AFAICT.

Thank you. It was a very bad guess for me to think that…