Page 1 of 1
Webserver advice needed
Posted:
Mon Dec 12, 2016 3:27 pm
by racemier
Hi,
I bought an ESP module which I want to use as a webserver (Access Point).
The idea is to use it to control my Webasto heater in my car.
Therefore I would like to have a kind of scheduler (time, weekday and on/off button).
I've been surfing the web to find a suitable solution, but I'm a bit stuck.
I was thinking of jQuery but think it's to big to run it locally.
I need some advice which direction I need to go?
Grtz,
Roger
Re: Webserver advice needed
Posted:
Tue Dec 13, 2016 7:08 am
by eduperez
My two cents:
* An access point and web server are two independent concepts; you can have both at the same time, or you can have one but not the other.
* JQuery runs on the web browser, not the server; as long as the files are not too big to be stored on the ESP, you will be safe. But then, perhaps this is not what you need.
* Perhaps you should clarify a bit your requirements so others can help you better.
Re: Webserver advice needed
Posted:
Wed Dec 14, 2016 8:46 am
by racemier
Thanks for the reply.
The idea is to use a ESP8266 as controller (UART output to L9637 IC) for my Webasto heater.
I would like to have a web UI, to be able to set a time and day (mon-sun, single and multiple days via checkboxes) when the Webasto needs to start.
There also should be on/off button to start and stop the Webasto directly.
When I get in the car, my smart phone should connect to the ESP8266 (AP?) so that when I use my browser I can access the UI.
For time keeping I was thinking about a RTC DS1337 (I2C controlled) which can be set by webpage also. If needed it also contains 2 alarm registers.
Hope this clarifies the question.
Best regards,
Rogier
Re: Webserver advice needed
Posted:
Wed Dec 28, 2016 12:07 pm
by arallsopp
The idea is to use a ESP8266 as controller (UART output to L9637 IC) for my Webasto heater.
Should work. Minimum viable concept is probably toggling a pin in a sketch using delay and seeing if you can make the heater respond. If so, continue.
I would like to have a web UI, to be able to set a time and day (mon-sun, single and multiple days via checkboxes) when the Webasto needs to start.
I'd be tempted to hard code the schedule as starting position. Your ESP8266 is presumably going to power down when you're not in the car, and storing it in the sketch means you don't have to worry about persisting it between boot cycles. Once you've got it going, there are ways to write and read from the EEPROM which can take you forwards in the direction you want to go. I use the Arduino IDE. It has webserver examples in the file menu.
There also should be on/off button to start and stop the Webasto directly.
With the schedule baked into the sketch, you may choose to make this a physical switch and dispense with the entire web page idea for the first prototype.
When I get in the car, my smart phone should connect to the ESP8266 (AP?) so that when I use my browser I can access the UI.
Yes, that's how it would probably work. You can save the access point name in your phone and have a shortcut saved somewhere handy to request the page.
For time keeping I was thinking about a RTC DS1337 (I2C controlled) which can be set by webpage also. If needed it also contains 2 alarm registers.
Sounds like it would work. I don't have any experience myself. Let us know how you get on.