Stumped -- Dimming Piston


#1

1) Give a description of the problem
The piston is dimming about once every 10 seconds instead of once per second as expected.

2) What is the expected behavior?
Dim once per second

3) What is happening/not happening?
In the course of a second, the piston lowers the level 6 times.

**4) Post a Green Snapshot of the piston!

**5) Attach any logs
The logs below are for the dimming down section, but the same thing happens on the dim up section.

============device log =========
See! I pressed if for almost EXACTLY a second…

2019-03-03 8:38:15.675 PM EST
moments ago
DEVICE button holdRelease Button - Kitchen Near Hall button 2 was released

2019-03-03 8:38:14.704 PM EST
moments ago
DEVICE button held Button - Kitchen Near Hall button 2 was held

================================================
hub logs

e9c29a48-bb89-48a0-b89c-b26e68f0671b 8:38:22 PM: info smartapp_pause called by smartAppName=webCoRE Piston, value=1000, smartAppVersionId=fea44870-29d5-4244-b572-eca5eee7acd9

e9c29a48-bb89-48a0-b89c-b26e68f0671b 8:38:20 PM: info smartapp_pause called by smartAppName=webCoRE Piston, value=1000, smartAppVersionId=fea44870-29d5-4244-b572-eca5eee7acd9

e9c29a48-bb89-48a0-b89c-b26e68f0671b 8:38:19 PM: info smartapp_pause called by smartAppName=webCoRE Piston, value=1000, smartAppVersionId=fea44870-29d5-4244-b572-eca5eee7acd9

e9c29a48-bb89-48a0-b89c-b26e68f0671b 8:38:17 PM: info smartapp_pause called by smartAppName=webCoRE Piston, value=1000, smartAppVersionId=fea44870-29d5-4244-b572-eca5eee7acd9

e9c29a48-bb89-48a0-b89c-b26e68f0671b 8:38:16 PM: info smartapp_pause called by smartAppName=webCoRE Piston, value=1000, smartAppVersionId=fea44870-29d5-4244-b572-eca5eee7acd9

2e6dc67c-acc8-4cb0-bb50-db30f2f44813 8:38:24 PM: info postEventToEndpoint: event successfully posted.

2e6dc67c-acc8-4cb0-bb50-db30f2f44813 8:38:24 PM: debug Property Change Event level: 40 (source: DEVICE)

2e6dc67c-acc8-4cb0-bb50-db30f2f44813 8:38:24 PM: info postEventToEndpoint: event successfully posted.

2e6dc67c-acc8-4cb0-bb50-db30f2f44813 8:38:23 PM: debug Property Change Event level: 40 (source: DEVICE)

2e6dc67c-acc8-4cb0-bb50-db30f2f44813 8:38:24 PM: info postEventToEndpoint: event successfully posted.

2e6dc67c-acc8-4cb0-bb50-db30f2f44813 8:38:23 PM: debug Property Change Event level: 40 (source: DEVICE)

28325be8-0bdd-446f-8be6-1cfce0adc37c 8:38:24 PM: debug refresh()

07ad10cc-9b84-48f7-92ad-79f53f8c0321 8:38:23 PM: debug refresh()

d46c153f-cc8e-48bd-b1ac-733cc687e781 8:38:23 PM: debug refresh()

8e108903-ac56-4921-a5ff-bf89d9af65e5 8:38:23 PM: debug refresh()

b841ef45-4c99-49be-8172-44192bb60b9f 8:38:23 PM: debug refresh()

28325be8-0bdd-446f-8be6-1cfce0adc37c 8:38:23 PM: debug refresh()

07ad10cc-9b84-48f7-92ad-79f53f8c0321 8:38:23 PM: debug refresh()

d46c153f-cc8e-48bd-b1ac-733cc687e781 8:38:23 PM: debug refresh()

8e108903-ac56-4921-a5ff-bf89d9af65e5 8:38:23 PM: debug refresh()

e56b713b-d773-4c5e-b51c-8819ab6ce7af 8:38:23 PM: debug refresh()

b841ef45-4c99-49be-8172-44192bb60b9f 8:38:23 PM: debug refresh()

2e6dc67c-acc8-4cb0-bb50-db30f2f44813 8:38:23 PM: info postEventToEndpoint: event successfully posted.

2e6dc67c-acc8-4cb0-bb50-db30f2f44813 8:38:23 PM: debug Property Change Event level: 50 (source: DEVICE)

2e6dc67c-acc8-4cb0-bb50-db30f2f44813 8:38:23 PM: info postEventToEndpoint: event successfully posted.

2e6dc67c-acc8-4cb0-bb50-db30f2f44813 8:38:23 PM: debug Property Change Event level: 50 (source: DEVICE)

2e6dc67c-acc8-4cb0-bb50-db30f2f44813 8:38:23 PM: info postEventToEndpoint: event successfully posted.

2e6dc67c-acc8-4cb0-bb50-db30f2f44813 8:38:23 PM: debug Property Change Event level: 50 (source: DEVICE)

2e6dc67c-acc8-4cb0-bb50-db30f2f44813 8:38:22 PM: info postEventToEndpoint: event successfully posted.

2e6dc67c-acc8-4cb0-bb50-db30f2f44813 8:38:22 PM: debug Property Change Event level: 60 (source: DEVICE)

2e6dc67c-acc8-4cb0-bb50-db30f2f44813 8:38:22 PM: info postEventToEndpoint: event successfully posted.

2e6dc67c-acc8-4cb0-bb50-db30f2f44813 8:38:22 PM: debug Property Change Event level: 50 (source: DEVICE)

2e6dc67c-acc8-4cb0-bb50-db30f2f44813 8:38:22 PM: info postEventToEndpoint: event successfully posted.

2e6dc67c-acc8-4cb0-bb50-db30f2f44813 8:38:22 PM: debug Property Change Event level: 50 (source: DEVICE)

2e6dc67c-acc8-4cb0-bb50-db30f2f44813 8:38:22 PM: info postEventToEndpoint: event successfully posted.

2e6dc67c-acc8-4cb0-bb50-db30f2f44813 8:38:22 PM: debug Property Change Event level: 50 (source: DEVICE)

2e6dc67c-acc8-4cb0-bb50-db30f2f44813 8:38:22 PM: info postEventToEndpoint: event successfully posted.

2e6dc67c-acc8-4cb0-bb50-db30f2f44813 8:38:22 PM: debug Property Change Event level: 50 (source: DEVICE)

28325be8-0bdd-446f-8be6-1cfce0adc37c 8:38:22 PM: debug refresh()

07ad10cc-9b84-48f7-92ad-79f53f8c0321 8:38:22 PM: debug refresh()

d46c153f-cc8e-48bd-b1ac-733cc687e781 8:38:22 PM: debug refresh()

8e108903-ac56-4921-a5ff-bf89d9af65e5 8:38:22 PM: debug refresh()

e56b713b-d773-4c5e-b51c-8819ab6ce7af 8:38:22 PM: debug refresh()

28325be8-0bdd-446f-8be6-1cfce0adc37c 8:38:22 PM: debug refresh()

d46c153f-cc8e-48bd-b1ac-733cc687e781 8:38:22 PM: debug refresh()

8e108903-ac56-4921-a5ff-bf89d9af65e5 8:38:22 PM: debug refresh()

e56b713b-d773-4c5e-b51c-8819ab6ce7af 8:38:22 PM: debug refresh()

b841ef45-4c99-49be-8172-44192bb60b9f 8:38:22 PM: debug refresh()

2e6dc67c-acc8-4cb0-bb50-db30f2f44813 8:38:21 PM: info postEventToEndpoint: event successfully posted.

2e6dc67c-acc8-4cb0-bb50-db30f2f44813 8:38:20 PM: debug Property Change Event level: 60 (source: DEVICE)

2e6dc67c-acc8-4cb0-bb50-db30f2f44813 8:38:21 PM: info postEventToEndpoint: event successfully posted.

2e6dc67c-acc8-4cb0-bb50-db30f2f44813 8:38:20 PM: debug Property Change Event level: 70 (source: DEVICE)

2e6dc67c-acc8-4cb0-bb50-db30f2f44813 8:38:21 PM: info postEventToEndpoint: event successfully posted.

2e6dc67c-acc8-4cb0-bb50-db30f2f44813 8:38:20 PM: debug Property Change Event level: 60 (source: DEVICE)

2e6dc67c-acc8-4cb0-bb50-db30f2f44813 8:38:21 PM: info postEventToEndpoint: event successfully posted.

2e6dc67c-acc8-4cb0-bb50-db30f2f44813 8:38:20 PM: debug Property Change Event level: 60 (source: DEVICE)

2e6dc67c-acc8-4cb0-bb50-db30f2f44813 8:38:21 PM: info postEventToEndpoint: event successfully posted.

2e6dc67c-acc8-4cb0-bb50-db30f2f44813 8:38:20 PM: debug Property Change Event level: 60 (source: DEVICE)

2e6dc67c-acc8-4cb0-bb50-db30f2f44813 8:38:21 PM: info postEventToEndpoint: event successfully posted.

2e6dc67c-acc8-4cb0-bb50-db30f2f44813 8:38:20 PM: debug Property Change Event level: 70 (source: DEVICE)

2e6dc67c-acc8-4cb0-bb50-db30f2f44813 8:38:21 PM: info postEventToEndpoint: event successfully posted.

2e6dc67c-acc8-4cb0-bb50-db30f2f44813 8:38:20 PM: debug Property Change Event level: 60 (source: DEVICE)

07ad10cc-9b84-48f7-92ad-79f53f8c0321 8:38:20 PM: debug refresh()

d46c153f-cc8e-48bd-b1ac-733cc687e781 8:38:20 PM: debug refresh()

2e6dc67c-acc8-4cb0-bb50-db30f2f44813 8:38:20 PM: info postEventToEndpoint: event successfully posted.

2e6dc67c-acc8-4cb0-bb50-db30f2f44813 8:38:20 PM: debug Property Change Event level: 60 (source: DEVICE)

8e108903-ac56-4921-a5ff-bf89d9af65e5 8:38:20 PM: debug refresh()

2e6dc67c-acc8-4cb0-bb50-db30f2f44813 8:38:20 PM: info postEventToEndpoint: event successfully posted.

2e6dc67c-acc8-4cb0-bb50-db30f2f44813 8:38:20 PM: debug Property Change Event level: 60 (source: DEVICE)

2e6dc67c-acc8-4cb0-bb50-db30f2f44813 8:38:20 PM: info postEventToEndpoint: event successfully posted.

2e6dc67c-acc8-4cb0-bb50-db30f2f44813 8:38:20 PM: debug Property Change Event level: 80 (source: DEVICE)

e56b713b-d773-4c5e-b51c-8819ab6ce7af 8:38:20 PM: debug refresh()

b841ef45-4c99-49be-8172-44192bb60b9f 8:38:20 PM: debug refresh()

28325be8-0bdd-446f-8be6-1cfce0adc37c 8:38:20 PM: debug refresh()

07ad10cc-9b84-48f7-92ad-79f53f8c0321 8:38:20 PM: debug refresh()

d46c153f-cc8e-48bd-b1ac-733cc687e781 8:38:20 PM: debug refresh()

8e108903-ac56-4921-a5ff-bf89d9af65e5 8:38:20 PM: debug refresh()

e56b713b-d773-4c5e-b51c-8819ab6ce7af 8:38:20 PM: debug refresh()

b841ef45-4c99-49be-8172-44192bb60b9f 8:38:20 PM: debug refresh()

2e6dc67c-acc8-4cb0-bb50-db30f2f44813 8:38:19 PM: info postEventToEndpoint: event successfully posted.

2e6dc67c-acc8-4cb0-bb50-db30f2f44813 8:38:19 PM: debug Property Change Event level: 70 (source: DEVICE)

2e6dc67c-acc8-4cb0-bb50-db30f2f44813 8:38:19 PM: info postEventToEndpoint: event successfully posted.

2e6dc67c-acc8-4cb0-bb50-db30f2f44813 8:38:19 PM: debug Property Change Event level: 70 (source: DEVICE)

2e6dc67c-acc8-4cb0-bb50-db30f2f44813 8:38:19 PM: info postEventToEndpoint: event successfully posted.

2e6dc67c-acc8-4cb0-bb50-db30f2f44813 8:38:19 PM: debug Property Change Event level: 70 (source: DEVICE)

2e6dc67c-acc8-4cb0-bb50-db30f2f44813 8:38:19 PM: info postEventToEndpoint: event successfully posted.

2e6dc67c-acc8-4cb0-bb50-db30f2f44813 8:38:19 PM: debug Property Change Event level: 70 (source: DEVICE)

2e6dc67c-acc8-4cb0-bb50-db30f2f44813 8:38:19 PM: info postEventToEndpoint: event successfully posted.

2e6dc67c-acc8-4cb0-bb50-db30f2f44813 8:38:19 PM: debug Property Change Event level: 70 (source: DEVICE)

28325be8-0bdd-446f-8be6-1cfce0adc37c 8:38:19 PM: debug refresh()

07ad10cc-9b84-48f7-92ad-79f53f8c0321 8:38:19 PM: debug refresh()

d46c153f-cc8e-48bd-b1ac-733cc687e781 8:38:19 PM: debug refresh()

8e108903-ac56-4921-a5ff-bf89d9af65e5 8:38:19 PM: debug refresh()

e56b713b-d773-4c5e-b51c-8819ab6ce7af 8:38:19 PM: debug refresh()

b841ef45-4c99-49be-8172-44192bb60b9f 8:38:19 PM: debug refresh()

28325be8-0bdd-446f-8be6-1cfce0adc37c 8:38:18 PM: debug refresh()

07ad10cc-9b84-48f7-92ad-79f53f8c0321 8:38:18 PM: debug refresh()

d46c153f-cc8e-48bd-b1ac-733cc687e781 8:38:18 PM: debug refresh()

8e108903-ac56-4921-a5ff-bf89d9af65e5 8:38:18 PM: debug refresh()

b841ef45-4c99-49be-8172-44192bb60b9f 8:38:18 PM: debug refresh()

2e6dc67c-acc8-4cb0-bb50-db30f2f44813 8:38:18 PM: info postEventToEndpoint: event successfully posted.

2e6dc67c-acc8-4cb0-bb50-db30f2f44813 8:38:17 PM: debug Property Change Event level: 80 (source: DEVICE)

2e6dc67c-acc8-4cb0-bb50-db30f2f44813 8:38:17 PM: info postEventToEndpoint: event successfully posted.

2e6dc67c-acc8-4cb0-bb50-db30f2f44813 8:38:17 PM: debug Property Change Event level: 80 (source: DEVICE)

2e6dc67c-acc8-4cb0-bb50-db30f2f44813 8:38:17 PM: info postEventToEndpoint: event successfully posted.

2e6dc67c-acc8-4cb0-bb50-db30f2f44813 8:38:17 PM: debug Property Change Event level: 80 (source: DEVICE)

2e6dc67c-acc8-4cb0-bb50-db30f2f44813 8:38:17 PM: info postEventToEndpoint: event successfully posted.

2e6dc67c-acc8-4cb0-bb50-db30f2f44813 8:38:17 PM: debug Property Change Event level: 80 (source: DEVICE)

2e6dc67c-acc8-4cb0-bb50-db30f2f44813 8:38:17 PM: info postEventToEndpoint: event successfully posted.

2e6dc67c-acc8-4cb0-bb50-db30f2f44813 8:38:17 PM: debug Property Change Event level: 80 (source: DEVICE)

2e6dc67c-acc8-4cb0-bb50-db30f2f44813 8:38:17 PM: info postEventToEndpoint: event successfully posted.

2e6dc67c-acc8-4cb0-bb50-db30f2f44813 8:38:17 PM: debug Property Change Event level: 80 (source: DEVICE)

28325be8-0bdd-446f-8be6-1cfce0adc37c 8:38:17 PM: debug refresh()

07ad10cc-9b84-48f7-92ad-79f53f8c0321 8:38:17 PM: debug refresh()

8e108903-ac56-4921-a5ff-bf89d9af65e5 8:38:17 PM: debug refresh()

e56b713b-d773-4c5e-b51c-8819ab6ce7af 8:38:17 PM: debug refresh()

b841ef45-4c99-49be-8172-44192bb60b9f 8:38:17 PM: debug refresh()

28325be8-0bdd-446f-8be6-1cfce0adc37c 8:38:17 PM: debug refresh()

07ad10cc-9b84-48f7-92ad-79f53f8c0321 8:38:17 PM: debug refresh()

d46c153f-cc8e-48bd-b1ac-733cc687e781 8:38:17 PM: debug refresh()

e56b713b-d773-4c5e-b51c-8819ab6ce7af 8:38:17 PM: debug refresh()

b841ef45-4c99-49be-8172-44192bb60b9f 8:38:17 PM: debug refresh()

2e6dc67c-acc8-4cb0-bb50-db30f2f44813 8:38:16 PM: info postEventToEndpoint: event successfully posted.

2e6dc67c-acc8-4cb0-bb50-db30f2f44813 8:38:15 PM: debug Property Change Event level: 90 (source: DEVICE)

28325be8-0bdd-446f-8be6-1cfce0adc37c 8:38:16 PM: debug refresh()

07ad10cc-9b84-48f7-92ad-79f53f8c0321 8:38:15 PM: debug refresh()

2e6dc67c-acc8-4cb0-bb50-db30f2f44813 8:38:16 PM: info postEventToEndpoint: event successfully posted.

2e6dc67c-acc8-4cb0-bb50-db30f2f44813 8:38:15 PM: debug Property Change Event level: 90 (source: DEVICE)

2e6dc67c-acc8-4cb0-bb50-db30f2f44813 8:38:15 PM: info postEventToEndpoint: event successfully posted.

2e6dc67c-acc8-4cb0-bb50-db30f2f44813 8:38:15 PM: debug Property Change Event level: 90 (source: DEVICE)

2e6dc67c-acc8-4cb0-bb50-db30f2f44813 8:38:15 PM: info postEventToEndpoint: event successfully posted.

2e6dc67c-acc8-4cb0-bb50-db30f2f44813 8:38:15 PM: debug Property Change Event level: 90 (source: DEVICE)

2e6dc67c-acc8-4cb0-bb50-db30f2f44813 8:38:15 PM: info postEventToEndpoint: event successfully posted.

2e6dc67c-acc8-4cb0-bb50-db30f2f44813 8:38:15 PM: debug Property Change Event level: 90 (source: DEVICE)

2e6dc67c-acc8-4cb0-bb50-db30f2f44813 8:38:15 PM: info postEventToEndpoint: event successfully posted.

2e6dc67c-acc8-4cb0-bb50-db30f2f44813 8:38:15 PM: debug Property Change Event level: 90 (source: DEVICE)

d46c153f-cc8e-48bd-b1ac-733cc687e781 8:38:15 PM: debug refresh()

8e108903-ac56-4921-a5ff-bf89d9af65e5 8:38:15 PM: debug refresh()

e56b713b-d773-4c5e-b51c-8819ab6ce7af 8:38:15 PM: debug refresh()

b841ef45-4c99-49be-8172-44192bb60b9f 8:38:15 PM: debug refresh()

07ad10cc-9b84-48f7-92ad-79f53f8c0321 8:38:15 PM: debug refresh()

d46c153f-cc8e-48bd-b1ac-733cc687e781 8:38:15 PM: debug refresh()

===================================================


#2

I would have to immediately suspect system latency. I attempted to turn on/off a buzzer every 2-3 seconds and the time between changes varied all of the time.


#3

That is what I suspected too. However, ST is seeing the press and release. WebCore resides on ST. So, why is the WC not seeing the press/release? And is there a way to code around this?


#4

This is a tiny red flag to me. It looks like the device sends one alert when the button is first pressed, and another when it is released.

  • If the time between the two events are longer than X,
    then it notifies the hub that the button was held.
  • If the time between the two events was shorter than X,
    then it registers as a press.

If you only held it for one second, (and there was not another event in the logs), then likely only one alert was sent to the hub signifying it was a long press.

I suspect if you try to capture the “Release” it will capture the release even on short presses


#5

Anyone? Anyone? Bueller?


#6

Most buttons differentiate between a quick press & a long press… (some can also see a double press)

I have never seen a button that alerts the ST hub on how long a button is pressed.


I might do something like:

  • IF quick press, then set level to level - 10%
  • IF long press, then reset level to whatever

#7

I posted this over in the ST community.


#8

I have something like you suggested, but I was really trying to accomplish something like this…


#9

After thinking that I might have to rewrite the DTH or make a SmartApp, some smart fellows over on the SmartThings forums pointed out how to accomplish this.

I assumed that since I could only select “Held” or “pushed” when making my trigger in WebCore, that I would have to get the information to my piston some other way. But apparently, while you can only select those two options, you can set a trigger on ANY text. (Of course, it will only trigger if the device actually passes the text.) In this case, the device (button) was also able to pass “holdRelease”, which is what I needed. By using comparing the device button to an expression “holdRelease”, I was able to capture the event and act on it.