1

I'm trying to setup home automation system controlled with webpage stored in SD card of Arduino, I was thinking if it was possible to set a login page, only combination of correct user id & password will be able to access the control page.

6
  • What have you already tried? In order for other people to help you, you need to show effort in doing so yourself.
    – Avamander
    Feb 24, 2016 at 12:47
  • That is easy to break. Have you considered checking the client MAC address? Feb 24, 2016 at 12:55
  • I seen some tutorials, a simple webpage with buttons can control "things" connected to relay. Feb 24, 2016 at 13:45
  • At Atmega based Arduino is the wrong choice to start with. Feb 26, 2016 at 3:55
  • @Mikael, "Have you considered checking the client MAC address?" Eh, why? How's a MAC address more secure than a username and good password? Are you referring to lack of HTTPS in the question? Also, unless using IPv6 without privacy addressing, MAC addresses don't make it beyond the first network router, so would limit control. And when within that same network, a simple arp -a will show MAC addresses of other devices, and that can easily be spoofed... MAC filtering is not secure at all.
    – Arjan
    Feb 26, 2016 at 12:27

5 Answers 5

3

I have a page about a tiny web server for the Arduino Uno or similar boards. It simply isn't true that you can't make one, or that a much more powerful processor would be better. There are some limitations imposed by small amounts of RAM, but the library described there decodes incoming HTTP information "on the fly" so it can handle a reasonably large page.

You could put the data to be display into PROGMEM (more information here) or onto an SD card as someone suggested.

The login and password could be stored in EEPROM.

1
  • I would also suggest making your UI a "one page" Javascript application. This means all the UI is loaded into the browser up front and all further interactions with your Arduino can be made with simple GET/POST requests eg AJAX/RESTful requests. This approach also has the advantage of allowing you to pre-compress the JS/CSS application code with GZip (just add a Content-Encoding: gzip header) greatly reducing the amount of flash required and overhead of streaming content from flash to the browser. The main point here being push as much processing as possible into the browser.
    – Tim
    Mar 14, 2016 at 14:03
2

Arduino cannot run a web server so it is not possible to do what you want with just using an Arduino board?. It seems we can run a web server, look at the answer by @Nick Gammon below.

By using a wifi shield and connecting to a local or public web server where your page is hosted you should be able to to do it.

Don't expect to load a full fledged page on an Arduino you have to try posting a few post and get requests to get this working. It will look like a terminal based login.

What is the control page you are trying to do?

If you are ok with spending more money try using a Raspberry pi + Arduino combination.

4
1

Have you tried to change Arduino Uno board to Arduino Yun board? Yun has a Linux distribution onboard and you can easy configure a web page to control physical objects.

Here some examples: http://scuola.arduino.cc/lesson/b4EoRkV/Arduino_Yn_Intro_to_web_server https://github.com/mat-lo/yun-examples

-1

Make simple webpage and put it in sd card. If it's just one page with few buttons and bit js even flash memory of controller would suffice.

In arduino code add lines that can detect click on particular button of webpage and control relay/motor etc.

Knowledge of basic post request using js can help. You can't implement php page in arduino as it needs complex processing at arduino side

1
  • How exactly would this process you described work? What tools are needed? Currently your answer needs more information, if you improve your answer you'll definitely get a few upvotes.
    – Avamander
    Feb 26, 2016 at 15:10
-1

I guess you could do it with Javascript and HTML, and put the pages in the micro SD card.

But it will make it harder (if not impossible) to make the automation.

5
  • I read a tutorial, in which Node.js was use for automation, stored in SD card, if that can be done, then login? Feb 24, 2016 at 14:21
  • here you can found some help (but only with html) How to make a login form using HTML that connects to the next page though with nodejs it would be awesome
    – Fabian W
    Feb 24, 2016 at 14:45
  • That's a good help Feb 24, 2016 at 14:57
  • 1
    but it will make it harder (if not impossible) to make the automatization - why? Your answer will be more helpful if you explain your thinking here.
    – Nick Gammon
    Feb 24, 2016 at 20:00
  • @Fabian W. the link u provided is a very good resource, thank you Feb 26, 2016 at 17:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.