Piston Triggering twice


#1

1) Give a description of the problem
Started having an issue sending a web request to jishi Sonos API, it appears that the http response is re-triggering the piston
2) What is the expected behaviour?
The web request executes one time

3) What is happening/not happening?
The web request executes twice (once on test, then when the http response is received)

**4) Post a Green Snapshot of the piston

5) Attach logs after turning logging level to Full

2/7/2022, 10:35:51 AM +34ms
    +0ms ╔Received event [Collinwood].wc_async_reply = httpRequest with a delay of 0ms
    +42ms ║RunTime Analysis CS > 18ms > PS > 15ms > PE > 9ms > CE
    +44ms ║Runtime (42342 bytes) successfully initialized in 15ms (v0.3.113.20210203) (43ms)
    +45ms ║╔Execution stage started
    +46ms ║╚Execution stage complete. (1ms)
    +47ms ╚Event processed successfully (48ms)
    2/7/2022, 10:35:49 AM +350ms
    +0ms ╔Received event [Collinwood].wc_async_reply = httpRequest with a delay of 0ms
    +40ms ║RunTime Analysis CS > 17ms > PS > 14ms > PE > 9ms > CE
    +42ms ║Runtime (42342 bytes) successfully initialized in 14ms (v0.3.113.20210203) (41ms)
    +43ms ║╔Execution stage started
    +49ms ║╚Execution stage complete. (7ms)
    +54ms ╚Event processed successfully (55ms)
    2/7/2022, 10:35:42 AM +947ms
    +2ms ╔Received event [Collinwood].test = 1644258942944 with a delay of 2ms
    +56ms ║RunTime Analysis CS > 26ms > PS > 20ms > PE > 11ms > CE
    +63ms ║Runtime (42335 bytes) successfully initialized in 20ms (v0.3.113.20210203) (59ms)
    +64ms ║╔Execution stage started
    +68ms ║║Cancelling statement #1's schedules...
    +76ms ║║Sending internal web request to: 192.168.2.51:5005/Office%20Sonos/say/Goodnight/Joanna
    +80ms ║║Executed virtual command httpRequest (6ms)
    +82ms ║║Requesting a wake up for Mon, Feb 7 2022 @ 10:36:03 AM PST (in 20.0s)
    +112ms ║╚Execution stage complete. (49ms)
    +129ms ║Setting up scheduled job for Mon, Feb 7 2022 @ 10:36:03 AM PST (in 19s)
    +139ms ╚Event processed successfully (138ms)

#2

Playing with this more. I don’t think it’s the response that’s triggering the piston execution. As a test, I’ve used a device state change as a trigger and the same thing happens. It seems, for some reason, ST is sending the web request multiple times. This may be something with a recent ST update and not a WC issue.


#3

I don’t suppose you have two SmartThings hubs in your Location do you? That would result in two web requests being made.


#4

Nope. Just the one.


#5

I wasn’t having this problem when you first posted. However today, it has started announcing twice. I wonder if its anything to do with the latest hub firmware which has just finished rolling out?


#6

I workaround the issue by proxying the request to another sever first. It’s ugly, but it beats hearing, “Goodnight Goodnight Goodnight”


#7

Do you have more details of how you’ve done that?
Does anyone know whether this is an issue on hubitat as well?


#8

Sort of unique to my setup. I have a server in my house with a simple javascript webservice acting as an API so I can execute other code remotely. I just added a listener to that service to sent my Sons HTTP requests to from Smartthings and then it forwards that on to the HTTP Sonos webservice I was using.

Like I said, ugly but workable with what I already had in place.


#9

This issue seems to have been resolved. I’m only getting one notification. I didn’t make any changes.