upsert / lutron-caseta-pro Goto Github PK
View Code? Open in Web Editor NEWCustom Home Assistant Component for Lutron Caseta Smart Bridge PRO / RA2 Select
License: Apache License 2.0
Custom Home Assistant Component for Lutron Caseta Smart Bridge PRO / RA2 Select
License: Apache License 2.0
Hass supports a remote component type, it would be great to leverage this for the pico remotes rather than setting up automations for every button.
bash-5.0# ../py-spy top --pid 201
Collecting samples from 'python3 -m homeassistant --config /config' (python v3.7.6)
Total Samples 100
GIL: 63.33%, Active: 474.44%, Threads: 61
%Own %Total OwnTime TotalTime Function (filename:line)
190.00% 190.00% 1.75s 1.75s _worker (concurrent/futures/thread.py:78)
70.00% 70.00% 0.690s 0.690s _read_until (lutron_caseta_pro/casetify.py:179)
56.67% 56.67% 0.660s 0.660s recv (pyhap/hap_server.py:725)
37.78% 37.78% 0.360s 0.360s handle_read (zeroconf/__init__.py:1265)
34.44% 34.44% 0.320s 0.320s run (zeroconf/__init__.py:1226)
31.11% 31.11% 0.310s 0.310s _loop (senseme/lib/background_monitor.py:34)
I'm not sure when this started, but fairly recently (ish). Looks like Home Assistant is changing how custom component integrations need to be organized.
2019-04-08 13:08:36 ERROR (MainThread) [homeassistant.loader] Error loading
custom_components.lutron_caseta_pro.sensor. Make sure all dependencies are installed
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/homeassistant/loader.py", line 166, in _load_file
module = importlib.import_module(path)
File "/usr/local/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 962, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'custom_components.lutron_caseta_pro.sensor'; 'custom_components.lutron_caseta_pro' is not a package
Any chance this could be updated so it won't just stop working? So far this is the best Caseta integration I've seen and it would be sad to lose it.
@upsert Are you open to the idea of this repo supporting RadioRa2 inclusive and essentials? I was looking at extending the pylutron and the lutron HA component to be async, and instead, I thought I'd give this a look instead. As a quick PoC I swapped the XML parsing logic from pylutron into this repo and lights/switches/fans are all working with very little effort. I haven't given much thought as to how keypads, led's, occupancy sensors would be handled, but let me know your thoughts, thanks!
When HA loses connection to the Pro Bridge (eg the bridge is restarted, after a power loss, etc), the following error appears in the HA log:
Error doing job: Fatal error on transport TCPTransport (error status in uv_stream_t.read callback)
OSError: [Errno 113] Host is unreachable
When trying to control a device, the following traceback is thrown:
Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/lib/python3.6/asyncio/tasks.py", line 182, in _step
result = coro.throw(exc)
File "/config/custom_components/lutron_caseta_pro.py", line 239, in _read_next
read_response = yield from self._casetify.read()
File "/config/custom_components/casetify.py", line 194, in read
match = yield from self._read_until(CASETA_RE)
File "/config/custom_components/casetify.py", line 184, in _read_until
self._read_buffer += yield from self.reader.read(READ_SIZE)
File "/usr/lib/python3.6/asyncio/streams.py", line 628, in read
yield from self._wait_for_data('read')
File "/usr/lib/python3.6/asyncio/streams.py", line 458, in _wait_for_data
yield from self._waiter
File "/usr/lib/python3.6/asyncio/futures.py", line 332, in __iter__
yield self # This tells Task to wait for completion.
File "/usr/lib/python3.6/asyncio/tasks.py", line 250, in _wakeup
future.result()
File "/usr/lib/python3.6/asyncio/futures.py", line 245, in result
raise self._exception
OSError: [Errno 113] Host is unreachable
So it appears as though HA isn’t trying to reestablish the telnet connection if it breaks. I’ve found that only restarting HA makes the Caseta devices reachable again.
Investigate and if possible, add support for the Device Registry for the component and its platforms.
My install is working fine but i am getting an Invalid config notification.
"The following components and platforms could not be set up: lutron_caseta_pro.scene"
I have no scenes but I thought maybe you would require one so i added once and reran my send integration report. I looked but i do not see my scene in that report. Everything is working but i would just like the error message to go away.
Below is my report
{
"LIPIdList" : {
"Devices" : [
{
"ID" : 1,
"Name" : "Smart Bridge 2",
"Buttons" : [
{
"Name" : "Button 1",
"Number" : 1
},
{
"Name" : "Button 2",
"Number" : 2
},
{
"Name" : "Button 3",
"Number" : 3
},
{
"Name" : "Button 4",
"Number" : 4
},
{
"Name" : "Button 5",
"Number" : 5
},
{
"Name" : "Button 6",
"Number" : 6
},
{
"Name" : "Button 7",
"Number" : 7
},
{
"Name" : "Button 8",
"Number" : 8
},
{
"Name" : "Button 9",
"Number" : 9
},
{
"Name" : "Button 10",
"Number" : 10
},
{
"Name" : "Button 11",
"Number" : 11
},
{
"Name" : "Button 12",
"Number" : 12
},
{
"Name" : "Button 13",
"Number" : 13
},
{
"Name" : "Button 14",
"Number" : 14
},
{
"Name" : "Button 15",
"Number" : 15
},
{
"Name" : "Button 16",
"Number" : 16
},
{
"Name" : "Button 17",
"Number" : 17
},
{
"Name" : "Button 18",
"Number" : 18
},
{
"Name" : "Button 19",
"Number" : 19
},
{
"Name" : "Button 20",
"Number" : 20
},
{
"Name" : "Button 21",
"Number" : 21
},
{
"Name" : "Button 22",
"Number" : 22
},
{
"Name" : "Button 23",
"Number" : 23
},
{
"Name" : "Button 24",
"Number" : 24
},
{
"Name" : "Button 25",
"Number" : 25
},
{
"Name" : "Button 26",
"Number" : 26
},
{
"Name" : "Button 27",
"Number" : 27
},
{
"Name" : "Button 28",
"Number" : 28
},
{
"Name" : "Button 29",
"Number" : 29
},
{
"Name" : "Button 30",
"Number" : 30
},
{
"Name" : "Button 31",
"Number" : 31
},
{
"Name" : "Button 32",
"Number" : 32
},
{
"Name" : "Button 33",
"Number" : 33
},
{
"Name" : "Button 34",
"Number" : 34
},
{
"Name" : "Button 35",
"Number" : 35
},
{
"Name" : "Button 36",
"Number" : 36
},
{
"Name" : "Button 37",
"Number" : 37
},
{
"Name" : "Button 38",
"Number" : 38
},
{
"Name" : "Button 39",
"Number" : 39
},
{
"Name" : "Button 40",
"Number" : 40
},
{
"Name" : "Button 41",
"Number" : 41
},
{
"Name" : "Button 42",
"Number" : 42
},
{
"Name" : "Button 43",
"Number" : 43
},
{
"Name" : "Button 44",
"Number" : 44
},
{
"Name" : "Button 45",
"Number" : 45
},
{
"Name" : "Button 46",
"Number" : 46
},
{
"Name" : "Button 47",
"Number" : 47
},
{
"Name" : "Button 48",
"Number" : 48
},
{
"Name" : "Button 49",
"Number" : 49
},
{
"Name" : "Button 50",
"Number" : 50
},
{
"Name" : "Button 51",
"Number" : 51
},
{
"Name" : "Button 52",
"Number" : 52
},
{
"Name" : "Button 53",
"Number" : 53
},
{
"Name" : "Button 54",
"Number" : 54
},
{
"Name" : "Button 55",
"Number" : 55
},
{
"Name" : "Button 56",
"Number" : 56
},
{
"Name" : "Button 57",
"Number" : 57
},
{
"Name" : "Button 58",
"Number" : 58
},
{
"Name" : "Button 59",
"Number" : 59
},
{
"Name" : "Button 60",
"Number" : 60
},
{
"Name" : "Button 61",
"Number" : 61
},
{
"Name" : "Button 62",
"Number" : 62
},
{
"Name" : "Button 63",
"Number" : 63
},
{
"Name" : "Button 64",
"Number" : 64
},
{
"Name" : "Button 65",
"Number" : 65
},
{
"Name" : "Button 66",
"Number" : 66
},
{
"Name" : "Button 67",
"Number" : 67
},
{
"Name" : "Button 68",
"Number" : 68
},
{
"Name" : "Button 69",
"Number" : 69
},
{
"Name" : "Button 70",
"Number" : 70
},
{
"Name" : "Button 71",
"Number" : 71
},
{
"Name" : "Button 72",
"Number" : 72
},
{
"Name" : "Button 73",
"Number" : 73
},
{
"Name" : "Button 74",
"Number" : 74
},
{
"Name" : "Button 75",
"Number" : 75
},
{
"Name" : "Button 76",
"Number" : 76
},
{
"Name" : "Button 77",
"Number" : 77
},
{
"Name" : "Button 78",
"Number" : 78
},
{
"Name" : "Button 79",
"Number" : 79
},
{
"Name" : "Button 80",
"Number" : 80
},
{
"Name" : "Button 81",
"Number" : 81
},
{
"Name" : "Button 82",
"Number" : 82
},
{
"Name" : "Button 83",
"Number" : 83
},
{
"Name" : "Button 84",
"Number" : 84
},
{
"Name" : "Button 85",
"Number" : 85
},
{
"Name" : "Button 86",
"Number" : 86
},
{
"Name" : "Button 87",
"Number" : 87
},
{
"Name" : "Button 88",
"Number" : 88
},
{
"Name" : "Button 89",
"Number" : 89
},
{
"Name" : "Button 90",
"Number" : 90
},
{
"Name" : "Button 91",
"Number" : 91
},
{
"Name" : "Button 92",
"Number" : 92
},
{
"Name" : "Button 93",
"Number" : 93
},
{
"Name" : "Button 94",
"Number" : 94
},
{
"Name" : "Button 95",
"Number" : 95
},
{
"Name" : "Button 96",
"Number" : 96
},
{
"Name" : "Button 97",
"Number" : 97
},
{
"Name" : "Button 98",
"Number" : 98
},
{
"Name" : "Button 99",
"Number" : 99
},
{
"Name" : "Button 100",
"Number" : 100
}
]
},
{
"ID" : 13,
"Name" : "Unnamed Pico Remote 1",
"Buttons" : [
{
"Number" : 2
},
{
"Number" : 3
},
{
"Number" : 4
},
{
"Number" : 5
},
{
"Number" : 6
}
]
},
{
"ID" : 12,
"Name" : "Unnamed Pico Remote 2",
"Buttons" : [
{
"Number" : 2
},
{
"Number" : 3
},
{
"Number" : 4
},
{
"Number" : 5
},
{
"Number" : 6
}
]
}
],
"Zones" : [
{
"ID" : 2,
"Name" : "Ceiling Fan",
"Area" : {
"Name" : "Office"
}
},
{
"ID" : 3,
"Name" : "Ceiling Fan Light",
"Area" : {
"Name" : "Office"
}
},
{
"ID" : 4,
"Name" : "Main Lights",
"Area" : {
"Name" : "Front Foyer"
}
},
{
"ID" : 5,
"Name" : "Front Lights",
"Area" : {
"Name" : "Outside"
}
},
{
"ID" : 6,
"Name" : "Overhead Lights",
"Area" : {
"Name" : "Kitchen"
}
},
{
"ID" : 7,
"Name" : "Sink Light",
"Area" : {
"Name" : "Kitchen"
}
},
{
"ID" : 8,
"Name" : "Back Porch Lights",
"Area" : {
"Name" : "Outside"
}
},
{
"ID" : 9,
"Name" : "Side Lights",
"Area" : {
"Name" : "Family Room"
}
},
{
"ID" : 10,
"Name" : "Ceiling Fan",
"Area" : {
"Name" : "Family Room"
}
},
{
"ID" : 11,
"Name" : "Ceiling Fan Light",
"Area" : {
"Name" : "Family Room"
}
}
]
}
}
Any chance this integration could detect the new Caseta Occupancy Sensor?
Let me know if i can provide any logging or other details to best assist.
HomeAssistant 0.69 beta includes a PR that changes the way custom_components load: home-assistant/core#14211
It looks like this breaks the custom component, as I get the following error with 0.69:
File "/home/hass/custom_components/lutron_caseta_pro.py", line 24, in <module>
from . import casetify
SystemError: Parent module '' not loaded, cannot perform relative import
@upsert can you add the new 2020 Caseta Motion sensors to this?
originally had an error during loading.
Found out what was causing it which was a missing file that wasn't transferred.
This issue can be deleted.
Pretty sure if it doesn't work now, it's because it's not possible but we never know...
Is there any way to have long press considered as a different function than single press on the Pico remote?
Here's a hot potato! There's a lot of chatter about this, so I thought I'd open an issue so we can keep the conversation in one place.
Lutron action (4) STOP will not work unless the system is executing a Start Raising (2) or Start Lowering (3) command. Currently async_close_cover and async_open_cover are implemented by setting the level (1) to 0 or 100. When issuing a (4) STOP command the bridge will respond with ~ERROR,3 since only Start Raising (2) or Start Lowering (3) can be stopped
What is a proper way to configure multiple smart bridges pro?
This repo is missing a license 😉
Noobie here so apologies if I am doing this incorrectly. I got the custom component warning in my log and attempted to update my file structure to be in accordance...but I must have missed something because I lost all of my light entities. I have tried scouring the forums for guidance but am at a dead end. Are there any instructions on how to update this truly kick@ss component?
When you use the pico remote to trigger an automation in home assistant which in turn turns lights on/off there is a noticeable delay. The delay is not found if the remote is configured to turn lights on and off via lutron bridge. It looks like the lights turn on in the GUI/Dasbhoard instantly, but the lights aren't actually turning on then. I looked at the Pico remote LED that rapidly blinks when you press a button and it seems that the lights turn on/off after it's done blinking. Not sure if maybe it's broadcasting and blocking the action to turn the lights on/off.
After upgrading to HA 0.110, I get several depreciation warnings associated with this integration:
SwitchDevice is deprecated, modify CasetaSwitch to extend SwitchEntity
CoverDevice is deprecated, modify CasetaCover to extend CoverEntity
Light is deprecated, modify CasetaLight to extend LightEntity
Currently everything still operates as expected with these warnings.
Forgive me if I missed something but the instructions make no mention of having to email yourself the Lutron Integration Report. I found that piece of the puzzle here. https://iotrant.com/2019/10/22/integrating-lutron-with-home-assistant/
I can't tell if it's possible from the documentation, but is it possible or will it ever be possible to control the two sides of a plug-in dimmer as two separate switches/lights?
Hi Upsert,
I am not sure if this is a true issue yet, but I thought I would log it anyway. I just added a a ceiling mount occupancy sensor (Lutron LRF2-OCR2B-P-WH) to my radioRA 2 Select main repeater. Currently that is ONLY thing connected to the system. I have nothing else , no switches, nothing but the sensor, and perhaps that is the issue (i am still waiting for my switches to arrive). The sensor shows up in the app and is assign to a room, but it is NOT set to control anything yet, obviously.
My debug logs show that the component sees the bridge and attempts to parse the devices on that bridge, but comes up with none (see log snippet). The integration report shows the sensor as ID 2 and has a name and an area, but it does not have any "buttons" which i think is what is causing the issue. casetify.py seems to need to have the words "buttons" in the if else statement that identify the bridge, light/switchs, and remote. Might simply need a catch for the occupancy sensors, which don't see to have buttons. I've included my integration report as well, so you can see how the sensors are formatted.
I'll report back once I have a switch or two connected. Maybe buttons will show up!
Thanks again for this awesome component!
I have a lutron dimmer switch and want to see when in HA when the off button is pressed to trigger an automation. But the dimmer only shows up in HA as a light. I feel this might not be possible because that is how the switch is represented in the app, more like a light than a switch.
Sometimes when calling the fan.set_speed
service, the actual fan speed seems to be set incorrectly.
For example, calling fan.set_speed
with the below data seems to set the actual fan speed to low ~50% of the time.
entity_id: fan.my_lutron_fan
speed: medium
Interestingly, the reported speed in both Home Assistant AND the Lutron app always matches the service call regardless of the actual fan speed. Maybe this points to this being a bug on Lutron’s side rather than this plugin, but this seemed like a good place to start.
As the component stands now, every time the bridge is programmed, the user must fetch JSON data from the app for the new configuration (as described here). Although this works reliably, it is cumbersome.
Instead of pulling from the app, we should pull this data directly from the bridge. Also, fetching the Integration Report is a quick, non-intensive process, so perhaps it would even be possible to fetch this data every time on startup. We might be able to avoid keeping a lutron_caseta_pro_lutron-gw.json
configuration file around this way.
It appears that the component might (or could be made to) support multiple button presses . . . which would be awesome! However, there is an issue where if I press more than one button at the same time then the sensor value will get stuck as the value of the first button in that combination.
For example I was thinking of creating a combination of FAVORITE+OFF to send a special command via HomeAssistant to shut off my Home Theater....
When I do this, if I press OFF and hold it down while pressing FAVORITE, then the sensor value will get stuck at 4. If i press FAVORITE (value=2) again then the resulting sensor value will be 6 (4 + 2). This applies to any followup button presses . . . I'll get the sum of 4 plus that buttons value...
The only way to revert this is to press the OFF button by itself again which then results in the sensor value reverting back to 0 default state again, and my scripts will resume working.
A multi-button press support would be awesome and looks very feasible with the bitwise combination of the current button values (power of 2)....
But this def. appears to be a bug, in that the base number gets left as the value of the first button pressed...
The set position function is not enabled for shades, a.k.a. covers in Home Assistant.
The code to set position is already in place and it just needs the appropriate code added to supported features.
Add support for the Entity Registry in Home Assistant.
Not sure exactly how to do this but customizable ramp rates would be awesome. I was looking through this plugin for SmartThings and they seem to have implemented it using the Pro bridge.
I am having a very similar issue to #39.
I have done all the config, and am seeing the following logs, but I do not see any devices added. I do see entities added, but no devices.
Please help, thanks!
2020-03-07 22:18:41 INFO (MainThread) [homeassistant.setup] Setting up lutron_caseta_pro
2020-03-07 22:18:41 DEBUG (MainThread) [custom_components.lutron_caseta_pro] Loading Integration Report /config/lutron_caseta_pro_10.x.x.x.json
2020-03-07 22:18:41 DEBUG (MainThread) [custom_components.lutron_caseta_pro] Setting up bridge using Integration Report /config/lutron_caseta_pro_10.x.x.x.json
2020-03-07 22:18:41 DEBUG (MainThread) [custom_components.lutron_caseta_pro] Patched device list [{'id': 2, 'name': 'Overhead Light', 'type': 'switch', 'area_name': 'Front Door'}]
2020-03-07 22:18:41 DEBUG (MainThread) [custom_components.lutron_caseta_pro] Loading platform sensor
2020-03-07 22:18:41 DEBUG (MainThread) [custom_components.lutron_caseta_pro] Loading platform switch
2020-03-07 22:18:41 DEBUG (MainThread) [custom_components.lutron_caseta_pro] Loading platform light
2020-03-07 22:18:41 DEBUG (MainThread) [custom_components.lutron_caseta_pro] Loading platform cover
2020-03-07 22:18:41 DEBUG (MainThread) [custom_components.lutron_caseta_pro] Loading platform scene
2020-03-07 22:18:41 DEBUG (MainThread) [custom_components.lutron_caseta_pro] Loading platform fan
2020-03-07 22:18:41 INFO (MainThread) [homeassistant.setup] Setup of domain lutron_caseta_pro took 0.0 seconds.
2020-03-07 22:18:47 INFO (MainThread) [homeassistant.components.scene] Setting up scene.lutron_caseta_pro
2020-03-07 22:18:47 INFO (MainThread) [custom_components.lutron_caseta_pro] Opening connection to host 10.0.0.70
2020-03-07 22:18:47 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.lutron_caseta_pro
2020-03-07 22:18:47 DEBUG (MainThread) [custom_components.lutron_caseta_pro] Starting Lutron component for host 10.0.0.70
2020-03-07 22:18:48 INFO (MainThread) [homeassistant.components.fan] Setting up fan.lutron_caseta_pro
2020-03-07 22:18:48 INFO (MainThread) [homeassistant.components.switch] Setting up switch.lutron_caseta_pro
2020-03-07 22:18:48 INFO (MainThread) [homeassistant.components.cover] Setting up cover.lutron_caseta_pro
2020-03-07 22:18:48 INFO (MainThread) [homeassistant.components.light] Setting up light.lutron_caseta_pro
2020-03-07 22:18:48 DEBUG (MainThread) [custom_components.lutron_caseta_pro.casetify] Sending query OUTPUT, integration 2, action 1
2020-03-07 22:18:49 DEBUG (MainThread) [custom_components.lutron_caseta_pro] Read value for host 10.x.x.x: OUTPUT 2 1 0.000000
2020-03-07 22:18:49 DEBUG (MainThread) [custom_components.lutron_caseta_pro.switch] Got switch OUTPUT value: OUTPUT 2 1 0.000000
Running 109.6 and updated to the latest version. After the update I get the error above (three times for CoverEntity, SwitchEntity and LightEntity).
Is this an update for 110 that breaks 109 ?
Thank you.
Hello,
I am migrating from basic smart bridge to PRO. Previously on basic bridge everything worked.
My setup is HA 0.84.6 (Hassbian install on Raspberry Pi)
I removed the old lutron_caseta component from my config yaml. Then followed your instructions.
Everything seems fine until I paste the integration report. After doing that I get
Invalid config
The following components and platforms could not be set up:
• fan.lutron_caseta_pro
• cover.lutron_caseta_pro
• sensor.lutron_caseta_pro
• scene.lutron_caseta_pro
• switch.lutron_caseta_pro
light.lutron_caseta_pro
Please check your config.
DISMISS
In the logs:
Unable to prepare setup for platform sensor.lutron_caseta_pro: Platform not found.
11:08 AM setup.py (ERROR)
Unable to find component sensor.lutron_caseta_pro
11:08 AM loader.py (ERROR)
Unable to prepare setup for platform scene.lutron_caseta_pro: Platform not found.
11:08 AM setup.py (ERROR)
Unable to find component scene.lutron_caseta_pro
11:08 AM loader.py (ERROR)
Unable to prepare setup for platform light.lutron_caseta_pro: Platform not found.
11:08 AM setup.py (ERROR)
Unable to find component light.lutron_caseta_pro
11:08 AM loader.py (ERROR)
Unable to prepare setup for platform switch.lutron_caseta_pro: Platform not found.
11:08 AM setup.py (ERROR)
Unable to find component switch.lutron_caseta_pro
11:08 AM loader.py (ERROR)
Unable to prepare setup for platform cover.lutron_caseta_pro: Platform not found.
11:08 AM setup.py (ERROR)
Unable to find component cover.lutron_caseta_pro
11:08 AM loader.py (ERROR)
Unable to prepare setup for platform fan.lutron_caseta_pro: Platform not found.
11:08 AM setup.py (ERROR)
Unable to find component fan.lutron_caseta_pro
11:08 AM loader.py (ERROR)
You are using a custom component for lutron_caseta_pro which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.
11:08 AM loader.py (WARNING)
The JSON seems to be created in the config folder
Any help would be appreciated.
Cheers,
Sam
Added a Caseta Fan switch through the integration. It is created in HA under the "light" domain.
Documentation for this integration suggest it should support "fan" entity types.
Is there any thing in the Integration Report I should modify before uploading to integration to get it to work?
If any logs I should send that would be helpful I'm happy to do it.
Brian
Not sure how to best troubleshoot this.
Seemingly randomly some of my pico remotes will stop working correctly. These remotes aren't paired to an actual caseta dimmer, just to the hub, and I use an automation to make them control non-caseta lights.
I put some logging on it and found out that when this happens, the numeric state on the sensor
entity is wrong. Everything is +8
- so when no buttons are pressed, the state is 8 instead of 0, on
is 9 instead of 1, favorite
is 10 instead of 2, up
is 16 instead of 8, etc.
Usually a restart of Home Assistant will fix the issue, or sometimes it will fix itself after a couple hours.
The syntax of scene has changed in 0.101.x and it is now required that every entity in a scene has the state declared.
Adding the state fixed scenes syntax errors, but scene does nothing when activated.
Below is from my configuration.yaml:
`
scene:
Like how pylutron handles it: https://github.com/thecynic/pylutron/blob/4d9222c96ef7ac7ac458031c058ad93ec31cebbf/pylutron/__init__.py#L399
from the beta release notes:
Note for custom component developers: We are moving to a new file structure. Platforms now live embedded in components. Custom platforms will have to be updated to follow this pattern. This is a breaking change in case your custom platform overrides a built-in platform. Rename your custom platform from, ie light/hue.py to hue/light.py.
https://rc--home-assistant-docs.netlify.com/blog/2019/02/13/release-88/
Thank you very much for this integration, works really well. Not sure the Lutron Caseta interface provides the info, however: can switches, dimmers and fan Caseta device buttons create trigger events like a Pico remote, if so, I would sure use it.
Use case: garage light
Press on: lights come on, turn off via timer/automation in 5 minutes, for pass through
Press on again: set timer to 1 hour (or add to timer), for working in garage.
Use case: bathroom fan timer along the same line, etc.
Using this, the actual switch, dimmer and fan Caseta device buttons can be made to function like the respective Pico.
Everything works perfectly if I have less than 5 switches manually defined. Once I define 5 or more, I get the following error:
2018-04-07 21:07:13 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/lib/python3.5/asyncio/tasks.py", line 239, in _step
result = coro.send(None)
File "/home/homeassistant/.homeassistant/custom_components/lutron_caseta_pro.py", line 251, in _read_next
yield from callback.call(mode, integration, action, value)
File "/home/homeassistant/.homeassistant/custom_components/lutron_caseta_pro.py", line 213, in call
yield from attr(*args, **kwargs)
File "/home/homeassistant/.homeassistant/custom_components/switch/lutron_caseta_pro.py", line 54, in read_output
yield from device.async_update_ha_state()
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity.py", line 192, in async_update_ha_state
raise RuntimeError("Attribute hass is None for {}".format(self))
RuntimeError: Attribute hass is None for <Entity Master Bedroom Fan: on>
Every time I reboot, the device listed as having the error changes. Sometimes its a switch and sometimes its a fan. When I got this error, I removed one of my switches from my configuration.yaml file. After a reboot, everything worked fine. I tried adding back in the 5th switch and after a reboot, the error came back.
If my Lutron switch is left on, sometimes after I restart Home Assistant, Home Assistant thinks the switch is off. I have to toggle the switch for Home Assistant back to on for the states to sync back up.
This doesn't happen often, but I tinker with Home Assistant enough that it happens frequently enough to be noticeable. Haven't dove into code yet to see if anything looks suspicious on why that might occur.
Looks like custom_updater is moving on to HACS. Repository would need to change the directory structure a little to make it work:
https://custom-components.github.io/hacs/#add-custom-repos
For a integration repository to be valid these are the criterias:
The repository uses GitHub releases (Optional)
If there is releases:
When installing/upgrading it will scan the content in the latest release.If there is no releases:
Update will not be possible (but the user will still be able to install/reinstall it).
It will scan files in the branch marked as default.There is only one integration (one directory under >ROOT_OF_THE_REPO/custom_components/) pr repository (if you have more, only the first >one will be managed.)
The integration (all the python files for it) are located under >ROOT_OF_THE_REPO/custom_components/INTEGRATION_NAME/
In that integration directory, there is a manifest.json file.
So as much as I want to just purchase the RA2 select I'm starting to think that Lutron isn't going to add functionality for sensor status via telnet. So I have decided to purchase the RR-MAIN-REP-WH RadioRA 2 main repeater and go this route. I currently have the caseta pro so either way I'd have to get something different for motion.
But I still want to be able to use HASS with the RR-MAIN-REP-WH to get picos and motion sensors. I'm assuming it uses the same telnet protocol. Would this be possible to implement.
Great component. A critical part of my HA setup as it lets me use Pico remotes for a myriad of tasks. Thanks.
One enhancement I'd love to see is for the component to monitor a location (e.g. a fixed filename in an fixed directory) and automatically update the Integration Report if a file is either present or updated there. This would allow, for example, exporting the Integration Report from the app to a Dropbox folder and then have to take no further action (other than possibly restarting HA) for it to be processed.
Once processed, the file could be renamed (e.g. add a ".processed" extension), deleted, or simply left in place and rely on the timestamp or an md5 to detect if it's updated.
There are likely some security considerations, so I might not enable this by default, but for my own configuration this would definitely simplify adding new devices.
This, unfortunately, won’t be the most helpful because I have no debug logs or recreate, but some days when I turn my lights off via the physical switches, home assistant still treats them as if they are on. No entry appears In the device log for a power off event. I need to toggle them off from HA to get it to recognize the correct state. Version 0.110
Just wanted to document it as it is strange behavior. If I get more info the next time it happens I’ll post more.
If I have a device, say z-wave, and put it in an area in Home Assistant, this becomes a room in Google Assistant.
There does not appear to be a way to provide the area name for devices generated from this integration. Ideally (at least for me) if the room name in the lutron app could flow into the area definition in Home Assistant, I think it would propagate to Google Assistant.
Unless I am missing something and it should, but is not.
Alternatively, is there a way to specify the area even if manually in a customize or configuration file?
PS. Been using this heavily over the last few weeks as I just put in caseta, and it has been working great!
I'm not quite sure where the problem lies here (I can only assume me) but whenever I try to trigger an automation with the sensor.pico in hassio it takes two seconds to fire. I can confirm the automation will fire immediately when the green light on the pico stops flashing. If I keep pressing the button on the pico (to keep the light flashing) the automation will not fire until I stop and then the light stops.
I had assumed that hassio was not seeing the state change until the light stopped flashing, however testing the button presses while watching the sensor in hassio shows immediate state changes. I'm stumped.
Here is my automation code:
- id: '1548110829104'
alias: Dining Room Pico On
trigger:
- entity_id: sensor.pico_remotes_dining_room_pico
platform: state
to: '1'
action:
entity_id: light.dining_room_main_lights
service: light.turn_on
Running HA 84.3 and my lutron app reports 6.3
Any plans to support these?
Your add on is a huge and invaluable part of my setup; thanks so much for this!
Would it be possible to add support for the custom update tracker? I think this is just a .json file in your GitHub repo that tracks the version change.
I'm running on 0.100.3 on a Raspberry Pi is Raspbian (Buster).
I have a Lutron Caseta L-BDGPRO2 SmartBridge Pro and I'm able to Telnet into it.
I installed all of the files as required and made first the basic changes to the config. I got the prompt to provide my Integration file which I did and it showed up in the config directory as a JSON file.
After that I made the more extensive changes listed below.
No switches or dimmers show up under devices.
I've restarted Home Assistant to no avail.
Home Assistant can talk to the hub via HomeKit, but that is painfully slow (with HomeKit's one minute polling).
No information shows up in the log file except for: "2019-11-11 14:20:26 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for lutron_caseta_pro which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant."
Can you please help?
Thank you!
Tom
lutron_caseta_pro:
bridges:
- host: 192.168.x.xx
mac: xx:xx:xx:xx:xx:xx
default_transition_seconds: 1.0
switch: [ 2, 5 ]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.