Lutron Caseta Interface

What are you switching to? I’ve been playing with HA for 2 hours and got 6 times further than trying to get OpenHAB to do ANYTHING after 16 hours. (I’ve got my MyQ garage door linked, my thermostat (sorta) linked, it has Plex linked automagically…).
But I do really want the lutron caseta to work, or the above is moot.

Just a couple of items wasn’t a problem. I have transferred all of my home devices from a Staples Connect (which is a really decent piece of hardware, it was just abandoned by the company that marketed it and the software provider). I have a dozen motion detectors, some of which are multi-detectors, 13 Caseta dimmers, 1 Ge dimmer and 1 Leviton dimmer, 4 door switches, 2 locks, a garage door opener and extra position sensor, 1 water sensor (laundry room floor), 8 electrical outlets, 6 light switches, and 9 Pico remote controls plus one in each of two cars. Configuring all of the scenes and combinations of controls as well as using an Echo and 4 Dots, with the HA interfac proved way too complicated, There is no Z-Wave command option so, I have to run a separate a program to configure devices (motion sensor timeouts and functions of devices) as well as having nice looking tablet control panels, just requires too much text editing, then stopping and starting the unit, more tinkering with the text configurations and then after all of that, I have to edit a completely different web server… Well you see, after about 4 days, I had less than 1/4 of everything where I wanted it and still no nice looking front end for my other novice users. Besides that, I think that the web interface is kind of lame and having no app on the phones is problematic in that alerts have to come as text messages instead of app notifications with unique sounds.

With the VeraPlus and the Lutron Caseta Pro hub, I had it all done three evenings and a couple more adjustment over the next week. I have an alarm system that works very well and even sends notifications to my son’s phone when too many sensors detect intrusion. Also, the plugins available provide other functionality like, voice feedback to my tablets located around the house. I am still working on the tablets because I have to supply power and my wife hasn’t decided exactly where she wants them yet. Over time I will probably write some of my own LUA for it as well.

My point is, I prefer a nice editable by web configuration and nice web controls. The HA is still lacking a user friendly level that makes DIY too complicated and also lacks many features that other products have. One day it may mature and I am still going to tinker with it and maybe finish the Lutron Hub interface, but after using the VeraPlus, I am kind of sold on a mature system.

Ah, the eternal problem with open source community projects. Well, now that you’re officially no longer staking your claim to this component, others can take a stab at it. :slight_smile:

Could you give a picture of where your code is? What was working, what was implemented but broken? What did you not touch at all?

The Lutron spec is 159 pages, so it’d be nice to have a starting point to work from.

Markeby,
After switching to Vera with the Lutron connect have you been able to get the pico remotes to dim and brighten connected bulbs? I was able to easily set up the on-off function with a scene tied to the buttons, but I can’t figure out how to “increase brightness by 10%” only see how to set to a specific one. Any help you could give would be greatly appreciated!

There is one limitation there. For the Pico Remote to brighten/dim the Caseta dimmer, you have to couple them when you pair the Pico Remote in the Lutron Caseta hub. I found that not to be a big deal because one remote controls one or more dimmers in my house and/or the switch modes to other things on my VeraPlus. There may be an increment/decrement plugin for Vera but that would require a discrete button push for each call.

My github public. Just add a “b” to my user name “b” and gmail is my email contact. I have some things working but, they did something on the Vera plugin that is really cool in that someone figured out how to extract the setup data directly out of the Lutron Caseta Pro Hub which is something I wan’t able to do. Only the simple dimmer/blind operation and the 5 button Pico operation is what you need from the spec. Oh, that and the 6 second long push of the 3 buttons that does not return the up stroke. After using the Vera, if I do re-address this in HA (which is possible), I would want to implement the features exactly as they do with one exception and that is and increment/decrement if the button is held longer than 2 seconds.

Ah… well I am not using a Lutron in-wall dimmer because the fixture has a fan also which I do not want controlled together with the lights. I put bulbs that can be controlled directly and am trying to use just a pico remote mounted on the wall to control them. I can set a scene for each button independently no problem, but I cannot see any way to increase or decrease brightness based on percentage of current. I am sure it could be done in code but I find luup much more confusing than the yaml of HA.

Anyway, thank you for your reply!

On the Vera, it reads long presses of the Pico remote?

Long press is 2 seconds. It is in the forum instructions.

markeby: Having a hard time finding your github, mind linking to it?

I have an almost complete python script written. It’s able to parse the lutron integration report so it deals directly with the LIP instead of using the LEAP to get configuration. I’d like to eventually have it use the lutron MQTT and/or LEAP to get some other configuration…but for now this works for me

I’m ready to break this apart into the correct pieces and write whatever code I need to “get” the data into HA…but i’m not sure how integrate…mainly, my telnet functions which read the “triggered” commands…

@jhn I briefly looked over your commits for the Caseta functionality and it seems like it’s not a huge amount of work away from being robust enough to be considered for inclusion as a supported component in hass. I wanted to get an idea of what work you thought remained, and try to triage the issues remaining for completeness. I’m new to hass, but Python is my primary development language, so I’d like to help get this on track for merging. Please let me know your thoughts; in the meantime I’ll get your fork up and running locally and familiarize myself with the hass plugin API and your current work. Thanks!

1 Like

@m0nikr not a huge amount of work. I’ve been using it for a couple of months for dimmers, switches and pico remotes and it’s been working pretty ok. I’ve had a couple of times when everything just stopped working and had to be restarted but I’m not sure yet if it’s a bug with my code or if it’s an issue with the hass version I’m running. In terms of features it would be nice to have a way to programmatically tell the difference between dimmers and switches but I haven’t figured out a non-intrusive way to do this so at the moment you have to enumerate the device ids for switches in configuration.yaml. Apart from this code documentation and a page on https://home-assistant.io/ is also needed I believe.

Let me know if you have any specific questions about the code or configuration.

2 Likes

hi just wondering if you could share how to set this up within the configuration.yaml. i’m total novice. so, please excuse my ignorance… also, apologies if i’m jumping the gun and this isn’t quite ready for the prime time. just wanted to give it a whirl. I tried the following without it throwing any errors. However, still not seeing my lights:

light:
  - platform: caseta
    host: <my hub ip address>

@adamfox The integration telnet protocol doesn’t support querying for devices so you’ll need to export an integration report from the Caseta app on your phone and save the file as caseta_<ip address>.json in your ~/.homeassistant directory. The configuration.yaml syntax is currenty

caseta:
  bridges:
    - host: <ip address>
1 Like

@jhn thanks for the help! unfortunately still not having much luck. getting an invalid config now. Mind if I copy and paste the error to you? No worries by any means if you don’t have time to help. I know I’m in over my head here. :slight_smile:

@adamfox sure, go ahead

@jhn thanks! let me know if there’s anything additional i can get ya:

edit: shoot! on my phone at the moment. i’ll try and reformat that asap.

INFO:homeassistant.bootstrap:Setting up caseta

ERROR:homeassistant.bootstrap:Error during setup of component caseta
Traceback (most recent call last):
File “/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/homeassistant/bootstrap.py”, line 150, in _async_setup_component
None, component.setup, hass, config)
File “/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/asyncio/futures.py”, line 380, in iter
yield self # This tells Task to wait for completion.
File “/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/asyncio/tasks.py”, line 304, in _wakeup
future.result()
File “/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/asyncio/futures.py”, line 293, in result
raise self._exception
File “/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/concurrent/futures/thread.py”, line 55, in run
result = self.fn(*self.args, **self.kwargs)
File “/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/homeassistant/components/caseta/init.py”, line 46, in setup
integration = json.load(conf_file)
File “/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/json/init.py”, line 268, in load
parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
File “/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/json/init.py”, line 319, in loads
return _default_decoder.decode(s)
File “/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/json/decoder.py”, line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File “/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/json/decoder.py”, line 355, in raw_decode
obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 2 column 1 (char 2)
INFO:homeassistant.core:Bus:Handling <Event call_service[L]: service_data=notification_id=invalid_config, title=Invalid config, message=The following components and platforms could not be set up:

  • caseta
    Please check your config, domain=persistent_notification, service_call_id=4358934200-1, service=create>
    INFO:homeassistant.core:Bus:Handling <Event state_changed[L]: old_state=None, entity_id=persistent_notification.invalid_config, new_state=<state persistent_notification.invalid_config=The following components and platforms could not be set up:
  • caseta

@adamfox looks like the exported integration file isn’t valid JSON. Could you put it on http://pastebin.com/ and give me a link so I can look at it? Feel free to PM me the link if you don’t want it in the open. Alternatively you can run it through an online JSON parser or something and see if you can fix it yourself.

That was it! Thanks for the help. I’d ran that through JSONLint.com prior to posting but apparently it still wasn’t correct.

Working great so far! Thanks again.

Hi

I have lutron dimmer switches and want to control them through home assistant. Reading through this thread it looks like this is now possible with the caseta hub.Is that correct?

Thanks
Dennis Mitchell