Lutron Caseta - invalid config

Here’s the error I’m getting in hassbian and the AIO

ERROR (MainThread) [homeassistant.components.sensor] Error while setting up platform caseta
Traceback (most recent call last):
File “/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/helpers/entity_component.py”, line 164, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=self.hass.loop)
File “/usr/lib/python3.5/asyncio/tasks.py”, line 400, in wait_for
return fut.result()
File “/usr/lib/python3.5/asyncio/futures.py”, line 293, in result
raise self._exception
File “/usr/lib/python3.5/asyncio/tasks.py”, line 239, in _step
result = coro.send(None)
File “/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/components/sensor/caseta.py”, line 92, in async_setup_platform
yield from async_add_devices(devices)
TypeError: ‘NoneType’ object is not iterable

Hope the the support for Lutron Pro Hub comes soon!!

Thank you for the instructions! Just got my pro hub today, and this worked perfectly on 0.55.1. I finally have my Lutron lights back!

my pro hub comes tomorrow. I cant wait. My main reason is using the remotes for different functions

All done. easy enough.

bridges:
  - host: 192.168.1.37
    devices:
      - id: 2
        type: dimmer
      - id: 3
        type: switch
      - id: 4
        type: remote

I just got the Pro bridge tonight to replace my non-pro, since I’m all-in on hass.io I spent some time to figure it out and make it work. Basically you need to make a few changes to the light/caseta.py sensor/caseta.py and switch/caseta.py file

Change this line:

from homeassistant.components import caseta

to:

from custom_components import caseta

and then it should work.

I repackaged the files with my changes at put them in this git repo

Hope it helps someone else. Has anyone tried this version with serena shades?

1 Like

Oh nice!!! I currently have them in the regular components section. I’ll have to try that out

So to answer my own question - it works with serena shades, but they show up as dimmers. They will work by adjusting the brightness to raise/lower. If I have some free time I’ll attempt to implement a proper cover component.

Worked for me. Thanks so much!

Does this mean we’ll have to use the Pro hub from here on out?

Finally had a moment to setup my Pro hub with ksheumaker’s modified files.

Everything is working great and extremely easy to setup.

My Pico’s are showing up in HA now.

Happy camper here.

Thanks @ksheumaker for creating that repo.

I will probably fork it with some improvements in a few days. I just modified it to get better names from the JSON: The plugin doesn’t know about “areas” so you end up with 10 “main lights”. I’ve got it prepending the “area name” so it’s “Living room main lights” which I find more useful.

Right now the pico remotes have one output which is a bitmask of the pressed buttons. I am just getting started with HA so I’m not sure if that’s the most useful way or if it should be setting some kind of enumeration like “on” “off” “up” “down”. Does someone with more experience setting up HA have an opinion?

There are so many Lutron Caseta threads, I had trouble keeping everything straight. This is how I got everything working with my new Caseta Pro hub.

  1. Grab the files from this repository and place them in your /.homeassistant/custom_components directories…
    https://github.com/ksheumaker/ha-caseta-pro
  2. In your Lutron mobile app:
    • Settings
    • Advanced
    • Integration
    • Turn on “Telnet support”
    • Use the “Send Integration Report” option to email yourself a copy of the integration JSON
  3. Once you have the Integration Report, place the JSON file in a /.homeassistant/caseta_[Lutron bridge IP address].json file
  4. Add the following to your /.homeassistant/configuration.yaml file. You have to manually identify any on/off switches as such or everything will be treated as as a dimmer. You can find these Device IDs from the Integration JSON file.
caseta:
  bridges:
    - host: [Lutron bridge IP address]
      devices:
        - id: 2
          type: switch
        - id: 3
          type: switch
2 Likes

Will this eventually find it’s way into the official HA code?

are you running hass.io?

I have created a custom component lutron_caseta_pro based on jhanssen’s casetify code and other re-organization work in this thread.

I’ve included:

  • Scene support
  • Shade support (covers in Home Assistant)
  • Re-organized the configuration to list an array of IDs for switches and covers instead of individually configuring each device
  • Added area names, as suggested above by @bjj
  • Added Configurator support to paste in the Integration Report in the frontend
  • Code cleanup and re-organization, linting etc.
  • Readme file with custom component and config instructions

I have tested primarily in hass.io and since everything is within the configuration directory, it should work with most installations.

This could form the basis of an official component in Home Assistant, but first it needs testing by a wider audience. The casetify module code also needs breaking out to its own library and publishing to PyPI.

The lutron_caseta component was also just updated to use the undocumented TLS interface and the Pull Request was accepted three days ago, so I think it best to avoid being confused with that update for now.

7 Likes

Just installed and moved over from jhanssen’s custom component… seems to work great! Fixed my switch (only have 1) that would lose its state on reboot.

Found another bug. In light/caseta.py it’s formatting transition times as :XX.Y (basically just putting a : on front of seconds). This is an error, because the hub wants one of: SS.ss, SS, MM:SS, or HH:MM:SS (from http://www.lutron.com/TechnicalDocumentLibrary/040249.pdf ). The easiest thing to do is remove the : and then setting transition times works.

Unfortunately, footnote 1 is Fractions are rounded up to the closest 1/4 second. I was hoping for instant on/off, but I can’t get the dimmer to transition any faster than about 1/4 second, even passing every flavor of zero (or even negative) to that time.

Have you gotten this in front of the team for review to get it integrated into the project? This looks like a great first step.

With this scene support are we able to speed up the on/off for the Caseta dimmers?

I fixed the transition formatting and pushed an update. I had assumed it was done on purpose but now I’ve fixed it to use float for less than 60 or HH:MM:SS for > 60 seconds.

I am used to the Caseta out-of-the-box timing of 1 second ramp up time so I find the 0.25 to be quite fast. It’s a pity Lutron does not allow that level of programming in the app for all the Picos and keypads.