0

I'm looking to read data from sensors using an ArduinoUNO in a greenhouse and then access the data wirelessly through a router. Hopefully through a webpage. No need for internet access, just local network access is good enough.

Preferably the only components involved would be the Arduino, the circuit, and a router with OpenWRT/DD-WRT to host the webpage and broadcast the network.

Pretty new to Arduinos in general, would this be possible? And how? The following 2 links from instructables.com seem to be the most relevant, can anyone give their input on how similar/different is this to my project?

http://www.instructables.com/id/PART-1-Send-Arduino-data-to-the-Web-PHP-MySQL-D3js/

http://www.instructables.com/id/Getting-Arduino-data-to-a-web-Page/

3
  • with an esp8266 you can run them as hotspots, no need for a router. otherwise, the router will be the same as any other wifi-providing box that happens to have a downed internet connection; p2p/lan use is still fine
    – dandavis
    Sep 6, 2017 at 4:09
  • Would the esp8266 allow me to host a web page on it?
    – doyae
    Sep 6, 2017 at 5:30
  • yes, there's several ways to serve an html page from the esp, mere string building for example. the SPIFFS file web server makes it simple to host static assets, and you can make a quick API from just a few lines of C. fwiw, i've had much better luck pulling data from an esp webserver than with always-on connections like websockets or mqtt, likely because a web server does nothing while waiting, which uses no resources like bandwidth and power
    – dandavis
    Sep 7, 2017 at 6:16

1 Answer 1

1

Use a NodeMCU (ESP8266 based) because it have WiFi included. It can work as a light web server. You can serve HTML, but not large files (like many .js).

Instead of HTML you can use websockets to get only data from NodeMCU and all the other files (html, js, images) from another bigger server. Websockets is fast, but you still have to deal with .html, .css, .js and other files in your webserver.

If you want something even easier and lighter, take a look at MQTT, which was developed with IoT in mind.

There is lot of MQTT client for Android/Iphone/PC/Mac. You use your client to send data and commands to your NodeMCU. No need to program anything here; you simply construct a visual interface by adding controls (buttons, meters) to a blank slate. No brains job.

You will need a broker, a server that acts as a relay, receiving commands/data from your Android and resending it to your NodeMCU. And your NodeMCU can publish temp, humidity, light levels and other data to your broker. You can use multiple client at once. There is no limit.

Your broker can be an public Internet broker (many) or a private one in your LAN. There is many brokers available for different platforms. You can run one in your smartphone or any old PC. Mosquitto is a free one.

Depending on your configuration, you will be even able to access your green house from Internet and look at your girls from far away.

IoT

Your Answer

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

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