I am trying to figure out how to use the helper services to:
set discovery by polling for devices and waiting for a device not in the database to be touched.
track asynchronous events (switch touched lights on) by frequently sampling my routines to see if a new event is present.
add the ability to send an event to a light (turn on, dim, etc.)
I have more studying to do and am setting a two development environments. One in a Lunux VM to edit and work on the code and that is working smoothly. The second is a docker test environment on a RPI3. Still working on that and items 1,2,and 3. The Lutron stuff if super easy. If anyone has better documentation or straight forward examples of a switch, light and discovery, that would be great.
I did some research as I wanted to write a plugin for HA but Iām busy working on a better Insteon one and I donāt have the money right now to buy the Lutron stuff
So hopefully these will be helpful to you:
(note that the caseta stuff uses the same commands as RadioRA)
And Iād recommend you try to incorporate this third party library instead of rolling your own, since that seems to be the preferred Home Assistant way:
Iād post more but this box limits me to two links
You didnāt seem to understand what I wrote. I already have the Lutron Caseta library written (it is just a matter of how it is used). The Lutron side is easy as the spec is known. It is the HA side that I am having problems with. Also, that third party API is missing a key components that I have already written and it is under developed as it is designed for a Wink which, in my opinion, missed a lot of the functionality in that it does not read the Pico remotes as one can with the Caseta Pro hub. Wink has a single function accessible with caseta, which is the on or off state of a light.
My code will not require any third party API. I feel that that is a weakness in the HA design.
Lutron Caseta support is a little closer. I have the interrogation loop on the hub working in HA and I can send commands. I have some cleanup and error handling to do and then add command processing then light and switch controls. The last parts should be easy. The hardest time was the learning of the event loop structure and commands as well as the python libraries used.
Iāve been following this thread for about a month as Iāve been deciding what platform to pursue. Caseta support for Home-assistant is must. I just wanted to pre-thankyou for your hard work.
I didnāt realize that work was already being done for caseta/ha integration. I could not find any GitHub repos specifically for HA integration or else I would have just contrubuted there. Here is my work: https://github.com/home-assistant/home-assistant/pull/6631
Current:
-Discovers devices connected to the smartbridge.
-Sets up wall dimmers as lights.
Future:
-Support additional devices as appropriate in HA
-Push notification (no polling)
I am currently working with the maintainers to have it included.
I am not sure about the non-pro bridge. I believe that mine is a pro. Can you help me? Does your lutron mobile app give you the option to turn telnet on?
Lutron mobile app > settings (gear icon) > Advanced > Integration > telnet support checkbox
Can you toggle the checkbox if it is there? If so this should work.
Without telnet the underlying library to communicate to the Smartbridge will not work. Maybe telnet is enabled by default on the non-pro hubs? I guess we can hope.
If not 4.1 it will be 4.2 hoping my next round of changes will be the last. I managed to get push updates working now as well. HA UI will update in realtime.
Hey @Jer78 I just wanted to let you know that I have a new pull request out there that interacts with the lutron caseta hub over ssh. Now I donāt have a non pro hub but I really hope it works for you. This PR does not rely on telnet at all.
Thanks for confirming that it works with the non pro bridge. Out of curiosity can you tell me how many lutron devices you are using with your hub and if they are all working as you expect?