WLednot responding to On/Off post


#1

1) Give a description of the problem
When sending an on or off command to my lights they don’t.
ESP8266 Dev Board

2) What is the expected behavior?
The lights turn on or off

3) What is happening/not happening?
The lights aren’t turning on or off

**4) Post a Green Snapshot of the piston![image|45x37]

5) Attach logs after turning logging level to Full
|+0ms|╔Received event [Home].time = 1598821258790 with a delay of -1732ms|
|—|---|
|+45ms|║RunTime Analysis CS > 23ms > PS > 5ms > PE > 17ms > CE|
|+48ms|║Runtime (36287 bytes) successfully initialized in 5ms (v0.3.110.20191009) (46ms)|
|+49ms|║╔Execution stage started|
|+56ms|║╚Execution stage complete. (7ms)|
|+57ms|╚Event processed successfully (57ms)|


#2

Dumb question, but did you try pressing the Test button?
(not seen in the log above)


#3

Yes, many many times. There are no errors which is making it confusing as to why the lights wont respond to the program. The lights work fine through curl in terminal.


#4

The log posted above only appears after the query timeout…
It does not show the initial commands.


#5
|8/30/2020, 5:00:57 PM +59ms|
|+0ms|╔Received event [Home].time = 1598821258790 with a delay of -1732ms|
|+45ms|║RunTime Analysis CS > 23ms > PS > 5ms > PE > 17ms > CE|
|+48ms|║Runtime (36287 bytes) successfully initialized in 5ms (v0.3.110.20191009) (46ms)|
|+49ms|║╔Execution stage started|
|+56ms|║╚Execution stage complete. (7ms)|
|+57ms|╚Event processed successfully (57ms)|
|8/30/2020, 5:00:38 PM +698ms|
|+0ms|╔Received event [Home].test = 1598821238697 with a delay of 0ms|
|+51ms|║RunTime Analysis CS > 26ms > PS > 7ms > PE > 18ms > CE|
|+54ms|║Runtime (36283 bytes) successfully initialized in 7ms (v0.3.110.20191009) (52ms)|
|+55ms|║╔Execution stage started|
|+60ms|║║Cancelling statement #1's schedules...|
|+86ms|║║Sending internal web request to: 192.168.1.240/json/state|
|+89ms|║║Executed virtual command httpRequest (20ms)|
|+91ms|║║Requesting a wake up for Sun, Aug 30 2020 @ 5:00:58 PM EDT (in 20.0s)|
|+114ms|║╚Execution stage complete. (60ms)|
|+125ms|║Setting up scheduled job for Sun, Aug 30 2020 @ 5:00:58 PM EDT (in 19.968s)|
|+133ms|╚Event processed successfully (133ms)|

#6

Thank you.

Can you try a GET request, without using JSON encoded data?
(IE: using a longer URL instead)


#7

How would i go about doing that? Like getting the longer url


#8

There are many ways, but I am blind at the moment…
I am referring to a long URL that will work when pasted into a normal web browser.


#9

I figured that out and it is basically doing the same thing, not saying any errors in the log but not making any actual change to the lights. I’ve been following a tutorial a guy posted on his blog and followed every step exactly yet it just won’t get the lights to change.


#10

When I am trying to make URLs work, I first test them without the piston. Try in an editor putting the URL string together as you think it should be. Then paste it in the address box of a browser to see what it does. There you might see any errors produced. When you get it working in a browser, then you know what to put in your piston.


#11

Once you work thru @guxdude’s advice, then you can focus back in webCoRE…

If you are a visual learner, here is an example of one of my posts.

pic

(Note, all of those variables are set prior to the web query)


#12

I tested it in an address bar and it gives me what it’s supposed to. Also, when I put the same IP into a terminal and using curl to send a POST request it turns them on and off. From what I’ve seen, all I should need to do is add on http:// to the IP that I used in the terminal to WebCore yet WebCore doesn’t make any change to the lights. Could there be something I’m missing there?


#13

Did you try storing “true” in a string variable called “on”, and sending the way I did above?


#14

This is what I have


#15

I am not sure if it matters, but up in the define section, I use the variable type “String (text)

pic

… which spits out:

pic


#16

Just to clarify,
Did the lights actually change when using the address bar?


#17

no, it just gave me a “Page” (i dont know what to actually call it) that I could tell was for the WLED’s


#18

Just tried that and there’s no change. This is so strange. It should be such a simple task yet it’s all screwy


#19

Ahh… That is the clue. There is no need to think about webCoRE until you have a URL that turns on the light from a standard web browser.

I would make a post on the blog where you found this code…


#21

You can see the code (other than the IP) that i put in in the screen shot i replied with where it says url, what would i need to add/ take away. (The guy who posted the blog hasn’t been answering questions sadly)