TRIGGERcmd
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login
    1. Home
    2. mthiel
    3. Posts
    M
    • Profile
    • Following 0
    • Followers 0
    • Topics 0
    • Posts 2
    • Best 0
    • Controversial 0
    • Groups 0

    Posts made by mthiel

    • RE: SmartThings integration - flip a virtual switch to run a command

      @russ Thanks for checking! Unfortunately, re-creating the device via the SmartApp didn't make a difference. Turns out MY problem is that I only have one trigger I'm testing on...

      I spent a few hours troubleshooting the SmartApp code and found the root cause around line 249. When a single trigger comes back from the api, the conditional looks like it assumes the type will be a Map, but it actually just returns a List with a single item at index 0. Changing the "devices?.name" and "devices?did" to "devices[0].name" and "devices[0].did" fixes the issue for me. I only realized the problem because the trigger list kept creating devices with brackets around the name, making me expect a typing problem.

      It's working great for me now, hope my digging helps!

      posted in Instructions
      M
      mthiel
    • RE: SmartThings integration - flip a virtual switch to run a command

      Hello,

      I'm trying to get this setup to put my display to sleep, but the commands don't seem to be reaching SmartThings. If I manually fire the TriggerCMD from my phone browser it works perfectly, but SmartThings doesn't seem to be communicating correctly despite the lack of any error. TriggerCMD also doesn't report receiving any requests except the ones I performed from the browser. I don't think there's an authentication issue since the SmartApp is reading my commands fine. I'm not sure what else to check. Here's a snip from the SmartThings log:

      57bb48b4-bb6a-48d0-8938-e085928b86e6  4:47:54 PM: debug OFF result: [response:done]
      57bb48b4-bb6a-48d0-8938-e085928b86e6  4:47:54 PM: debug Return Code = 200 = Command Succeeded.
      57bb48b4-bb6a-48d0-8938-e085928b86e6  4:47:54 PM: debug In apiPost with data: [token:(token), uri:/api/run/triggerByID, body:trigger=[5c61df9baa745900163af4dd-5c64b9eb3b309f00167a06eb]&params=off]
      57bb48b4-bb6a-48d0-8938-e085928b86e6  4:47:54 PM: debug Off request from child device
      57bb48b4-bb6a-48d0-8938-e085928b86e6  4:47:54 PM: debug ON result: [response:done]
      57bb48b4-bb6a-48d0-8938-e085928b86e6  4:47:54 PM: debug Return Code = 200 = Command Succeeded.
      57bb48b4-bb6a-48d0-8938-e085928b86e6  4:47:54 PM: debug In apiPost with data: [token:(token), uri:/api/run/triggerByID, body:trigger=[5c61df9baa745900163af4dd-5c64b9eb3b309f00167a06eb]&params=on]
      57bb48b4-bb6a-48d0-8938-e085928b86e6  4:47:54 PM: debug On request from child device script_dth_cd2efee0eca44de1d6ceeb8c9ede43c0f5239b6c1e6e37c4e674414c2538f18d@574ae66b
      
      posted in Instructions
      M
      mthiel