[OBSOLETE] Advanced Button Controller (ABC)

So I love this app.
My favorite part is The clutter reduction.

Previously I used automation director by @Terk which I created many instances of.

Would it be Possible to add in some or all of the things triggers can do to ABC that AD has? Specifically the color bulb control?

I would love to be able to use ABC without having to create a scene, create a routine to trigger that scene, then use ABC to trigger the routine with the button.

And though I know I can set the routine to be trigger by a button in itself, I much prefer to have what each device with buttons controls together like your smart app does than that method.

Basically Iā€™m trying to reduce additional clutter.
But I also know coding isnā€™t nearly every cut and dry, so I know my ask could be a bit much. So Iā€™m also open to advice on how i could marry the coding from the apps myself. I know just enough to get myself in trouble but not enough to be useful. Lol

Unfortunately I completely migrated to Hubitat 6 months ago. I have added a lot of functionality, including color bulb control, for that system. I would love to assist but I no longer have a smartthings system to test with and I have rewritten a significant portion of the code that would make it difficult to port back to ST without testing. If you are fairly proficient with Groovy, you can take a look and adapt to ST as needed.

Well, @stephack, sorry to see you go, but I use this smartapp multiple times daily with my HomeSeer switches. I now have a SmartThings Button that I need to setupā€¦but ABC only sees the single click. Iā€™m going to have to dig in and see if I can add it to your code for double and hold clicks.

If anyone else has done this or there is another option, please let me know!

Making the assumption that nothing has changed in the Smartthings documentation and setup in the past few months:

The issue is not in the code of the ABC app but with implementation of button device handlers in ST. ST only supports button pushed and button held events. What others have done in the past was to edit the device handlers so that double clicks show up as a separate button pushed event. If you have access to the SmartThings Button handler code, you would need to edit it so that double clicks would fire off a button 2 pushed event.

Again, all this assumes that things are the way they were when I left. If ST has implemented double clicked event support then my ABC app would need to be updated to support itā€¦and unfortunately I wonā€™t be able to as I have no way to test it. Feel free to PM me if you decide to give it a shot and Iā€™ll provide what guidance I can.

Stephan

Classic App Documentation - What ABC was coded to work with (only pushed and held):

# reviewed 2018-02-22
name: Button
status: deprecated
attributes:
  button:
    schema:
      type: object
      properties:
        value:
          $ref: ButtonState
      required:
        - value
    type: ENUM
    values:
      - held
      - pushed
  numberOfButtons:
    schema:
      type: object
      properties:
        value:
          $ref: PositiveInteger
      required:
        - value
    type: NUMBER
commands: {
  }
public: true
id: button
ocfResourceType: x.com.st.button
version: 1

New SmartThings App and API - I highly doubt ABC will function with the new app (supports a lot more events):

{
    "id": "button",
    "version": 1,
    "name": "Button",
    "status": "live",
    "attributes": {
        "button": {
            "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                    "value": {
                        "title": "ButtonState",
                        "type": "string",
                        "enum": [
                            "pushed",
                            "held",
                            "double",
                            "pushed_2x",
                            "pushed_3x",
                            "pushed_4x",
                            "pushed_5x",
                            "pushed_6x",
                            "down",
                            "down_2x",
                            "down_3x",
                            "down_4x",
                            "down_5x",
                            "down_6x",
                            "down_hold",
                            "up",
                            "up_2x",
                            "up_3x",
                            "up_4x",
                            "up_5x",
                            "up_6x",
                            "up_hold"
                        ]
                    }
                },
                "required": [
                    "value"
                ]
            }
        },
        "numberOfButtons": {
            "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                    "value": {
                        "title": "PositiveInteger",
                        "type": "integer",
                        "minimum": 0
                    }
                },
                "required": [
                    "value"
                ]
            }
        },
        "supportedButtonValues": {
            "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                    "value": {
                        "type": "array",
                        "items": {
                            "title": "ButtonState",
                            "type": "string",
                            "enum": [
                                "pushed",
                                "held",
                                "double",
                                "pushed_2x",
                                "pushed_3x",
                                "pushed_4x",
                                "pushed_5x",
                                "pushed_6x",
                                "down",
                                "down_2x",
                                "down_3x",
                                "down_4x",
                                "down_5x",
                                "down_6x",
                                "down_hold",
                                "up",
                                "up_2x",
                                "up_3x",
                                "up_4x",
                                "up_5x",
                                "up_6x",
                                "up_hold"
                            ]
                        }
                    }
                }
            }
        }
    },
    "commands": {

    }
}

Thanks for the direction and offer. I thought the button only had held, pushed 1X, and pushed 2Xā€¦your code snippet seems to say there is more clicks.

The code snippets are from ST developer documentation and shows what the Platform supports (not the device itself). So in the first snippet, there is no support for 2x clicks, etc. The second snippet is the documentation for the new app and new API (which ABC does not support). That API supports 2x clicks etc.

With Stephanā€™s permission Iā€™ve picked up the original code and added Color Temperature and Philips Hue Dimmer. You can get it here https://github.com/paulsheldon/SmartThings-PS

Iā€™m happy to do some small changes if needed

1 Like

do i need to remove the old one?

No you should be OK with the ABC manager, you may have to edit the existing code to point to the new repository and add that to list of repos in SmartThings ide if you want to see future updates automatically. paulsheldon/SmartThings-PS.

There is an updated child there too, this should not change the existing child apps, any new will take on new functionality.

1 Like

Hey @Paul_Sheldon - Im looking to control my philips hue flush mount. Id love to use the Lutron Pico and use the center button to change between 3 preset color temps. Also, I have a hue light strip and would like to do the same and use the 3rd button to rotate between a few preset colors (the more the better). Is that what this allows me to do? I know I need to do the extra set up to get the Picos in ST but want to be sure my efforts give me the result I am looking for. Thanks man!

Hi The Lutron Pico should work, I donā€™t have one and the code for this was already in the Smart App.

The color temps give you the option of either +/- temp buy (100-1000K) per press and names them Warm, Warm White, Cool White, Daylight, Cool, Daylight, White dependant on current setting.

I donā€™t have a color changing light so have not got code to look at changing colours yet

1 Like

I came here from Button Contoller + (based on that author suggesting to come to ABC). And I went to Button Controller + because I have a few minimotes that I would like to use in bedrooms to control their ceiling fans. I have the GE Fan controller for each room. I noticed that your smartapp has a section for controlling the fan but its for Low,Medium,High,Off. Would it be possible to add another fan adjust option to be Low,Medium,High with out the Off? I have the family pretty well used to pressing a button on the remote to turn on the device (light, lamp, etc) and holding the button to turn off the device. For me it would be redundant to have an Off option on press as well as Off on hold. Im still very new to SmartThings (switched from Vera ~ 5-6 days ago) I imagine I could modify the code myself but I wouldnt know where to start.

Hi Paul, Iā€™m using your updates and trying to get my Hue Dimmer Switch working with my setup. I have installed your DH, and your fork of the ABC parent/child. When viewing in the logs it shows that I have pressed the button, and says that itā€™s ā€œturning on lampā€ but then nothing actually happens. Iā€™ve tried with varying devices/protocol (Yeelight, LIFX, TP-Link plug) and nothing seems to happen on all of them. Pressing a button in the STSC app turns on the lights/plugs so I know they are working correctly. Is there anything more I can do to try and get the event to actually fire on my hub? or any additional debugging logs that I can look through to see why the event isnā€™t firing properly?

Any help would be appreciated. Cheers

Hi

I can certainly revisit the code and see what I can do. I didnā€™t write the original but I am maintaining the code now.
Can you post a picture of the the controller and list what options you would like each button to do and I will have a look for you.

ABC and my DTH are only tested on the old SmartThings App

Hi,

Iā€™ll take a look and ensure the code is working correctly although Iā€™m using Hue Dimmer switches so should be ok, especially if their working on my DTH too.

Iā€™ll come back to you when I have checked everything out, hopefully by end of weekend.

ABC and my DTH are only tested on the old SmartThings App

#####Please Check####
Can you check that in the setting for the dimer switch the Button Names option is set to use 1,2,3,4 (blue) as this will stop the ABC Controller working if it is unset (grey)

Iā€™ve altered the code to give an option of using off or not using off. The fan will now toggle through 15 /50 & 90% then cycle back to 15% etc.

Simplified codeā€¦
setLevel(15)
setLevel(50)
setLevel(90)
if (fanIgnoreOff)
{ off}
else
{setLevel(15) }

I can send you a copy of the code if you wish to test. You will just have to paste it over the downloaded code in the editor

Problem: Can a command be separated from a button press in abc???
I use smart lighting with a motion detector in my bathroom to turn on a light and then set it to turn off after motion stops.
This same light is a switch with scene control, which Iā€™ve set to turn off all lights with the single button press of the switch. This is very convenient when leaving the bathroom as my Doberman loves turning on all the lights because he can. There are three other lights in the bathroom.
Problem is when the smart lighting detects motion stoped, it tuns off all the lights in the bathroom and not just the single light. Same goes if I turn off the light thru SmartThings app.
Can a command be separated from a button press in abc? So a command would just turn off the light and not turn off all the lights as a button press does?

Can ABC be updated to function properly in the new SmartThings app, works great in classic appā€¦

Is there any alternative to ABC currently? Has it been abandoned? The new Sonos integration ā€˜brokeā€™ the ability to use ABC to control Sonos as the ā€˜Music Playerā€™ feature has been deprecated.

The new commands for Media Playback are apparently not understood by ABC or even webcore at this point.

I have two buttons with 4 functions that no longer work. :frowning:

I was using play/pause, vol up and down and , next track. I have no idea how to accomplish that now with my Zwave buttonsā€¦