Samsung Smartthings Buttons

does it show up as an entity?

1 Like

Yeah it shows up as zha.samjin_button with the state as online and the following attributes:

{
  "nwk": "0xe957",
  "ieee": "28:6d:97:00:01:04:c0:96",
  "lqi": 231,
  "rssi": -62,
  "battery_level": 68,
  "friendly_name": "Samjin Button"
}

do any of the states change when you press the button? If so, you may need to create a sensor using templates so you can map those values to something more meaningful like on and off or pressed and idle

1 Like

Bingo, duh. It looks like it created a binary sensor for the press, and it’s also picking up the built in temperature sensor!

samjin

Nice…how much were those?

I use the Xiaomi ones with my Samsung Smartthings. Its a major pain to pair, although I have pretty much got it down,and can do it in under 5 minutes.

1 Like

$15 a pop on amazon.

Once I got the Conbee firmware updated it paired instantly with a paperclip to the reset button.

But does it reset the state? Last time I paired it, it just stayed on the whole time.

You shouldn’t need to reset the state. Instead, you should read the command off the zha_event data. If you’re interested, I have written an AppDaemon app that allows actions to be defined for tap, hold, and double:

Thanks for the heads up on the AppDaemon script. I really need to look into AppDaemon.

I have however found out about the zha_event a day or so after that post. That has allowed me to use the button flawlessly.

I just don’t honestly know where to find zha_event data for other devices other than looking at the specific device code from zigpy. Any ideas there?

My method is to use the Events developer tool (hassio.local/dev-event). Starting within the last couple versions, you can use that view to temporarily listen for an event and get the data for each event. So, go in there, put zha_event as your event to subscribe to, and click Start Listening. Then, carry out your actions on your devices and take note of the data that shows up in the developer tool.

1 Like

Awesome. Thanks for that. Didn’t know that was there but will make life easier.

So many parts to HA that sometimes it’s hard to keep track.

FYI: I just posted a walkthrough on how I got the samsung buttons working:

How did you pair the SmartThings button to conbee?

I have mine updated to latest firmware and I cant get it to pair. I was to pair the door sensor but the button is no go. Any suggestions?

I have a SmartThings button enrolled in Phoscon/DeConz. Under HA integrations, it found the deConz gateway, and it sees the button, but the only two entities in HA are the battery level and the temperature. How do I get HA to see the actual button press entity?

1 Like

I just bought one of these. When I paired it, it works for one or two button presses and then stops. If I remove and re-add it, it works again for a couple of presses, then stops…

I had the same problem with the smartthings hub, I had to repair it every-time after less than a day. Apparently it goes to sleep to save battery, mine was a heavy sleeper. I sent it back eventually.

I’m having the same problem. Did you ever resolve this?

read the previous comments in this thread about zha_event and the walkthrough about how to use that to listen to button events

In case anyone is an appdaemon user, I wrote the following to handle all of my Smartthings buttons in lieu of the Node Red setup. Just drop the .py in your apps folder and add the configuration to app.yaml. You can redefine new sections for as many buttons as you have (so change “guest_room_button” below in a second entry).

To setup:

  1. Pair your button with zha
  2. Listen for zha_event under Developer Tools (as described above) and note your device_ieee
  3. Plug that in for device below.
  4. List the entity you want (only devices supported by toggle work…probably just switches and lights.) You can probably control multiple entities by separating them by a comma, but I haven’t tried it.

zigbee_buttons.py:

import appdaemon.plugins.hass.hassapi as hass

class button_events(hass.Hass):

    def initialize(self):
        device = self.args["device"]
        self.listen_event(self.button_events, "zha_event", device_ieee = device)

    def button_events(self, entity, data, kwargs):
      command = data['command']
      self.toggle(self.args[command])

apps.yaml:

guest_room_button:
  module: zigbee_buttons
  class: button_events
  device: 28:6d:97:00:01:09:9c:e1
  button_single: light.guest_room_lamps
  button_double: light.guest_room_recessed_lights
  button_hold: light.basement_hallway

(Should anyone ever find this that isn’t using the Smarthings button, this will work withy any zigbee button if you modify the “button_single” etc. to match the name of the command being sent when you listen to zha_event.)