Lutron RadioRa2 not seeing SeeTouch Keypad button presses

Is this a typo?

In the initialization routine, it calls the internal class “LutronButton()” with 4 variables

“LutronButton(hass, area.name, keypad, button)”
It’s using area.name

In the class definition in the “init” area it is uing the format with an underscore
“class LutronButton:
def init(self, hass, area_name, keypad, button):”
It’s using area_name here

But it looks like the internal class parameters are using underscore names on the left and assigning them value from the dot formatted info on the right (except for the area name element)
“self._id = slugify(name)
self._keypad = keypad
self._area_name = area_name <—should the right side read area.name?
self._button_name = button.name
self._button = button
self._event = “lutron_event”
self._full_id = slugify(f”{area_name} {name}")
self._uuid = button.uuid"

Since the events are not firing - and entities are more intuitive, I think a better approach would be to add a button entity for each of the buttons. The Lutron bridge is sending button press messages, that’s clear from the Hubitat log.

The integration for the keypad LEDs is in the switch.py script

"""Support for Lutron switches."""
from __future__ import annotations

from typing import Any

from homeassistant.components.switch import SwitchEntity
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType

from . import LUTRON_CONTROLLER, LUTRON_DEVICES, LutronDevice


def setup_platform(
    hass: HomeAssistant,
    config: ConfigType,
    add_entities: AddEntitiesCallback,
    discovery_info: DiscoveryInfoType | None = None,
) -> None:
    """Set up the Lutron switches."""
    devs = []

    # Add Lutron Switches
    for area_name, device in hass.data[LUTRON_DEVICES]["switch"]:
        dev = LutronSwitch(area_name, device, hass.data[LUTRON_CONTROLLER])
        devs.append(dev)

    # Add the indicator LEDs for scenes (keypad buttons)
    for scene_data in hass.data[LUTRON_DEVICES]["scene"]:
        (area_name, keypad_name, scene, led) = scene_data
        if led is not None:
            led = LutronLed(
                area_name, keypad_name, scene, led, hass.data[LUTRON_CONTROLLER]
            )
            devs.append(led)

    add_entities(devs, True)

class LutronSwitch(LutronDevice, SwitchEntity):
    """Representation of a Lutron Switch."""

    def __init__(self, area_name, lutron_device, controller):
        """Initialize the switch."""
        self._prev_state = None
        super().__init__(area_name, lutron_device, controller)

    def turn_on(self, **kwargs: Any) -> None:
        """Turn the switch on."""
        self._lutron_device.level = 100

    def turn_off(self, **kwargs: Any) -> None:
        """Turn the switch off."""
        self._lutron_device.level = 0

    @property
    def extra_state_attributes(self):
        """Return the state attributes."""
        return {"lutron_integration_id": self._lutron_device.id}

    @property
    def is_on(self):
        """Return true if device is on."""
        return self._lutron_device.last_level() > 0

    def update(self) -> None:
        """Call when forcing a refresh of the device."""
        if self._prev_state is None:
            self._prev_state = self._lutron_device.level > 0

class LutronLed(LutronDevice, SwitchEntity):
    """Representation of a Lutron Keypad LED."""

    def __init__(self, area_name, keypad_name, scene_device, led_device, controller):
        """Initialize the switch."""
        self._keypad_name = keypad_name
        self._scene_name = scene_device.name
        super().__init__(area_name, led_device, controller)

    def turn_on(self, **kwargs: Any) -> None:
        """Turn the LED on."""
        self._lutron_device.state = 1

    def turn_off(self, **kwargs: Any) -> None:
        """Turn the LED off."""
        self._lutron_device.state = 0

    @property
    def extra_state_attributes(self):
        """Return the state attributes."""
        return {
            "keypad": self._keypad_name,
            "scene": self._scene_name,
            "led": self._lutron_device.name,
        }

    @property
    def is_on(self):
        """Return true if device is on."""
        return self._lutron_device.last_state

    @property
    def name(self) -> str:
        """Return the name of the LED."""
        return f"{self._area_name} {self._keypad_name}: {self._scene_name} LED"

    def update(self) -> None:
        """Call when forcing a refresh of the device."""
        # The following property getter actually triggers an update in Lutron
        self._lutron_device.state  # pylint: disable=pointless-statement

I wonder if the implementation differences between Hubitat and HA are in the configuration.
In Hubitat you load in a configuration list which includes the device integration ID, device type and name.
So it can listen for the Lutron Hub messages related to the raw device integration ID number. The Elk M1 has a similar scheme.
In HA they are relying on automatically parsing the Repeater files in memory by names only. This might create a confusion or omission.
If we could manually configure the keypads with device IDs, HA could listen for button prep messages from those Device IDs specifically.

That might be the uuid: briefly mentioned in the docs, but the documentation/explanation of uuid: is sparse and there is no example presented for its use.

Maybe the recent changes to events will help.

Nope, still doesn’t work

I’m also struggling with the core “Lutron” (non Caseta) integration and using Ra2. I think possibly rather than posting here, it might be worth trying to open a bug/request on the Git page for the integration:

Thanks for the tip

Submitted
(1) Lutron RadioRa2 (integration lutron) not seeing SeeTouch Keypad button presses · Issue #101017 · home-assistant/core (github.com)

I have encountered the same issue with a RadioRA2 installation where keypad button presses are not reported as lutron_events.

For me it seems that the issue is related to button “released” events not being captured unless there is a preceding button “pressed” event.

Some keypad buttons (raise lower) report both whereas most programmed buttons in RA2 only broadcast on RF a released event.

(I have posted this to the git thread as well)

Just for clarity - If you log into the Ra2 hub yourself and read the telnet output, most all the buttons (Keypad, Pico, etc) transmit on both press and release. Whether the software platform reads those other messages or not is a different matter altogether. Top, middle, and lower buttons on Pico remotes will even trigger a “held” event in the Lutron telnet environment, if you hold the button on the pico down for 5 seconds.

It’s actually more information than the official integration protocol/spec would lead you to believe exists, in some instances.

I am on RadioRA2 and monitoring the telnet on my computer and most of my keypad buttons do not transmit a pressed event.
e.g. in my circumstance I have a table top keypad (RR-T10RL) with integration id of 9, pushing scene button (8) generates
~DEVICE,9,8,4 followed by all the individual control instructions to different dimmers.

Whereas pushing the lower button generates
~DEVICE,9,24,3
and releasing the button generates
~DEVICE,9,24,4
where 24 is the button and 3,4 is the button state.

I am also watching the 434 MHz on an SDR and can see that the keypad is not transmitting on pressed for scene buttons but is transmitting only on released.

Picos and the raise/lower on keypads transmit RF on both.

I think my issue is related to HA lutron_event not being captured on the release

New to HA and also have RA2 and would like to try and integrate it. You guys have any tips just to get lighting control into HA? This is the only thing I have been able to find:

HA did pickup that I have a Lutron Connect Bridge but not sure if that helps control the lights as the link above only talks about interfacing with the RA2 Main repeater.

You likely have “Scene Saver” aka “Save changes on button hold” enabled on your keypads. Turn it off (Lutron software) and your keypad should report the pushes as desired.

Home Assistant integrates with RadioRA 2 via the Main Repeater, so those are the steps to follow. There is no GUI setup, unfortunately.

1 Like

Thanks for the reply. I will give it a go. :crossed_fingers:t4:

This solved it. Thank you!
It would be great if I could leave the “scene saver” on as it has been useful at times to make minor changes without the RA2 PC software

That’s probably not my problem, mine is already turned off.

I’ll try activating it, then deactivating it to see if anything changes.

How do I get the up/down buttons on a SeeTouch keypad to appear in HA? Only my 6 toggle/scene buttons appear, but the up/down do not appear to be logged when I click nor can I use them to integrate into any automations.

FWIW:
Following the latest HA update 2024.4.3 some of my keypads expose the raise/lower buttons.
It seems to correlate with how they are programmed in the RadioRA2 software. If I have them programmed to “Raise programmed devices” or “Lower programmed devices” they are exposed as entities in HA. Whereas when programmed to “Raise last button pressed” they are not.

I hope that helps

I noticed the new core Lutron integration added additional entities.
Every SeeTouch and Pico now has an event entity for each button.
AND HOME ASSISTANT CAN SEE THEM!

Works pretty slick! Using lutron event triggers, everything is finally working.

Only small issue is the names the events are given in the integration listing are not the same as the actual event names. You have to go into the developer tools events section, setmup a listener and push the button to get the actual name.

For example.
I have a button to control a window shade
In the integration listing it shows
“event.kitchen_keypad_1_dining_room_shade”

If i use that as the event id it doesnt work

In the developer tools listening area the button creates this event id
“kitchen_dining_room_shade”

Not a huge deal

Really happy its working now.

Thanks

Dont know which of the recent changes did it. My current system

  • Core2024.5.0
  • Supervisor2024.04.4
  • Operating System12.2
  • Frontend20240501.0