Page 1 of 1
Access Raspberry Pi data with webpage
Posted: Sun Jan 10, 2016 5:13 am
by adk
Hello Experts,
I am a beginner. I am exploring Raspberry pi sprinkler project. My idea is to access URL and through that change some of the settings/configuration of Sprinkler.
Hit URL on cellphone from Office -> access settings page of my Pi Sprinkler installed at Home -> Set ON/OFF remotely.
I need some help regarding :
1 ] How can I set this URL stuff ? (I have WiFi at home with Netgear and its connected to INTERNET)
2 ] I have Cellphone with Internet on it.
3 ] How can I access settings page on my raspberry pi (rather how can I create that.)
Any help regarding this would be helpful. Please share any pointer to info document that will help me to explore this.
Thanks in advance.
Re: Access Raspberry Pi data with webpage
Posted: Sun Jan 10, 2016 9:22 am
by Navyscourge
Although you say you are a beginner you don't say just how 'skilled' you might be with this. What I suggest below is to get you started, and probably won't give youu direct answers - be prepared to think and read a lot.
1) Make sure your Pi is available on your local network, and your phone can access the Pi by IP address or name. This should be configured 'out of the box' (mostly)
2) Decide if access via the local network is sufficient, or do you want it over the internet?
3) Do you want to have the 'page' displayed on a web page, or would a remote view of the Pi screen be sufficient?
4) What information does the 'page' display, and what changes do you want to make to what the Pi is doing from that page? How often is this updated by the Pi, and is is saved?
Your project will have several steps; it is easier to take each one separately and make sure that each works before taking the next one; the questions above would help you decide on what those steps are.
You might start by getting the Pi to control your sprinkler - there are plenty of guides and projects that would help do this (ignore how 'good' the page looks at this point). You probably need to learn Python and the Pi GPIO stuff.
You should look at getting remote access to your Pi from your phone using SSH or VNC (or similar). There are lots of guides on this too.
You might need to investigate how to store the readings, using text files or a database (probably not?)
You might need to set up a Web Server on the Pi (again, plenty of guides)
You will need to learn an interactive web page language or tools to create your page after getting the readings.
The key to this is making sure that you know what you are trying to do in enough detail before you start. Post back if you are not sure about anything.
Re: Access Raspberry Pi data with webpage
Posted: Wed Jan 13, 2016 5:03 pm
by adk
Thanks a lot for your comments.
Just to brief you about it, I am planning split this in certain steps as below,
1 ] Set up web server on Raspberry Pi.
2 ] Make settings in a way that, if I will ping some IP from my android phone, it should give me two buttons ON/OFF.
3 ] Next step is to read status of those button events, on Raspberry Pi(I might need some application to monitor that.)
4 ] Make LED Flash on ON and OFF on OFF button press.
5 ] For Sprinkler , I can go for BJT as a switch and can drive 12 V Solenoid valve instead of LED to start and stop water flow.
In above steps , my impediments are ,
1 ] Which web server should I go for and how I can install it on Raspberry Pi. (I've a very little knowledge about it)
2 ] How to configure my Netgear W614 Router to set up connection between my android phone and Server Running on Raspberry Pi.
3 ] Do I need to write any script to route users ON/OFF press on web page to my LED.
I know pretty enough about
1 ] Preparing Solenoid Valve instead of LED.
2 ] I am good at C programming , about scripting I'm preparing myself for it.
I hope I am on right path. Please share your inputs and directions to make it success. Thanks.