Hi. Apologies for this noob question, but I’m having trouble following some of the advice on the forum ( … because I’m a noob with HASS).
I’m trying to get the SmartThings button to work. I’ve been following some of the advice … but I’m not sure if I’ve done things correctly. I haven’t been able to get the button to work through HASS. I’m using it through my SmartThings hub (… same for pretty much all my zigbee devices)
Now I’ve assumed the device_ieee is the zigbee ID. Is this correct?
Is there anything I’m missing from the script?
Is there anything else I need to add to my config?
Since it sounds like you are using the button via the SmartThings Integration, and not via a Zigbee USB stick, you’ll want to the the event_type of smartthings.button instead of zha_event. Instead of a command field, you’ll define a value of pushed, held, or double, and instead of the device_ieee you can use the friendly name of the button from SmartThings.
That didn’t work, but the problem seems to have been that I had the wrong event_type. Having an event_type of smartthings.button seems to have done the trick. It’s all working now.
No worries. That pointed out now, I realise how I misread the documentation. Now that that’s been clarified, it’ll help me in the future. It’s a steep learning curve, but I’m getting the hang of it.
Hi guys, I’m kinda new at this, but having troubles with my Aqara buttons via SmartThings. I can set up a NodeRed flow to turn a light on and off with an Aqara door reed switch fine. The button shows as per the image below in HA, but the only sensor is the battery. Is this normal? Or is something wrong with the device handler in ST. Should I reinstall?
I have some events coming through intermittently from the Aqara buttons when I tell it to listen to smartthings.button as below. It only works like 1 in 10 times though.
ignore, got it working.
i had to find the unique id which was buried inside: \config.storage\core.entity.registry (find the “button” and look for the id there, mine was for a button temp sensor))
Just for future reference, if you use name instead of device_id in your automations, you can use the friendly name of the button.
You can also get the details on the button’s data if you go to Developer Tools, and then Events, and put in smartthings.button as your event to subscribe to. Click start listening, then press your button, and all of the data the event data that gets passed to Home Assistant will display there.
hey,
good tip - however how do i apply this sorry?
im not sure what the friendly name of hte button is however, as i dont see the button on its own?
as a temp/battery sensor?
It should be whatever you named it in SmartThings, i.e. “Living Room” in your case it looks like (caveat: it’s been awhile since I’ve used the SmartThings integration as I have since switched to ZHA, but I believe that’s how it worked). But if you want to be sure, you can always go through the Developer Tools process I outlined to get the name that way.
I got single click to work but no double ( using Smartthings )
I can see that in Smartthings event log Button 1 ja Button 2 ( single and double click ) works ok.
Code is here and tried exactly same code, just changed pushed and double.
What could be reason ?
however i dont use that anymore, as ive moved over to a ConBee2, thats a load better overall
with that i just listen to teh deconz event and press a button, it will then give all the info you need
I haven’t seen a 100% guide on here for getting the button press event working with a SmartThings Hub. I was able to get this working tonight and figured I’d let others know how to do it as well.
My example triggers a smart switch when I press the SmartThings Button
Identify the “Data Payload” for your button, this will look something like this:
More documentation on this payload can be found here
To get this payload for your button you’ll need to enable debug logging for the smartthings integration by adding the following to your configuration.yaml and restarting Home Assistant:
logger:
default: info
logs:
homeassistant.components.smartthings: debug
Link to documentation for this as well
Once you’ve got debug logging enabled, head over to “Configuration > Logs > Load Full Home Assistant Log” Then press your smartthings button and refresh the logs. You should see an entry like this: DEBUG (MainThread) [homeassistant.components.smartthings] Fired button event: {'component_id': 'main', 'device_id': 'your-data-here', 'location_id': 'your-data-here', 'value': 'pushed', 'name': 'Button 1', 'data': {}}
Your “Data Payload” is that entire json blob.
The “Event type” is smartthings.button
When you put it all together you get a trigger for your automation that looks like this:
You win! I could not get this to work. I tried to follow everyone else but this is what finally allowed me to get the stupid button to work. Thanks!
*NB - You can just go to Developer tools > Events > Enter smartthings.button into the “Events to subscribe to” field > Click Start Listening > Press button.
This will get you the information without having to do all that debugging stuff.
Thanks very much to the last two posters.
This needed to be bumped. It is the only thread with the answer to configuring ST buttons using the ST hub, and should definitely be in a HS wiki somewhere.