Advanced Button Controller (ABC)

Not sure if this has to do with the Discourse upgrade because I haven't changed that link since the app was originally posted. Investigating now.

Very strange. I manually opened the paage on github and recopied the url (which was exactly the same btw) and for some reason discourse is changing the url.

This is the url in my post:
https://github.com/stephack/Hubitat/blob/master/apps/Advanced%20Button%20Controller%20(ABC)/Advanced_Button_Controller.groovy

When clicked it seems to be opening this instead:
https://github.com/stephack/Hubitat/blob/master/apps/Advanced%2520Button%2520Controller%2520(ABC)/Advanced_Button_Controller.groovy

@bobbyD, any thoughts on what changed or how to fix?

EDIT:
I changed the links to BlockQuotes and it seems to work now. Hopefully this isn't an issue with all previously posted weblinks.

@waynespringer79, please try with new links and let me know if you have any issues.

1 Like

Yes it seems to be fine now

1 Like

I am looking at adding some more button control as my wife is not happy to have speak to the Google assistant.

I have a few Hue remotes and I was hoping to be able to do double, triple and quadruple presses, but it seems this is not a thing on Hubitat. Is there a reason for this ?

Most of my lights are on Hue, and I have an app called iConnectHue which can do this, but the problem is that one of the lights I want to control is on a Ikea outlet which is paired to the Hubitat, so I cannot use that app. I could pair that Outlet to Hue directly, but then Hubitat won´t recognize it as the API cannot read Outlets from Hue.. I guess there is no way to win today..

Would it be possible to do multiple presses in ABC by collecting how many presses happen within a set period and then performing them. The resetting that count after a set period ? This is how iConnectHue seems to do it.

Here is a screenshot from iconnect Hue

Anything is possible with the right code :wink:.
Unfortunately that is beyond the scope of my app. Hopefully someone else is willing to create an app that can mimic multiple button presses for you.

1 Like

Check out: [RELEASE] Dimmer Button Controller (configure Pico to emulate Hue Dimmer or any button device to easily control lights)

Note that you can't mash the button five times in a fraction of a second like Hue, so I'd slow it down a bit if you're used to doing that (the app has to fire up with each press and record the number, which takes probably at least a few dozen milliseconds; without the device supporting this, I don't see a good way around that, but I'm guessing most people didn't mash the Hue Dimmer like I did lol ).

1 Like

Ahh yes, I forgot about your app @bertabcd1234. Thanks for chiming in.

@stephack I'm just starting to play with the Symfonisk Sound Controller using this driver. It's one of the smoothest dimmers I've used to date when combined with the linked driver and start/stop raising a dimmer.
Using button 4 (turn right) and button 5 (turn left) of the controller, I'm able to jump +/- 3 in volume of my Symfonisk speaker, but I have to turn, stop, turn, stop, etc.

Would smooth volume control, like smooth dimming be possible? Alternately, is it possible to map a virtual dimmer rise/fall to the volume change?
NM. Just found out the start raising and start lowering doesn't work with a virtual dimmer. :neutral_face:

i.e.
Button 4 start raising volume
Button 6 stop changing volume

Button 5 start lowering volume
Button 6 stop changing volume

Thoughts on also using this with Lutron Aurora? I have one coming today for testing.

This may help you out.

1 Like

Smooth dimming is a function of the driver (changeLevel capability that ties to the zigbee protocol command). It can be mimicked with code but in my experience this has rarely worked right. Look at the issues seen in the ST forum for those who have attempted it. The same goes for recreating doubleTap events for devices that support it. Some have gotten it to work reasonably well when dealing with one specific devices, but when it comes to general device support (like my ABC app) it can wreak havoc. If the driver creator can add button commands that implement a continuous + or - then it will simply work with any BC app.

I will look into adding previous track control to the app..I can't remember why I never added this in the first place.

1 Like

I had a thought to pulse a virtual switch on and off for the increase/decrease, but 500 ms off time is too slow.

Will have to play around later with more tricks to see what’s possible

1 Like

Indeed, this may be a nice alternative :slight_smile: I will take a look. Thanks !

I figured out how to do this with RM. It’s super hacky, but it works. Six rules, but that’s mostly because I don’t know how to do it with less and I had to use ABC for the actual volume changes (explained below). Someone with RM4 prowess could probably figure it out.

I had to add two additional rules, a virtual button and an extra ABC mapping because I couldn't get RM to adjust the volume of the Sonos, but it works fine from your app.

Here's examples for volume down. Similar was created for volume up.





I'm sure you can see the logic, but for clarity...

In the above examples:

  1. Symfonisk sound controller is turned left, button 5 is pressed
  2. Button 5 pressed turns on the virtual switch Sonos volume level DOWN trigger
  3. Sonos volume level DOWN trigger changing evaluates if it is ON and if it is, then it turns on the virtual switch Sonos volume down, if not then it turns Sonos volume down OFF and exits the rule.
  4. Sonos volume down turning ON triggers the second rule to check if Sonos volume level DOWN trigger is ON. If it is ON then the action turns off the virtual switch Sonos volume down, and then runs the actions of the first rule "Sonos volume down start"

The result is the virtual switch Sonos volume down toggles on and off rapidly. This toggling of presses button 2 on a virtual button each time Sonos volume down turns on. The second mapping in ABC changes the volume by -2 each time virtual button 2 is pressed. As soon as you stop turning the dial, the button press 6 is sent from the Symfonisk sound controller, which turns off the virtual switch Sonos volume level DOWN trigger, thus stopping the switch Sonos volume down from toggling on an off rapidly, and therefor the virtual button is no longer being repeatedly pressed, and the volume stop lowering.

Smooth volume control with one continuous motion of the Symfonisk sound controller :grin:

[Update] A warning about the Symfonisk sound controller here. Please read, or you may be pulling your hair out trying to find a mysterious issue that could actually be the result of rogue Zigbee signals from the controller itself.

2 Likes

Nice works Glad you found a solution that works.

2 Likes

**Update 11/05/19 **
ABC Child App updated to v0.2.191105

  • Added Previous Track option for Speakers

PLEASE NOTE: (IF UPDATING FROM v0.2.190210 OR EARLIER)
THIS UPDATE CHANGES A SIGNIFICANT SECTION OF THE CODE. YOU WILL NEED TO OPEN EACH CHILD APP AND CLICK DONE.


@SmartHomePrimer :point_up_2:

3 Likes

Some time ago, someone had requested custom commands.

I was wondering if there was a way to do this yet?

In RM, you can create an action for a custom command, then choose actuator. This gives a list of device with the actuator capability, then a list of actions that the selected device can perform.

Is there any way to do this in ABC?

I truly wish hubitat exposed custom commands in their RM api but as of right now, they do not. I have tried to recreate this functionality, but it required a slight change in the flow of the app. This slight UI change, required a rewrite in many sections of the code. It also required quite a bit of logic to account for the many different command types and variable types (string, numeric, etc). I realized this one feature was making the app unnecessarily complex and bloated and chose not include this functionality in ABC. It's purpose was to simplify the steps needed to setup a button device.

If HE decides to include custom commands in the Rule Machine api, I will gladly try to add this functionality in the future.

Thanks for the quick response Stephack! I completely understand your view and appreciate ABC regardless.

Hi @stephack, all

@stephack - So clever to figure all this out, awesome.

I was stuck but the act of writing this question was enough to figure out my problem. Still posting in case it helps someone else.

Now I can't get events after changing the battery in the controller ....
Update: had to delete device and driver and rediscover with new name.
Then on rediscovery had to "Not" do double discovery recommend by others. If I do then HE fails to see device events......

I was getting this error, but it was becuase my trigger was trying to virtually "push" the physical button on the controller and not the virtual button which I hadn't created.

To flesh out what I had to discover - I was a HE total newby a few days ago.

Install the user driver for the symfonisk (available in these forums).
Install user app for Advanced Button Control Parent and Child apps.

Create 4 virtual switches.
image

Create 1 virtual button - I missed this bit

Create 2 ABC buttons like shown


Note: This is where I went wrong. I was pointing "Sound volume control buttons" at the physical Symfonisk button and not the virtual button. That was causing the error.

Create all 6 Rules 3 for down and 3 for up.

1 Like

@stephack Thanks for this app. I used it in ST and it was great so great to see that you have it here also.
Was wondering if you planned to implement StartLevelChange and StopLevelChange for dimmers? Right now, I'm using an Inovelli red series zwave plus switch to dim a hue light bulb up/down by holding and releasing the paddle. The switch exposes both a hold event and a release event (after the hold) as buttons. As such, I can get the hold to start dimming up/down (StartLevelChange) and the release to stop dimmer (StopLevelChange). However, because your controller doesn't seem to have those attributes, I had to use RuleMachine to make it work. Would be great if I can consolidate all my buttons in your controller though.

Thanks