-->
Page 1 of 3

How to cotrol esp8266 using Socket, Html, Javascript ?

PostPosted: Mon Apr 02, 2018 2:56 pm
by indrajit
I have implemented chat system via Node.Js, whenever I send a text message from one browser window then from other browser window I can receive the text message, I have used one IP and port, where both browser hits the same IP and port,
Now I want esp8266 to hit the IP and port, and from browser I want to send some data(strings) to control on/off
switch via esp8266. Is it possible?

I want to control esp8266 through Global server with negligible time delay.
Can anyone help me?

Thanks

Re: How to cotrol esp8266 using Socket, Html, Javascript ?

PostPosted: Fri Apr 27, 2018 8:50 am
by rogerisael
Oh yeah you can do it, I started to work on that just past week after trying a couple of libraries for Websocket I found this one https://github.com/morrissinger/ESP8266-Websocket I like this one because different from the others with this one you can send a received Strings not uint8_t like others others libraries I have try do, I'm setting up my ESP8266 as a Websocket server and after a client connect it will start to send data and at the same time I can send back commands to control the ESP8266, I hope this will help you. By the way, use native Websocket object on browser side, socket.io and libraries of that type won't work.

Re: How to cotrol esp8266 using Socket, Html, Javascript ?

PostPosted: Fri Jun 22, 2018 9:44 am
by doebram
Here https://gist.github.com/bbx10/667e3d4f5f2c0831d00b is another example of how to control an LED with web socket. Also, on Assignment.EssayShark you can find similar information or get homework assignment help if you want to practice with this device. In general, there are a lot of different concrete examples on this subject on GitHub (here is another one https://github.com/espruino/Espruino/issues/605).

Re: How to cotrol esp8266 using Socket, Html, Javascript ?

PostPosted: Wed Aug 29, 2018 5:12 am
by ericafink
you could check here if the answer is still needed. If it won't help, feel free to contact me!