eternalfroast
Posts: 11
Joined: Sun Feb 07, 2016 5:12 pm

Home Light control Raspberry PI

Sun Feb 07, 2016 5:25 pm

Well I was planning on start the home automation project using Raspberry Pi to control the lights where user is able to turn off and on, control the dimness and use sensor to switch on the light as the sun rises and sun sets. I found a lot of tutorial for the web application but so far I haven't been able to find the tutorials on android app development relating with GPIOs.

I need to develop the user interface so I chose of making the android app. But I don't know where to start. I am planning on using android studio. But I don't know which library to use? and what must be done. In a sense I am a complete beginner. I am learning stuff about it

If u could, please guide me the basic stuff. what must the project have. And how can the project work.? Which libraries to use.

I have relay switch, gpio connectors and led bulbs. Please any one that could help. It would be a lot of help. I need guidance.

Thank you

-rst-
Posts: 1316
Joined: Thu Nov 01, 2012 12:12 pm
Location: Dublin, Ireland

Re: Home Light control Raspberry PI

Mon Feb 08, 2016 11:39 am

Do you have Android running on your Raspberry Pi already or are you planing to? Or are you planning to have the UI in a mobile phone or tablet and 'remote' control the GPIO on RPi?
http://raspberrycompote.blogspot.com/ - Low-level graphics and 'Coding Gold Dust'

eternalfroast
Posts: 11
Joined: Sun Feb 07, 2016 5:12 pm

Re: Home Light control Raspberry PI

Mon Feb 08, 2016 3:51 pm

I am trying to make UI for in android so that user can use the application from the mobile to control the raspberry pi

-rst-
Posts: 1316
Joined: Thu Nov 01, 2012 12:12 pm
Location: Dublin, Ireland

Re: Home Light control Raspberry PI

Mon Feb 08, 2016 4:32 pm

Worth maybe taking a look at WebIOPi to run on Pi - could just use with Android web browser.

Otherwise it would probably need some sort of web server and a web application to control GPIO on the RPi anyway and a web client application on the Android.
http://raspberrycompote.blogspot.com/ - Low-level graphics and 'Coding Gold Dust'

scotty101
Posts: 3958
Joined: Fri Jun 08, 2012 6:03 pm

Re: Home Light control Raspberry PI

Mon Feb 08, 2016 5:01 pm

Have you considered using software that already exists like https://domoticz.com/?
Electronic and Computer Engineer
Pi Interests: Home Automation, IOT, Python and Tkinter

tawc01
Posts: 6
Joined: Mon Feb 08, 2016 1:07 am

Re: Home Light control Raspberry PI

Mon Feb 08, 2016 6:02 pm

A method that seemed to work well for me was using the Raspberry Pi as a web server.
This allows for flexible designs on the UI. Having the PI loaded with MySQL, PHP, and Apache lets you store the light states within the database. No local storage required on the viewing/controlling app, no cookies, no session variables.

Controlling the GPIO port via Python is pretty straightforward.

Good luck

eternalfroast
Posts: 11
Joined: Sun Feb 07, 2016 5:12 pm

Re: Home Light control Raspberry PI

Wed Feb 10, 2016 2:05 pm

Thank you all for you suggestions.

Return to “Java”