1) Give a description of the problem
This is a two-part question.
Part 1: I am working on a piston that should change the profile of my security camera via an HTTP command. If I copy and paste the command from WC and paste it into a browser, things work properly and the camera’s profile changes as expected. But when I execute the piston, nothing happens and the camera’s profile stays the same.
I don’t understand why the command works when issued from a browser but doesn’t work when issued via WC. No errors are displayed in the log.
Part 2: I thought I would log the HTTP response to the console and look for clues in the response but nothing is written to the console. Am I doing something wrong? Is there just no response or is my syntax for logging the response incorrect?
2) What is the expected behaviour?
The HTTP Get command should change the camera’s profile from 0 to 1 at sunset and 1 to 0 at sunrise.
3) What is happening/not happening?
If I copy the command from WebCoRE and paste it into a browser and execute it, the camera’s profile successfully changes. When I run the piston containing the same command, nothing happens.
**4) Post a Green Snapshot of the piston
Here’s the piston. I’ve changed the the User ID and password to gibberish so the entire formatted URL is visible. When I get it working, the piston will run at sunrise and sunset but right now it says everyday at a specific time so I can easily change the time and trigger it for testing purposes.
5) Attach logs after turning logging level to Full
Here are the logs. I’ve redacted the User ID and Password.
298ms | ║╔Subscribing to devices… |
---|---|
+349ms | ║╚Finished subscribing (60ms) |
+407ms | ║Setting up scheduled job for Tue, Jan 19 2021 @ 7:18:00 AM MST (in 40477.27s), with 1 more job pending |
+420ms | ╚Piston successfully started (419ms) |
1/18/2021, 7:57:18 PM +42ms | |
+1ms | ╔Received event [Home V3].time = 1611025039105 with a delay of -1063ms |
+40ms | ║RunTime Analysis CS > 22ms > PS > 5ms > PE > 12ms > CE |
+42ms | ║Runtime (40427 bytes) successfully initialized in 5ms (v0.3.110.20191009) (41ms) |
+43ms | ║╔Execution stage started |
+55ms | ║║[:] |
+56ms | ║║Executed virtual command log (1ms) |
+61ms | ║║Calculating (string) DW Starlight profile set to Night at + (string) Mon, Jan 18 2021 @ 7:57:18 PM MST >> (string) DW Starlight profile set to Night at Mon, Jan 18 2021 @ 7:57:18 PM MST |
+64ms | ║║Calculating (string) DW Starlight profile set to Night at Mon, Jan 18 2021 @ 7:57:18 PM MST + (string) . >> (string) DW Starlight profile set to Night at Mon, Jan 18 2021 @ 7:57:18 PM MST. |
+76ms | ║║Executed virtual command sendPushNotification (9ms) |
+79ms | ║╚Execution stage complete. (36ms) |
+81ms | ║Setting up scheduled job for Tue, Jan 19 2021 @ 7:18:00 AM MST (in 40841.878s), with 1 more job pending |
+87ms | ╚Event processed successfully (87ms) |
1/18/2021, 7:56:59 PM +41ms | |
+0ms | ╔Received event [Home V3].time = 1611025020000 with a delay of -960ms |
+35ms | ║RunTime Analysis CS > 15ms > PS > 6ms > PE > 15ms > CE |
+38ms | ║Runtime (40426 bytes) successfully initialized in 6ms (v0.3.110.20191009) (36ms) |
+39ms | ║╔Execution stage started |
+51ms | ║║Cancelling statement #2’s schedules… |
+58ms | ║║Sending internal web request to: userRedacted:[email protected]/cgi-bin/configManager.cgi?action=setConfig&VideoInMode[0].Config[0]=1 |
+62ms | ║║Executed virtual command httpRequest (4ms) |
+63ms | ║║Requesting a wake up for Mon, Jan 18 2021 @ 7:57:19 PM MST (in 20.0s) |
+70ms | ║╚Execution stage complete. (31ms) |
+72ms | ║Setting up scheduled job for Mon, Jan 18 2021 @ 7:57:19 PM MST (in 19.993s), with 2 more jobs pending |
+79ms | ╚Event processed successfully (79ms) |