Rule not triggered by button press

Hello!

Using a button controller on a Pico 5 buttons remote. I have one button working just fine with a rather lengthy rule (nothing complex, but I use the same button as an on/off switch that sets a scene, so setting intensities, hues, saturations etc.).
I fumbled around to copy that rule to a different button to change the values and set a different scene. I'm saying "fumbled" because the whole process is quite frustrating. Copying the button rule just resulted in a mess of "broken actions" on all actions using a private variable. So I removed all the actions, and used the clipboard instead. The rule looks OK, and if I use "run action" it runs as expected.

Now, the button press doesn't trigger the rule at all. I see the button press in the logs (device 97 is the remote, device 90 is the lutron telnet device)

dev:97 2023-03-16 16:52:51.212 info Pico Lucas Bedroom button 5 was pushed [physical]
dev:90 2023-03-16 16:59:51.384 inforcvd: DEVICE,5,4,4
dev:90 2023-03-16 16:59:51.147 inforcvd: DEVICE,5,4,3`

I see the link in the device itself

In Use By

Button Controller-5.1: Pico Lucas Bedroom (Button Controller-5.1)
Pico Lucas Bedroom: button 1 pushed (Button Rule-5.1)
Pico Lucas Bedroom: button 5 pushed (Button Rule-5.1)

Is there anything I should try? I'm scared I will have to remove/readd the device because creating rules is sooooooooo slow (I like Hubitat a lot, but man, UX is absolutely catastrophic, this UI and the ways we have to create rules is so time consuming :frowning: )

Thanks!

1 Like

I’m curious - is there a reason why you’re not using scenes or room lightning for this?

Can you post a screenshot of the rule and the “problematic” copy?

I did load the scene app and gave it a try, but there are a couple of issues I could not really work around.

Initially these are LIFX scenes, that I regularly control using Google Assistant. Somehow, the capture function doesn't really capture the device state properly. Which means that I have to rely on separate color settings (one from LIFX, one from Hubitat) that might look very similar, but which ultimately will not be the same in a logical comparison.

And the reason behind this is I want to have a way to turn on OR turn off OR switch scene using the same button. So button 1 sets the "Sleep scene", button 2 sets the "Day scene" (I'm planning to use the arrows on the Pico to control the intensity on top of that). In a rule, what I do is I compare the current hue with the target one. If it matches the one from the button press, then it's going to turn off the lights. If it doesn't or if the lights are off then it's going to set the scene.

Here are the complete rules. Both work when started manually with Run Actions
Button 1 (source, works)

Button 5 (copy, not triggered)

And the controller itself:

Thanks for looking :slight_smile:

No worries - would you mind adding the screenshots directly instead of linking to them?

I don't mind at all :slight_smile:

1 Like

@bravenel looks like the same issue I reported but haven't had time to replicate yet?

1 Like

@BorrisTheCat, is there a post that you could link to?

Turn on all logging for the rule, and post a screenshot of what happens when you push the button. Also post a screenshot of the Event Subscriptions portion of the App Status page (gear icon).

Not a clue what you're referring to...

What happens is what I posted above

dev:97 2023-03-16 16:52:51.212 info Pico Lucas Bedroom button 5 was pushed [physical]
dev:90 2023-03-16 16:59:51.384 inforcvd: DEVICE,5,4,4
dev:90 2023-03-16 16:59:51.147 inforcvd: DEVICE,5,4,3`

As for the event subscriptions, you're definitely onto something!!
I have a

pushed.null

when there's a pushed.1 for Button 1 that works.

Would I be correct to assume the only fix is to just delete the rule and recreate it?

1 Like

Probably just delete the trigger, and re-create it. Be sure to hit Update after doing that. Check the Event Subscriptions, and let me know. It should be pushed.1

It's in a button controller, not sure I can delete the trigger, can I?

Oh, then yeah, you'll have to delete it and start over.

Sorry saw it before I went to bed.

This. When you make a change to a button rule and it loses it subscriptions.

1 Like

Yes the same bug. Have you still go the rule? I had deleted and recreated mine before I could get everything Bruce needed.

1 Like

Now you've got me wondering if that same issue is connected to what I reported last week about every BC action "breaking" when edited. Because in all other respects, my copied rule looked "fine" (before editing any of its actions) yet was unresponsive. I didn't think to check its subscriptions, but will revisit.

1 Like

Marked as the solution, but this pains me a lot ::
Oh well, I'll try to repro what created the issue initially when recreating the rule, maybe it could help someone else in the future :slight_smile:

1 Like

Yeah it's still there, probably won't have the time to work on it before later today.
What was needed?

2 Likes

I believe the snapshot of the rule and all the pages from the app settings page which is when you hit the settings cog from within the app.

Alright, so I went ahead and deleted the rule, recreated it with a copy from another button, as I thought I had done the first time around. The trigger was recreated properly. Good news, butunfortunately really not sure what happened so I don't have proper repro steps :frowning:

Now, it's not like it's working as expected. A direct copy of the rule onto the new button doesn't behave the same... One just doesn't report the states that are requested properly or does some weird logic error

In the copied rule, notice how 10 is not equal to 10!!
IF (Lucas Bed Ambience, Lucas Table Ambience(off, off) any is off(T) OR NOT Lucas Bed Ambience hue(10) = gLIFXHue_Salmon(10)(F) [TRUE]) THEN

Whereas in the source rule, it does behave properly
IF (Lucas Bed Ambience, Lucas Table Ambience(off, off) any is off(T) OR NOT Lucas Bed Ambience hue(10) = gLIFXHue_Salmon(10)(T) [TRUE]) THEN

Of course, both pages have been refreshed properly... Should I open a new thread?

Download the Hubitat app