Hue Dimmer Switch Connected to ST

Hi,

Thats good news! Is it still working?

D

Yes. So far. I was away two days and it still worked. Though the first push wasn’t registered the second did and it flashed green all the time. Is it possible to add held to this dht? And is it correctly supported as 4 buttons?

Mine has been good for 2 days. Are you using the ZHA or ZLL device handler?

I am using the zha by digitalgecko

Using the one in this thread.

So… here is where I am…

It seems to be working, day 2.

All 4 buttons configured with actions via CORE.

Hold action requires a release before it triggers (not sure if that’s normal behaviour for a button hold event?).

I do occasionally see the red light flash and it doesn’t respond but if I press a button a few times it ‘wakes up’ and works again without issues.

How do I add the remote? I can only get it to add as a thing. I added the custom device handler but I can not get it to function as a button.

add it as a thing, then go into the IDE and assign the device handler to the device and update …

Thank you! At first I did not see it in the list so I thought I was doing
it wrong. I deleted and readded the custom handler and it showed up in the
list.

i’m reassigning one of my switches to smartthings right now to try it out. I have drop offs constantly having my switches connected directly to the hue hub. I’d rather put up with the cloud delay than reset the damn things every hour.

I was able to add the remote, but after I set as button trigger then select
the hue remote, it does not let me pick which button. I can only assign
something to button 1. I am using the smart lighting app.

Hi John,

You can configure all 4 buttons (8 really as held/pressed can be configured individually) using CoRE - I’ve had a dimmer connected for about a month now without issue.

In CoRE create a piston like the below:

◦ Button -Hue Dimmer Switch

THEN…
Using Thing to control 1
► SWITCH ({$currentEventDeviceIndex}) DO
► │ CASE ‘1’:
► │ │ Push
► END SWITCH
Using Thing to control 2
► SWITCH ({$currentEventDeviceIndex}) DO
► │ CASE ‘2’:
► │ │ Turn on
► │ CASE ‘3’:
► │ │ Turn off
► END SWITCH

Using Thing to control 3
► SWITCH ({$currentEventDeviceIndex}) DO
► │ CASE ‘4’:
► │ │ Turn off
► END SWITCH

OR IF
◦ Button - Hue Dimmer Switch is held

THEN…
Using Thing to control 4
► SWITCH ({$currentEventDeviceIndex}) DO
► │ CASE ‘2’:
► │ │ ⌂ push1()
► │ CASE ‘3’:
► │ │ ⌂ hold1()
► END SWITCH

1 Like

mine did disconnect already after one day I have tried both handlers again …

Hey Matt,
Can you go into more simple step by step detail on how to get the multiple buttons to work? I can make a piston that does the same thing no matter which button is pressed, but can’t figure out how to make it look for which button is pressed specifically. Thanks!

Hi Tim.

Firstly you will need to make sure Expert Mode in turned on in the CoRE smartapp -

Automation > CoRE > Settings > Toggle Expert Mode.

Once that’s done you can create the piston for the button, the Piston Mode can either be Latching or Or-If - I’ve done mine as Or-If’s but entirely personal choice.

Then Start with the if statement.

IF “Hue Button” is pushed

No the first Then statement.

THEN Using “device you want to control #1” (in my case this is a momentary button that triggers a Hue Scene)

Click First > scroll down to the bottom end of the conditions/triggers and select “Begin SWITCH block”
CoRE will then ask which condition to test, select $currentEventDeviceIndex.

Move on to “and then”
scroll down to the bottom end of the conditions/triggers and select “Begin CASE block”
This will ask for a value - in here put the button number (1,2,3,4)

Move on to “and then”
Select the action to perform on the device (in my case push to activate the scene).

Now:

If the device you are controlling is the same you can add another “Begin CASE block” and specify another number and action, the button numbers do not need to be in any order.

If you are finished with that device move on to and then and select “End SWITCH block”

Repeat above for all pushed buttons on different devices.

NEXT

In CoRE go to the Or If statement and select if “Hue Button” is held.

Repeat the steps for pushed.

Below is a screen shot for one of the buttons - controlling a heater and lighting.

Hope it helps and please ask if i’ve explained it all backwards!!

1 Like

Thank you very much for the detailed explanation. This now makes sense to me. I really appreciate it.

this is great but how would i use buttons 2-4 to control lights in the smart light app? It seems that only button 1 works and it toggles between on and off. I looked at the source code but I didn’t quite see how to expose all the buttons to smart apps

OK since my last post i read more and learned about Core. I love core however I wish I could execute ST routines with it, would help me consolidate a lot of repeated tasks and deduplicate work.

Anyway I’m really happy with this. I have a dimmer beside my bed and I have it rigged up to do some helpful things.

Button 1 = Turn on bedroom light dimmed
Button 2 = Turn on bedroom light full
Button 3 = Beep ST presence sensor keyfob, because I always lose my keys when I wake up
Button 4 = Turn everything in the house off (going to bed now)

For months I’ve been turning off my house using the phone up, such a pain. I’ve always wanted to be able to do this from the dimmer so I’m glad that I can now.

Hi SSShake.

You can control routines from CoRE - in your action block:

rather than a device (Office Bright in the example) select the slider “Using location” in CoRe, then select “Execute routine” - this will pop up a list of your existing routines.


Cheers
Matt

2 Likes

Wow thanks for the screenshots! Got it set up now.

This is actually a lot cleaner since I can just have one switch instead of multiple for each set of devices i want to control

1 Like

Have you contacted internal development about the stability issues? I just converted three switches using this device handler last night and one of them lost connection. I had to tap reset to get it to repair.

I get similar problems with ST’s own presence sensor. I wonder if they just generally have issues with zigbee connected battery powered devices. Although I’ve had no issue with my motion sensor since I bought them. So my hypothesis might be poor.