Closed pvint closed 5 years ago
Original comment by debdale (Bitbucket: Debdale, ).
hi Mathew,
i'm trying to do a similar thing. i'm tying to POST a API to my raspberry pi, I've noticed if you move your (GET snippet/block) of code and place it anywhere else in the same sketch it will work.
also have you replaced the GET with POST just to see what happens?
Original comment by debdale (Bitbucket: Debdale, ).
looking into this further i think its also a library issue in a sense that the fauxmoESP.h and the ESP8266HTTPClient.h do not play well together??
i think there has been issues before with other HTTP/server libraries conflicting.
Original comment by Michael Gates (Bitbucket: MadBanana, GitHub: MadBanana).
I seem to be experiencing similar. FAUXMO works perfectly alone and the example behaves as it should. ESP8266HTTPClient also works correctly, sending HTTP commands to my Sonoff plugs.
The two together just will not work - I don't get any errors, FAUXMO toggles the LED state and sends to serial the change of state details but no HTTP string gets sent.
Glad it isn't just me ...
Original comment by Xose Pérez (Bitbucket: [Xose Pérez](https://bitbucket.org/Xose Pérez), ).
Try not to add too much code inside the callback, rise a flag instead and handle it from the main loop.
Original report by Matthew Paul Cupper (Bitbucket: mpcpro, GitHub: mpcpro).
Hi.
The problem I am having is that I am using the Example sketch and added the ESP8266 HTTPClient Library, and an If, Else Statement which is not working correctly.
If I tell Alexa "Power One On", Alexa will then tell the ESP8266 to turn on the onboard LED light. I made an If/Else statement based on if Power One is ON or OFF. If it is on, I want the ESP8266 to call a webpage (HTTP.GET) to activate another smart device in my house, and if "Power One Off" I want the ESP8266 to call another webpage.
Everything seems to work except for the IF / Else statement, since it is not calling the webpage I listed in the code, and thus nothing other then the onboard LED is getting activated or deactivated.
Wondering if anyone could look over my IF ELse statement and see if there is anything wrong.