How to access custom action for a Momentary Button?

I have a child device of type 'Luxor Theme' that has a Momentary capability on a button called 'Push'.

I can't for the life of me figure out what capability of the custom action I need to select to have this child device show up as an option?

The drive code can be found here.

Here is a snippet of the code:

Summary

metadata {
definition(name: "Luxor Theme", namespace: "tagyoureit", author: "Russell Goldin") {
capability 'Momentary'
}

simulator {
// TODO: define status and reply messages here
}

// UI tile definitions
tiles(scale: 2) {
    multiAttributeTile(name: 'momentary', type: 'generic', width: 6, height: 4, canChangeIcon: true) {
        tileAttribute('device.momentary', key: 'PRIMARY_CONTROL') {
            attributeState('off', label: 'Push', action: 'momentary.push', icon: 'st.lights.philips.hue-multi', backgroundColor: '#ffffff')
            attributeState('on', label: 'Push', action: 'momentary.push', icon: 'st.lights.philips.hue-multi', backgroundColor: '#00a0dc')
        }
    }
    main 'momentary'
    details 'momentary'

Here is the log from pushing the momentary button directly from the devices screen.

It shows 'Executing 'push' on Luxor Lights On', so I'm trying to execute that push button as an action in Rule Machine.

Log:

Summary

dev:1212020-11-07 12:47:35.760 am infoLuxor Lights On theme successfully turned on

dev:1212020-11-07 12:47:35.759 am debugParsing '[Status:0]'

dev:1212020-11-07 12:47:35.720 am debugSending /IlluminateTheme.json to controller POST /IlluminateTheme.json HTTP/1.1 Accept: / User-Agent: Linux UPnP/1.0 Hubitat HOST: 192.168.86.115:80 Content-Type: application/json Content-Length: 26 {"ThemeIndex":9,"OnOff":1}

dev:1212020-11-07 12:47:35.706 am debugExecuting 'push' on Luxor Lights On

At the very least you should be able to choose the action type that includes running a custom command, your driver may need the actuator capability, which I don't think requires any additional coding, just referencing it in the list. I just need to reboot my hub and find you an example. Though I would have thought there was an option somewhere for a momentary button press...

Are you not able to select something like this when setting up an action in your rule?

If you're interested, this is what I was referring to earlier with running a command.

When I select button, the child device I need does not show up.

Yes - I think you are probably correct. I'll see what happens if I modify the drive that way.

1 Like

Looking at the capability documentation they deprecated the Button capability and it looks like they split it up into different capabilities such as PushableButton, HoldableButton, ReleaseableButton, DoubleTapableButton. I suspect the main one is the PushableButton, this includes the attribute for the number of buttons. Perhaps if you started by implementing that capability your device may then start to show up.

Thanks for pointing me in the right direction @sburke781.

I added the following line of code and it works like a charm now:

capability "Actuator"

2 Likes

No worries. I'd imagine implementing some of the button capabilities may open up a few other options, but if you got it working the way you need it, that's a great result.

1 Like

Iā€™m currently having trouble getting this working. Looks like I have the driver code setup but Iā€™m not seeing themes available anywhere to select or put in a rule.

Hopefully Iā€™m just looking in the wrong placeā€¦

Any help would be appreciated.

@bbdj Is the Luxor app dead? :skull:

Thought an uninstall/install would be helpful, but now I can't get it reinstalled. :sweat_smile:

Thanks,
Hubirat :rat:

Hey @Hubirat - It's not dead. How are you installing it? Are you using the Hubitat Package Manager?

Thanks for the reply!

So I uninstalled thinking a reinstall would get me all the latest bits. Turns out that when trying to install from the package manager, I can't. The app is returned in the search, but the link/button isn't clickable... :thinking:
image
Was going to try via the .groovy file in Git but thought I'd ask if it was even alive first.

Appreciate your help! Would love to get some simple rules setup for my deck lights! (FYI, generally I think the Luxor stuff is kinda trash, their app in particular. Wow, just horrible. :sweat_smile:)

Thanks,
Hubirat

Ahhh yes, you might as well go with the .groovy.

So I found from experience it was easer to create specific 'scenes' in the Luxor app and then trigger those scenes from Hubitat.

When you sync your luxor panel to hubitat, the scenes will import and you can trigger them using Capability Actuator and then Command Push.

Cool cool. Got all the things reinstalled but hitting a snag. And I have 2 questions. I'll start with the questions:

  1. When you say 'scenes' are you talking 'themes'? B/c my controller doesn't have scenes.

  2. Can scenes/themes only be used as a trigger? I want to use them to change the color at a particular time/day (my contractor setup Halloween... :sweat_smile:) and if I'm Rule Machineing it right, that doesn't seem to work (they don't show up in any list).

On to my snag. When creating a rule, and setting the scene/theme as a Trigger, there are no options for Select Attribute so I can't move on.


Apologies if these are stupid newb questions. But REALLY appreciate the assistance. :raised_hands:

Hubirat

@bbdj Oh, found this... But no Luxor devices are listed... (notice no Halloween)

@bbdj Help....? :sweat_smile:

Hey, sorry! I've been away.

When you go to your Luxor Controller in Devices, does it show your lights and themes like this?

1 Like

It does....
image