Closed shamanix closed 2 years ago
Thanks! Definitely. The web app is completely client-side javascript and interacts with the ESP8266 with standard HTTP requests (GETs and POSTs). Just open the web app, open the browser developer tools, look at the network tab, and start doing stuff in the web app. You'll be able to see all the HTTP requests the web app uses.
Thanks for the fast reply, i have do this already with safari and chrome. i see the command power?value=1 for switch the button "on" but when i try to open http://1.2.3.4/power?value=1 then comes a blank site with " /power not found " when i try http://1.2.3.4/?cmd=power?value=1 then open the webapp, but the led are not on... where is my mistake?
Yeah, look closer at the HTTP request methods. Anything that gets a value is a HTTP GET request. Anything that changes a value is a HTTP POST request. When you open http://1.2.3.4/power?value=1
in a web browser, it sends a HTTP GET request. To send a HTTP POST request, you need to write code, create an HTML form, etc. You can also use a tool like Postman to test.
More information on HTTP REST APIs: https://en.wikipedia.org/wiki/Representational_state_transfer#Applied_to_Web_services
perfect, you bring me on the right way! i can send data with a curl --data "" http://1.2.3.4/power?value=1 in command line on fhem-server console now. now i can implement your famous software in my smart home central. ( fhem ) this is nice, because i can control the smart home with my voice, to say "Make light blue" or "partytime" wich will be start some things (Music, other light effects - and now your´s :-) ) thanks again for your great piece of software!
Hi,
I hope you can make something with these:
IP="192.168.1.170";CURL="curl -o /dev/null -s -H \"Content-Type: application/json\" -X POST http://";${CURL}${IP}/power?value=0 IP="192.168.1.170";CURL="curl -o /dev/null -s -H \"Content-Type: application/json\" -X POST http://";${CURL}${IP}/autoplay?value=1 IP="192.168.1.170";CURL="curl -o /dev/null -s -H \"Content-Type: application/json\" -X POST http://";${CURL}${IP}/pattern?value=1 IP="192.168.1.170";CURL="curl -o /dev/null -s -H \"Content-Type: application/json\" -X POST http://";${CURL}${IP}/palette?value=8 IP="192.168.1.170";CURL="curl -o /dev/null -s -H \"Content-Type: application/json\" -X POST http://";${CURL}${IP}/autoplayDuration?value=5
SolidCOLOR RED IP="192.168.1.170";CURL="curl -o /dev/null -s -H \"Content-Type: application/json\" -X POST http:// ";${CURL}${IP}/solidColor?value="&r=255&g=0&b=0" Portocaliu IP="192.168.1.170";CURL="curl -o /dev/null -s -H \"Content-Type: application/json\" -X POST http:// ";${CURL}${IP}/solidColor?value="&r=255&g=128&b=0" Galben IP="192.168.1.170";CURL="curl -o /dev/null -s -H \"Content-Type: application/json\" -X POST http:// ";${CURL}${IP}/solidColor?value="&r=255&g=255&b=0"
Verde1 IP="192.168.1.170";CURL="curl -o /dev/null -s -H \"Content-Type: application/json\" -X POST http:// ";${CURL}${IP}/solidColor?value="&r=128&g=255&b=0" Verde2 IP="192.168.1.170";CURL="curl -o /dev/null -s -H \"Content-Type: application/json\" -X POST http:// ";${CURL}${IP}/solidColor?value="&r=0&g=255&b=0" Verde3 IP="192.168.1.170";CURL="curl -o /dev/null -s -H \"Content-Type: application/json\" -X POST http:// ";${CURL}${IP}/solidColor?value="&r=0&g=255&b=128"
Albastru1 IP="192.168.1.170";CURL="curl -o /dev/null -s -H \"Content-Type: application/json\" -X POST http:// ";${CURL}${IP}/solidColor?value="&r=0&g=255&b=255" Albastru2 IP="192.168.1.170";CURL="curl -o /dev/null -s -H \"Content-Type: application/json\" -X POST http:// ";${CURL}${IP}/solidColor?value="&r=0&g=128&b=255" Albastru3 IP="192.168.1.170";CURL="curl -o /dev/null -s -H \"Content-Type: application/json\" -X POST http:// ";${CURL}${IP}/solidColor?value="&r=0&g=0&b=255"
Mov IP="192.168.1.170";CURL="curl -o /dev/null -s -H \"Content-Type: application/json\" -X POST http:// ";${CURL}${IP}/solidColor?value="&r=128&g=0&b=255"
Siclam IP="192.168.1.170";CURL="curl -o /dev/null -s -H \"Content-Type: application/json\" -X POST http:// ";${CURL}${IP}/solidColor?value="&r=255&g=0&b=255"
Roz IP="192.168.1.170";CURL="curl -o /dev/null -s -H \"Content-Type: application/json\" -X POST http:// ";${CURL}${IP}/solidColor?value="&r=255&g=0&b=128"
ALB IP="192.168.1.170";CURL="curl -o /dev/null -s -H \"Content-Type: application/json\" -X POST http:// ";${CURL}${IP}/solidColor?value="&r=255&g=255&b=255"
On Mon, Jan 15, 2018 at 4:44 PM, Shamanix notifications@github.com wrote:
Hello, you Evil Genius,
thanks for your great software. It works perfect, very fast and is simple to use. I have one question: can i control it with http commands. i will implement the esp in my smart home software (fhem) to control it. i can define LightScenes here, other LED Stripe with LW12 Controller i control thrue webcommands ( http://1.2.3.4/?cmd=rainbow ). what can i do to have this with your software? thanks robert
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jasoncoon/esp8266-fastled-webserver/issues/60, or mute the thread https://github.com/notifications/unsubscribe-auth/AAvGL_j78a8R7rl9o9dMZoaKKockTiFPks5tK2RVgaJpZM4Reg16 .
hi, thanks @mclaudiu for your response. Your Solution works perfectly. i read some tuts, and now i use this: curl --data "" http://1.2.3.4/power?value=1 this works also perfect. original it must be: curl --data "power?value=1" http://1.2.3.4 - but this will bring up an error: / not found i will read about the differences to your solution.
Thanks again to all :-)
hi again,
i forgot something: i use a WS2801 LED Strip. need to add a CLOCK_PIN and change the LEDStripe SetupRoutine to APA102 Dotstar and everything works perfect. only for your interest and maby to make a notice in the wiki or readme.
FastLED.addLeds<LED_TYPE,DATA_PIN,CLOCK_PIN,COLOR_ORDER>(leds, NUM_LEDS); // for APA102 (Dotstar)
my ESP: [Nodemcu-ESP-12F-WIFI-Network] (https://de.aliexpress.com/item/Free-Shipping-Lua-Nodemcu-ESP-12F-WIFI-Network-Development-Board-Module-Based-ESP8266/32740698081.html?spm=a2g0s.9042311.0.0.zhXl7d
my STRIP: WS2801
Hi, I hope you can make something with these: IP="192.168.1.170";CURL="curl -o /dev/null -s -H \"Content-Type: application/json\" -X POST http://";${CURL}${IP}/power?value=0 IP="192.168.1.170";CURL="curl -o /dev/null -s -H \"Content-Type: application/json\" -X POST http://";${CURL}${IP}/autoplay?value=1 IP="192.168.1.170";CURL="curl -o /dev/null -s -H \"Content-Type: application/json\" -X POST http://";${CURL}${IP}/pattern?value=1 IP="192.168.1.170";CURL="curl -o /dev/null -s -H \"Content-Type: application/json\" -X POST http://";${CURL}${IP}/palette?value=8 IP="192.168.1.170";CURL="curl -o /dev/null -s -H \"Content-Type: application/json\" -X POST http://";${CURL}${IP}/autoplayDuration?value=5 SolidCOLOR RED IP="192.168.1.170";CURL="curl -o /dev/null -s -H \"Content-Type: application/json\" -X POST http:// ";${CURL}${IP}/solidColor?value="&r=255&g=0&b=0" Portocaliu IP="192.168.1.170";CURL="curl -o /dev/null -s -H \"Content-Type: application/json\" -X POST http:// ";${CURL}${IP}/solidColor?value="&r=255&g=128&b=0" Galben IP="192.168.1.170";CURL="curl -o /dev/null -s -H \"Content-Type: application/json\" -X POST http:// ";${CURL}${IP}/solidColor?value="&r=255&g=255&b=0" Verde1 IP="192.168.1.170";CURL="curl -o /dev/null -s -H \"Content-Type: application/json\" -X POST http:// ";${CURL}${IP}/solidColor?value="&r=128&g=255&b=0" Verde2 IP="192.168.1.170";CURL="curl -o /dev/null -s -H \"Content-Type: application/json\" -X POST http:// ";${CURL}${IP}/solidColor?value="&r=0&g=255&b=0" Verde3 IP="192.168.1.170";CURL="curl -o /dev/null -s -H \"Content-Type: application/json\" -X POST http:// ";${CURL}${IP}/solidColor?value="&r=0&g=255&b=128" Albastru1 IP="192.168.1.170";CURL="curl -o /dev/null -s -H \"Content-Type: application/json\" -X POST http:// ";${CURL}${IP}/solidColor?value="&r=0&g=255&b=255" Albastru2 IP="192.168.1.170";CURL="curl -o /dev/null -s -H \"Content-Type: application/json\" -X POST http:// ";${CURL}${IP}/solidColor?value="&r=0&g=128&b=255" Albastru3 IP="192.168.1.170";CURL="curl -o /dev/null -s -H \"Content-Type: application/json\" -X POST http:// ";${CURL}${IP}/solidColor?value="&r=0&g=0&b=255" Mov IP="192.168.1.170";CURL="curl -o /dev/null -s -H \"Content-Type: application/json\" -X POST http:// ";${CURL}${IP}/solidColor?value="&r=128&g=0&b=255" Siclam IP="192.168.1.170";CURL="curl -o /dev/null -s -H \"Content-Type: application/json\" -X POST http:// ";${CURL}${IP}/solidColor?value="&r=255&g=0&b=255" Roz IP="192.168.1.170";CURL="curl -o /dev/null -s -H \"Content-Type: application/json\" -X POST http:// ";${CURL}${IP}/solidColor?value="&r=255&g=0&b=128" ALB IP="192.168.1.170";CURL="curl -o /dev/null -s -H \"Content-Type: application/json\" -X POST http:// ";${CURL}${IP}/solidColor?value="&r=255&g=255&b=255" … On Mon, Jan 15, 2018 at 4:44 PM, Shamanix @.***> wrote: Hello, you Evil Genius, thanks for your great software. It works perfect, very fast and is simple to use. I have one question: can i control it with http commands. i will implement the esp in my smart home software (fhem) to control it. i can define LightScenes here, other LED Stripe with LW12 Controller i control thrue webcommands ( http://1.2.3.4/?cmd=rainbow ). what can i do to have this with your software? thanks robert — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#60>, or mute the thread https://github.com/notifications/unsubscribe-auth/AAvGL_j78a8R7rl9o9dMZoaKKockTiFPks5tK2RVgaJpZM4Reg16 .
Any way to do the solid color with hex value?
I made one applet for each colour in ifttt http://myipaddress/solidColor?value="&r=0&g=0&b=255" Make lights blue. Must be Post as the Method and content type application/json For patterns http://myipaddress/pattern?value={{NumberField}} Google assist say pattern number so put the number in as the field. Same a above must be post and application/json. Looking at how to only allow access from ifttt ip addresses for security and adding friendly names for calling the patterns.
Closing due to >1 year inactivity.
Hello, you Evil Genius,
thanks for your great software. It works perfect, very fast and is simple to use. I have one question: can i control it with http commands. i will implement the esp in my smart home software (fhem) to control it. i can define LightScenes here, other LED Stripe with LW12 Controller i control thrue webcommands ( http://1.2.3.4/?cmd=rainbow ). what can i do to have this with your software? thanks robert