SmartThings Remote Button Setup

Posted on
Tue Sep 01, 2020 10:52 am
neetorama offline
Posts: 26
Joined: Feb 23, 2016

SmartThings Remote Button Setup

Has anyone had luck integrating a SmartThings Remote Button (GP-U999SJVLEAA)?

I've been able to setup the device and pull the various reported states, though I'm having trouble capturing button presses which are reported as "action". The device supports "single", "double", and "hold" button states.

Image

I've had some luck setting up the device as a Generic JSON Device. However no luck capturing "action". I also receive the following error:
Code: Select all
   MQTT Shims Debug                MQTT: Laundry Button: JSON decode error for state_location = payload, aborting


Full Generic JSON Device log:
Code: Select all
Sep 1, 2020 at 11:32:35 AM
   MQTT Connector Debug            Received PUBLISH (d0, q0, r0, m0), 'zigbee2mqtt/laundry_wash_button', ...  (84 bytes)
   MQTT Connector Threaddebug      MQTT: Topic Subscriptions - Mosquitto: Message received: zigbee2mqtt/laundry_wash_button, payload: {"linkquality":76,"temperature":25.27,"battery":94,"voltage":2800,"action":"single"}
   MQTT Connector Debug            MQTT: Topic Subscriptions - Mosquitto: Message received: zigbee2mqtt/laundry_wash_button, payload: {"linkquality":76,"temperature":25.27,"battery":94,"voltage":2800,"action":"single"}
   MQTT Connector Threaddebug      MQTT: Topic Subscriptions - Mosquitto: Saved states, topic: zigbee2mqtt/laundry_wash_button, payload: {"linkquality":76,"temperature":25.27,"battery":94,"voltage":2800,"action":"single"}
   MQTT Connector Threaddebug      MQTT: Topic Subscriptions - Mosquitto: queueLastMessage, queue = ##washButton## (1)
   Trigger                         MQTT Topic Monitor: Laundry Button
   MQTT Connector Debug            Received PUBLISH (d0, q0, r0, m0), 'zigbee2mqtt/laundry_wash_button', ...  (78 bytes)
   MQTT Shims Debug                received notification of MQTT message type ##washButton## from MQTT: Topic Subscriptions - Mosquitto
   MQTT Connector Threaddebug      MQTT: Topic Subscriptions - Mosquitto: Message received: zigbee2mqtt/laundry_wash_button, payload: {"linkquality":76,"temperature":25.27,"battery":94,"voltage":2800,"action":""}
   MQTT Connector Debug            MQTT: Topic Subscriptions - Mosquitto: Message received: zigbee2mqtt/laundry_wash_button, payload: {"linkquality":76,"temperature":25.27,"battery":94,"voltage":2800,"action":""}
   MQTT Connector Threaddebug      MQTT: Topic Subscriptions - Mosquitto: Saved states, topic: zigbee2mqtt/laundry_wash_button, payload: {"linkquality":76,"temperature":25.27,"battery":94,"voltage":2800,"action":""}
   MQTT Connector Threaddebug      MQTT: Topic Subscriptions - Mosquitto: queueLastMessage, queue = ##washButton## (2)
   Trigger                         MQTT Topic Monitor: Laundry Button
   MQTT Connector Debug            Received PUBLISH (d0, q0, r0, m0), 'zigbee2mqtt/laundry_wash_button/action', ...  (6 bytes)
   MQTT Shims Debug                received notification of MQTT message type ##washButton## from MQTT: Topic Subscriptions - Mosquitto
   MQTT Connector Threaddebug      MQTT: Topic Subscriptions - Mosquitto: Message received: zigbee2mqtt/laundry_wash_button/action, payload: single
   MQTT Connector Debug            MQTT: Topic Subscriptions - Mosquitto: Message received: zigbee2mqtt/laundry_wash_button/action, payload: single
   MQTT Connector Threaddebug      MQTT: Topic Subscriptions - Mosquitto: Saved states, topic: zigbee2mqtt/laundry_wash_button/action, payload: single
   MQTT Connector Threaddebug      MQTT: Topic Subscriptions - Mosquitto: queueLastMessage, queue = ##washButton## (3)
   Trigger                         MQTT Topic Monitor: Laundry Button
   MQTT Shims Debug                received notification of MQTT message type ##washButton## from MQTT: Topic Subscriptions - Mosquitto
   MQTT Connector Threaddebug      MQTT: Topic Subscriptions - Mosquitto: fetchQueuedMessageAction, queue = ##washButton## (3)
   MQTT Shims Debug                MQTT: Laundry Button: processMessages: '##washButton##' zigbee2mqtt/laundry_wash_button -> {"linkquality":76,"temperature":25.27,"battery":94,"voltage":2800,"action":"single"}
   MQTT Shims Threaddebug          MQTT: Laundry Button: update topic message_address = laundry_wash_button
   MQTT Shims Threaddebug          MQTT: Laundry Button: update state_location_payload, key = action
   MQTT Shims Threaddebug          recurseDict key_string = battery, data_dict= {u'linkquality': 76, u'battery': 94, u'temperature': 25.27, u'action': u'single', u'voltage': 2800}
   MQTT Shims Threaddebug          MQTT: Laundry Button: update state_dict_payload_key, key = .
   MQTT Shims Threaddebug          recurseDict key_string = ., data_dict= {u'linkquality': 76, u'battery': 94, u'temperature': 25.27, u'action': u'single', u'voltage': 2800}
   MQTT Shims Threaddebug          MQTT: Laundry Button: update, new states_list: Item : (list)
     Item : linkquality (string)
     Item : battery (string)
     Item : temperature (string)
     Item : action (string)
     Item : voltage (string)
   MQTT Shims Threaddebug          MQTT: Laundry Button: getDeviceStateList returning: States : (list)
     Item : (dict)
          Disabled : false (bool)
          Key : linkquality (string)
          StateLabel : linkquality (string)
          TriggerLabel : linkquality (string)
          Type : 150 (integer)
     Item : (dict)
          Disabled : false (bool)
          Key : battery (string)
          StateLabel : battery (string)
          TriggerLabel : battery (string)
          Type : 150 (integer)
     Item : (dict)
          Disabled : false (bool)
          Key : temperature (string)
          StateLabel : temperature (string)
          TriggerLabel : temperature (string)
          Type : 150 (integer)
     Item : (dict)
          Disabled : false (bool)
          Key : action (string)
          StateLabel : action (string)
          TriggerLabel : action (string)
          Type : 150 (integer)
     Item : (dict)
          Disabled : false (bool)
          Key : voltage (string)
          StateLabel : voltage (string)
          TriggerLabel : voltage (string)
          Type : 150 (integer)
   MQTT Connector Threaddebug      MQTT: Laundry Button: deviceUpdated: doExcludes = False, listedDevice = False
   MQTT Connector Threaddebug      MQTT: Laundry Button: deviceUpdated: id = 1543447819, devList = published_devices : (list)
   MQTT Connector Threaddebug      MQTT: Laundry Button: deviceUpdated: doExcludes = False, listedDevice = False
   MQTT Connector Threaddebug      MQTT: Laundry Button: deviceUpdated: id = 1543447819, devList = published_devices : (list)
   MQTT Connector Threaddebug      MQTT: Laundry Button: deviceUpdated: doExcludes = False, listedDevice = False
   MQTT Connector Threaddebug      MQTT: Laundry Button: deviceUpdated: id = 1543447819, devList = published_devices : (list)
   MQTT Connector Threaddebug      MQTT: Topic Subscriptions - Mosquitto: fetchQueuedMessageAction, queue = ##washButton## (2)
   MQTT Shims Debug                MQTT: Laundry Button: processMessages: '##washButton##' zigbee2mqtt/laundry_wash_button -> {"linkquality":76,"temperature":25.27,"battery":94,"voltage":2800,"action":""}
   MQTT Shims Threaddebug          MQTT: Laundry Button: update topic message_address = laundry_wash_button
   MQTT Shims Threaddebug          MQTT: Laundry Button: update state_location_payload, key = action
   MQTT Shims Threaddebug          recurseDict key_string = battery, data_dict= {u'linkquality': 76, u'battery': 94, u'temperature': 25.27, u'action': u'', u'voltage': 2800}
   MQTT Shims Threaddebug          MQTT: Laundry Button: update state_dict_payload_key, key = .
   MQTT Shims Threaddebug          recurseDict key_string = ., data_dict= {u'linkquality': 76, u'battery': 94, u'temperature': 25.27, u'action': u'', u'voltage': 2800}
   MQTT Shims Threaddebug          MQTT: Laundry Button: update, new states_list: Item : (list)
     Item : linkquality (string)
     Item : battery (string)
     Item : temperature (string)
     Item : action (string)
     Item : voltage (string)
   MQTT Shims Threaddebug          MQTT: Laundry Button: getDeviceStateList returning: States : (list)
     Item : (dict)
          Disabled : false (bool)
          Key : linkquality (string)
          StateLabel : linkquality (string)
          TriggerLabel : linkquality (string)
          Type : 150 (integer)
     Item : (dict)
          Disabled : false (bool)
          Key : battery (string)
          StateLabel : battery (string)
          TriggerLabel : battery (string)
          Type : 150 (integer)
     Item : (dict)
          Disabled : false (bool)
          Key : temperature (string)
          StateLabel : temperature (string)
          TriggerLabel : temperature (string)
          Type : 150 (integer)
     Item : (dict)
          Disabled : false (bool)
          Key : action (string)
          StateLabel : action (string)
          TriggerLabel : action (string)
          Type : 150 (integer)
     Item : (dict)
          Disabled : false (bool)
          Key : voltage (string)
          StateLabel : voltage (string)
          TriggerLabel : voltage (string)
          Type : 150 (integer)
   MQTT Connector Threaddebug      MQTT: Laundry Button: deviceUpdated: doExcludes = False, listedDevice = False
   MQTT Connector Threaddebug      MQTT: Laundry Button: deviceUpdated: id = 1543447819, devList = published_devices : (list)
   MQTT Connector Threaddebug      MQTT: Laundry Button: deviceUpdated: doExcludes = False, listedDevice = False
   MQTT Connector Threaddebug      MQTT: Laundry Button: deviceUpdated: id = 1543447819, devList = published_devices : (list)
   MQTT Connector Threaddebug      MQTT: Laundry Button: deviceUpdated: doExcludes = False, listedDevice = False
   MQTT Connector Threaddebug      MQTT: Laundry Button: deviceUpdated: id = 1543447819, devList = published_devices : (list)
   MQTT Connector Threaddebug      MQTT: Topic Subscriptions - Mosquitto: fetchQueuedMessageAction, queue = ##washButton## (1)
   MQTT Shims Debug                MQTT: Laundry Button: processMessages: '##washButton##' zigbee2mqtt/laundry_wash_button/action -> single
   MQTT Shims Threaddebug          MQTT: Laundry Button: update topic message_address = laundry_wash_button
   MQTT Shims Debug                MQTT: Laundry Button: JSON decode error for state_location = payload, aborting

Generic JSON Device setup:
Image

The shims device captures the button press when setup as an On/Off Sensor Device. In the image below, I have On Value set as "single". A single press of the button turns the device on as indicated by the green circle. "Double" and "Hold" actions toggle the device off, indicated by greyed out circle.

It seems as though the button press is reported for a fraction of a second before "action" returns to an empty value, but I can't capture the reported state with a trigger. I also receive the following error:
Code: Select all
   Error                           device "MQTT: Laundry Button - on/off device" state key onOffState not defined (ignoring update request)

Setup as On/Off Sensor Device:
Image

Trigger:
Image

Broker Subscriptions:
Image

Topic Component Match:
Image

Any help would be much appreciated!

Posted on
Tue Sep 01, 2020 11:22 am
FlyingDiver offline
User avatar
Posts: 7217
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: SmartThings Remote Button Setup

That's not going to work because the action is it's own topic. It's not a payload in the main topic. A "single" button press is actually sending:

Topic: zigbee2mqtt/laundry_wash_button/action
Payload: single

But I would not try to use a Shim device for this. I would just use an Event trigger based on the MQTT Connector device "MQTT Connector Event" event. Use the "Topic Component Match" event.

Then set the condition on the event to the payload you're trying to match. Use the device state conditional.
Attachments
Screen Shot 2020-09-01 at 1.06.35 PM.png
Screen Shot 2020-09-01 at 1.06.35 PM.png (155.31 KiB) Viewed 1350 times
Screen Shot 2020-09-01 at 1.06.29 PM.png
Screen Shot 2020-09-01 at 1.06.29 PM.png (406.11 KiB) Viewed 1350 times

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Wed Sep 02, 2020 7:51 pm
neetorama offline
Posts: 26
Joined: Feb 23, 2016

Re: SmartThings Remote Button Setup

Thanks so much for the help!

Quick question. Would you mind sharing the logic behind the topic match string?

What’s the purpose of including End before the final Match? Why use an empty Match instead of a wildcard Amy?

Posted on
Wed Sep 02, 2020 7:53 pm
FlyingDiver offline
User avatar
Posts: 7217
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: SmartThings Remote Button Setup

neetorama wrote:
Thanks so much for the help!

Quick question. Would you mind sharing the logic behind the topic match string?

What’s the purpose of including End before the final Match? Why use an empty Match instead of a wildcard Amy?


That last Match should not be there. I must have hit the button twice by mistake.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Sun Sep 13, 2020 12:42 am
koensayr offline
Posts: 90
Joined: Jul 10, 2013

Re: SmartThings Remote Button Setup

Curious question. How are you getting the MQTT messages out of the SmartThings Hub? This would be a huge mystery solved for me

Posted on
Sun Sep 13, 2020 5:33 am
FlyingDiver offline
User avatar
Posts: 7217
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: SmartThings Remote Button Setup

koensayr wrote:
Curious question. How are you getting the MQTT messages out of the SmartThings Hub? This would be a huge mystery solved for me


He's not using a SmartThings Hub. He's using a Zigbee transceiver attached to a computer, using the zigbee2mqtt software.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Sun Sep 13, 2020 8:16 pm
koensayr offline
Posts: 90
Joined: Jul 10, 2013

Re: SmartThings Remote Button Setup

Ugh okay. Thought maybe I had found some help :)

Sorry for the noise

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 2 guests