upsert / lutron-caseta-pro

Custom Home Assistant Component for Lutron Caseta Smart Bridge PRO / RA2 Select

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pico Remotes wont respond until indicator light (tx) turns off

mspace00 opened this issue · comments

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

I will direct you to my comments in #16 . I definitely recommend using the native Lutron programming for the fastest possible response time. For example, an in-wall dimmer for the light that will be very fast and a scene pico next to it for scenes that fade in more slowly.

In testing my pico PJ2-3BRL and PJ2-4B remotes, the LED on them flashes for under two seconds for every button press (about 1.4 seconds) and also for the button release. It does not flash continuously in between the press and release flashes and the only latency is in the processing by HA and the ramp up rate on the outgoing command. So I do not attribute much significance to the LED flashing and I can see the actions firing long before the LED goes out.

Thanks upsert. After more testing I think the delay resides in HA somehow. What I cant figure out is why, if I keep pressing the button on the remote, say ever 1 second, the automation wont trigger. I thought originally it must be waiting for the pico tx to finish, but I can see in both HA and in the Lutron telnet that the key presses are registering instantly.

I'm still not convinced there is not something happening here. I have moved into node red so that I can debug, and here is what I have found:
-using an inject to manually trigger light.turn_on works immediately. Repeatedly pressing the inject manually has no ill effect.
-using the pico remote I see the delay, repeatedly pressing the remote button will cause the trigger to not fire until i stop.
-using a zwave sensor to trigger I see no delay, repeatedly triggering the zwave sensor has no ill effect.
I can only assume it is something with the pico interface as all my other triggers are immediate :(

One quick observation...when pressing the pico remote repeatedly I am unable to control other functions within home assistant. Once I stop pressing the pico repeatedly the actions fire. I will try to get some system resource info to post.

I haven't had time to look through the code, but it almost feels like the pico remote is blocking the interface with home assistant. If I do some sort of action within the native lutron app/eco system while the pico and homeassistant are doing their thing, it's not blocked. Only when using home assistant.

I haven't had time to look through the code, but it almost feels like the pico remote is blocking the interface with home assistant. If I do some sort of action within the native lutron app/eco system while the pico and homeassistant are doing their thing, it's not blocked. Only when using home assistant.

It looks to me like this is a problem with the Lutron telnet interface and not with this project's code. If I directly telnet in, push a button on the pico, then run a command, it still has this problem and the command isn't immediately run.
It looks like the Lutron telnet spec supports disabling output per-connection, so maybe we could open multiple telnet connections and have one for input and one for output? Don't know if it would actually help, but I am experimenting with it right now and will see if I can get around it.

Edit: I think the delay is on purpose for whatever reason. After posting this comment, I realized that the delay is also in the Lutron app. If I press a button on a pico remote, then immediately try to change a light's state in the app, there is a delay just like with this HA component.
Found a reddit thread that has some possible explanations. The OP of that post emailed Lutron about it so we will see if anything comes of it.

It's a limitation of the lutron wireless functionality. Only one device can transmit at a time. While the pico TX light is on, the lutron hub does not allow sending anything. So for fast communication from lutron to lutron, pair them directly. Only go through the hub crossing between a different brand.