Make sure you are on the latest platform release if you're on 2.3.1 (the latest is 2.3.1.142 as of this writing, though an issue with button event subscriptions was fixed a couple hotfixes ago--but I'd be on the latest just to be sure)
Try hitting "Done" in the Button Controller instance to re-initialize subscriptions to see if that helps (technically the "child app," though you can do the same in the "grandchild app" too if you want; the "parent app" where you'd go to add completely new instances isn't what I mean).
Hmmmm... are you using the latest platform release? I seem to recall something in the release notes about a fix for button events. Logging should be there... see below.
I'm running today's update 2.3.1.142. I turned on triggers and actions for the button controller and it made no difference in the log.
No matter what action I put in for button 4, it's never executed. But clearly in the log it reports the button was pushed each and every time, and then nothing follows it in the live log.
I have a duplicate trigger/actions set for button 2, and it executes every time.
Yes I tried that and it didn't make any difference.
Here is the live log when I push the buttons (sorry YouTube is aggressive on compression and blurs things) First I press Button 4 twice, then I press Button 2 once. Button 4 just refuses to run the action. https://youtu.be/3ufWgaK95UA
What do you see under "Event Subscriptions" if you go to the App Status page (see that link for how) for this Button Controller instance? You should see things like "pushed.2" (which it sounds like is working) and "pushed.4" (which it sounds like isn't, so maybe that's missing...). Not much you can do if it isn't there; "Done" should get it back, but if that doesn't help maybe re-create the whole thing and see if it helps?
Hmm, since there's nothing there: maybe I'm remembering wrong and this subscription is really in the grandchild app, so maybe check that one for each, too...
So here's something I've tried- I went to the button device in the Devices Page, and clicked the "push" command for both buttons 2 and 4. Same result- button 4 reported pushed but nothing else. Button 2 reported pushed and a ton of messages as the action was executed.
So it appears the problem has nothing to do with issues related to the physical buttons.
Right, I wouldn't have suspected anything to do with the physical buttons, just the event subscription on the app side. It's always seemed like the button events are getting generated correctly from the real device, and they definitely should when simulated from the commands on the device page (which for most devices doesn't need anything from the device at all and does nothing besides generating this "virtual" event).
What does the device's management page look like? Does it show "number of buttons" in the upper corner of that page? And does that match what the device has?
And under that same section (Current States) does it change every time you press a button?
No, this is an app problem. Re-pairing the device won't help (unless you end up redoing the app as part of that, I suppose, but you can do that either way).
I'd suggest removing this particular set of actions from the Button Controller instance, then adding it again, to see if that helps. That being said, this is the exact bug I thought I read was fixed a couple hotfixes ago...
All I did was delete button 4 from the button controller and added it again with the exact same triggers and actions. The subscription status changed from "pushed.null" to "pushed.4". Everything is now working as it should.
It must have been caused by my changes. I was redoing the actions of these buttons earlier today.