1) Give a description of the problem
Just trying a simple piston to call the NotifyMe API on a simple trigger, in this case when the HomeSeer HS-FS100-L indicator light sensor sees the light go out (“Button #1”) on my dumb dryer. I’ve copied a sample piston from a single-post member, and no matter how I try to do it, it comes back as "unauthorized – even though curl from a SHell works properly with the same credentials. Note that I’m a rank newbie not just on the forum, but scripting as well. I’m reading all I can, and trying to wrack my addled AARP brain to rattle what’s left in there to learn logic and syntax. It’s new to me, but not so foreign that I can’t learn as I go. I appreciate any and all help and will mark solved for sure!
ETA: I should note I also defined the string as a constant and that had no bearing of course.
ETA 2: the error in the log is truncated here, but it reads " +190ms ║║Error executing external web request: groovyx.net.http.HttpResponseException: Unauthorized"
2) What is the expected behaviour?
Trigger should action a Post call to the NotifyMe URI.
3) What is happening/not happening?
Nothing happens, see log below for the “unauthorized” line.
4) Post a Green Snapshot of the piston
5) Attach logs after turning logging level to Full
8/23/2020, 1:53:23 PM +976ms
+1ms ╔Received event [Dryer].button = pushed with a delay of 33ms
+48ms ║RunTime Analysis CS > 14ms > PS > 20ms > PE > 14ms > CE
+50ms ║Runtime (39074 bytes) successfully initialized in 20ms (v0.3.110.20191009) (48ms)
+51ms ║╔Execution stage started
+58ms ║║Comparison (enum) pushed gets (string) pushed = true (1ms)
+60ms ║║Cancelling condition #2's schedules...
+60ms ║║Condition #2 evaluated true (5ms)
+61ms ║║Cancelling condition #1's schedules...
+62ms ║║Condition group #1 evaluated true (state changed) (7ms)
+64ms ║║Cancelling statement #4's schedules...
+73ms ║║Sending external web request to: api.notifymyecho.com/v1/NotifyMe
+190ms ║║Error executing external web request: groovyx.net.http.HttpResponseException: Unauthorized
+191ms ║║Executed virtual command httpRequest (118ms)
+193ms ║╚Execution stage complete. (142ms)
+194ms ╚Event processed successfully (194ms)
ETA: If anybody somehow landed here searching for keywords with a similar issue, please follow along after the solution post (#2) to get the same clarification I needed. Also note the second issue I inadvertently discovered: don’t trust your computer or device’s copy-paste from an email or other source, and use a proper text editor to clean it up and make sure the formatting is correct! Hope @guxdude’s solution and @WCmore’s clarifications help somebody else.