[BETA] Advanced Button Controller (ABC)

You’re right… I was getting the error on the new iPhone.
On Monday I’ll try it on an Android device.

Hi - this looks amazing, as a former StaplesConnect user I’m very excited at the prospect of being able to use Picos as plain buttons again. (Wink has not worked out for me).

Can anyone give me a rundown of pre-reqs to make this work? I assume I need to obtain a physical Lutron Caseta Hub for the radio/clearconnect, then I add Picos to that, and then ST/ABC will be able see them when I establish the connection between Lutron & ST?

Unfortunately you would need everything you mentioned and you also need another intermediary device like a PC or a raspberry pi that can house a nodejs script. See link below for details.

1 Like

Thanks - I’ll go away and digest that, will see if it’s something feel like biting off.
EDIT 2: ok, i’ll stop reacting to every 3rd word i read and actually go away and digest it lol.

Thanks @stephack, this worked great for my Xiaomi Aqara smart switch.
Since the switch only supports a single button press (and only has one button), I added “Dimmer (Cycle Up)” and “Dimmer (Cycle Down)” functions so that I could cycle a bulb with each button press from off->1%->40%->100%->off->… (and the opposite for cycle down). It was essentially the same code as adjustFan.

If anyone is interested, the general details are below.

The device handler I used:
definition (name: “Xiaomi Zigbee Aqara Button AQ2”, namespace: “terk”, author: “terk”)

Basic code additions:
def getPreferenceDetails(){
def detailMappings =
[…
[id:‘dimCPlus_’,desc:‘Cycle Brightness +’,comm:cycleUp, type:“normal”],
[id:‘dimCMinus_’,desc:‘Cycle Brightness -’,comm:cycleDown, type:“normal”],

section(“Dimmers (Cycle Up)”, hideable: true, hidden: !shallHide(“dimCPlus_${buttonNumber}”)) {
input “dimCPlus_${buttonNumber}pushed", “capability.switchLevel”, title: “When Pushed”, multiple: true, required: false, submitOnChange: collapseAll
if(showHeld()) input "dimCPlus
${buttonNumber}held", “capability.switchLevel”, title: “When Held”, multiple: true, required: false, submitOnChange: collapseAll
}
section(“Dimmers (Cycle Down)”, hideable: true, hidden: !shallHide("dimCMinus
${buttonNumber}”)) {
input “dimCMinus_${buttonNumber}pushed", “capability.switchLevel”, title: “When Pushed”, multiple: true, required: false, submitOnChange: collapseAll
if(showHeld()) input "dimCMinus
${buttonNumber}_held”, “capability.switchLevel”, title: “When Held”, multiple: true, required: false, submitOnChange: collapseAll
}

def cycleUp(devices) {
log.debug "Cycling up: $device"
def currentLevel = devices.currentValue(‘level’)[0]
if(devices*.currentValue(‘switch’).contains(‘off’)) devices.setLevel(1)
else if (currentLevel < 34) devices.setLevel(40)
else if (currentLevel < 85) devices.setLevel(100)
else devices.off()
}

def cycleDown(devices) {
log.debug "Cycling down: $device"
def currentLevel = devices.currentValue(‘level’)[0]
if(devices*.currentValue(‘switch’).contains(‘off’)) devices.setLevel(100)
else if (currentLevel > 85) devices.setLevel(40)
else if (currentLevel > 34) devices.setLevel(1)
else devices.off()
}

@stephack can I please have Github settings.

stephack/ABC
Master

Thank you.

OK I don’t know what I am doing wrong. I installed the app, no errors. I checked for updates in Github. No updates. I opened my IOS SmartThings app. Went to the Marketplace and to My Apps clicked on the Advanced Button Controller. Then New button Device Mapping. I get the black gear, and it spins forever and nothing happens. It locks up SmartThings App. Any ideas on what is wrong? I have a new Aeon Quad coming tomorrow, and was hoping this would work. Thanks.


Thank you, at least you see what is happening. Appreciate the help.

You should be able to back out all the way out…then go to smartapps-> advanced button controller and there should be a generic button mapping at the top. This would be the incomplete mapping that hung up. You can then edit it to your needs and the app should function as designed from them on. All new mappings should work fine. Why this started happening only with IOS and only on the first run is anyone’s guess. It’s getting really discouraging trying to code for ST these days.

Edit: forgot to mention…when it “hangs”, turn off your screen and turn it back on. The spinning wheel will go away and it will then show you the blank space above the “New device mapping”. Click on that and configure your button controller. Everything should work fine after that.

Ok got it working that way, thanks. The closing the screen worked. Add it to your docs. Now off to the Wallmote thread to find out how to set the slider.

OK everyone, it looks like this problem is happening with other smartApps that use a coding shortcut to avoid using Parent/Child SmartApps. I decided to use this shortcut because it made it MUCH simpler to setup the app (especially for someone new to IDE). This workaround was never supported by smartThings and recent changes to the IOS app no longer likes this option.

Sooo…we can do one of 2 things.

  1. I leave the app as is and IOS users follow the instructions a few posts above to complete the initial setup. This option has an initial setup bug but is easier to install and maintain since it is only one smartApp. After the initial setup, everything runs as expected.
    OR
  2. I can post the parent and child smartapps that will correct this bug. Please note that the existing smartApp will have to be completely removed and the 2 new smartApps added to IDE.

I don’t want to invest more time into this app if no IOS users really care about the initail setup bug.

Let me know.

Now being an IOS user, I will just say this. You will be hounded by other users that don’t see the instructions. Of course unless you posted on top of the thread. Your time is valuable to, so you are the one that has to make this decision.

1 Like

Thanks for the feedback. I plan to update the original post with whatever I decide to go with.

Just wanted a few opinions because I won’t be supporting both versions (I barely have time for one). Any preference?

I for one like completed functioning things. Being in the building automation field for 32 years, I get frustrated when things are’t just right. So for me it is a no brainier, I would like the correct functioning method. But since this is your brainchild it is your decision. But I do appreciate your asking. it is your time, that you have to provide.

1 Like

All, I’ve updated the original post with the new Parent/Child Smartapp. There is no reason to change at the moment because there is no difference between the 2 in terms of functionality. This is primarily for new IOS users and fixes the hanging at first time setup. The original SmartApp has been deprecated and moved to the location at the end of this post. I don’t plan any updates any time soon (Awaiting Samsung API confirmations) but if there are any updates they will be to the new parent/child version because it is compliant with how Smartthings recommends we build these types of apps.

Old Hybrid SmartApp - see new multipart smartApp in the 1st post

So it looks like github integration for this app has been broken? Can this be fixed or do we need to manually install/upgrade it?

See post above. Switching to the new smartapp is not necessary since it does not add any functionality. It fixes what the upgraded IOS Smartthings app broke and only affects NEW IOS users. Existing installs should work fine and android users were not affected.

In order to switch to the parent/child smartApps you would need to remove the original smartApp from the ST app and IDE and then install the 2 new smartApps.

For those that prefer the single hybrid app that was removed, it is at the bottom of the previous post as well. Again, this hybrid format is not supported by ST and bugs were introduced a few weeks ago with an IOS app upgrade. Android users were unaffected.