estoy83
Posts: 2
Joined: Mon Dec 09, 2013 3:37 pm

Re: Control Relay Switches via Android using a Raspberry Pi

Sun Nov 02, 2014 2:03 pm

Hey, I cant get the app to connect to my pi. I have a rpi b+ and followed the instructions, and when i go to myip/gpio.php it shows me the status of each gpio.
But i cant get my android to connect when i write the IP. I tried another app which managed to connect to the pi and control the relays but it doesnt have as pretty gui.
Also it seems that my relays active on low not on high, can this be changed?
Thank you.

poweredbyant
Posts: 10
Joined: Mon Dec 10, 2012 2:17 am

Re: Control Relay Switches via Android using a Raspberry Pi

Sat Nov 22, 2014 3:10 pm

try add the port in the end of url in ur mobile app e.g 192.168.0.50:80

poweredbyant
Posts: 10
Joined: Mon Dec 10, 2012 2:17 am

Re: Control Relay Switches via Android using a Raspberry Pi

Sat Nov 22, 2014 10:26 pm

I had some wonderiful news for some of you all...
controlling wall light and pirelay app in any ways e.g wall light switch turn on and using pirelay to turn off it works! but the wall switch is still on but when light is currectly off turn the wall switch off then back on the light is lit on ;)

the easy script for you to understand.....

***********************************************************************************
import os
import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BCM)
GPIO.setup(17, GPIO.IN, pull_up_down = GPIO.PUD_DOWN)
while True:
GPIO.wait_for_edge(17, GPIO.RISING)
print("Switch GPIO 18 ON")
os.system("gpio -g write 18 1")
GPIO.wait_for_edge(17, GPIO.FALLING)
print("Switch GPIO 18 OFF")
os.system("gpio -g write 18 0")
GPIO.cleanup()
****************************************************************************************
for pi relay as above is using as relay 1 on the mobile app
wall switch will be wire to raspberry pi gpio, the main live wire connect to relay unit.
using alarm 6 core wire wiring to the wall switch box, only need 3 to relay for 3.3v, GND, GPIO 18
other 2 for the wall switch will be connect to GPIO 17 with pud down diagram google it ;)

have fun and try out
Ant

booneet
Posts: 1
Joined: Sun Dec 14, 2014 7:12 pm

Re: Control Relay Switches via Android using a Raspberry Pi

Sun Dec 14, 2014 7:22 pm

Hi

Have just purchased a Pi Model B+ and am trying to install the Raspbian Wheezy with the Pi relay components onto a 8Gb SD card. The image has been written using win32diskimager. When I img file is copied to the SD card. I put the SD card into the Pi, which is connected to a TV on HDMI3. When I turn the Pi on, the TV screen just says no signal.

I have then burned a copy of Raspbian Wheezy on the same SD card and the Pi loads the operating system without any issues.

I have tried connecting the Pi to different TV's just in case but get the same result.

I appreciate that I can install the software manually, but am unclear if I would need root permission to do this?

Any help would be appreciated.

best regards

NightHawkx26
Posts: 1
Joined: Mon Dec 15, 2014 9:27 am

Re: Control Relay Switches via Android using a Raspberry Pi

Mon Dec 15, 2014 9:33 am

Hi Jazzler,
I can't control the relay via the app, but using terminal, my relay will turn on if i use 'gpio -g mode 4 out' and will turn off if I use 'gpio -g mode 4 in'.

The commands " gpio -g write 4 0" and "gpio -g write 4 1" won't have any effect on the relay.
Is there anyway I can change the code so that it will send gpio -g mode 4 out and in instead of the normal code ?
I'm still a newbie :/
your help will be appreciated

Darron.Michael
Posts: 13
Joined: Thu Sep 27, 2012 7:39 pm

Re: Control Relay Switches via Android using a Raspberry Pi

Tue Dec 16, 2014 2:08 pm

I wanted to get the GPIO pins on the Pi to generate contact closure, instead of 3.3v, so I purchased a kit from Acme Unlimited (http://store.acmeun.com/products/relay- ... -only.html). Once I assembled their little board, it accepts 5V power from the Pi and 3.3v from the GPIO as the trigger, to open/shut a 5V relay. The Part number on the bag is CIS-RELAY5V. There weren't any instructions beyond the silkscreened outlines on the board, and no photo on their website showing correct assembly, so for anyone who wants to try this, here's a photo of one correctly assembled.

Have fun!
20141216_072356.jpg
20141216_072356.jpg (53.63 KiB) Viewed 3736 times

R1200C
Posts: 2
Joined: Sun Feb 15, 2015 1:56 pm

Re: Control Relay Switches via Android using a Raspberry Pi

Sun Feb 15, 2015 2:03 pm

Hi,

As I'm going to start my first experiment with relays I wanted to use your image (the PiRelay Raspberry Pi SD Card Image) as mentioned on your site but the link doesn't work. Do you still share this image?

Have fun

Joost



djohnb
Posts: 4
Joined: Tue Feb 17, 2015 4:48 pm

Re: Control Relay Switches via Android using a Raspberry Pi

Tue Feb 17, 2015 8:56 pm

I have made up PiRelay and have purchased Pi Relay Pro to operate it.
It installed and works perfectly on my Nexus 7.
However, although downloading it several times, the settings icon does not appear on my android smartphone.
So I cannot configure it from the app.
The phone has Android Jelly Bean 4.2 installed on it.
Any ideas ?
I am still well pleased with the project though.
Derek

poweredbyant
Posts: 10
Joined: Mon Dec 10, 2012 2:17 am

Re: Control Relay Switches via Android using a Raspberry Pi

Sat Mar 07, 2015 10:56 pm

djohnb wrote:I have made up PiRelay and have purchased Pi Relay Pro to operate it.
It installed and works perfectly on my Nexus 7.
However, although downloading it several times, the settings icon does not appear on my android smartphone.
So I cannot configure it from the app.
The phone has Android Jelly Bean 4.2 installed on it.
Any ideas ?
I am still well pleased with the project though.
Derek
im surely u press bottom of screen it pop up "setting" while on the pirelay app... im on samsung s3 i press bottom left led touch button as table and two line row below... |=| ...

djohnb
Posts: 4
Joined: Tue Feb 17, 2015 4:48 pm

Re: Control Relay Switches via Android using a Raspberry Pi

Sat Mar 14, 2015 4:39 pm

Many thanks to poweredbyant.
Sorry for not replying earlier.
I never thought of tapping the bottom left button to get the settings.
Best Regards Derek

Augusto Moreira
Posts: 1
Joined: Sun Jul 26, 2015 5:24 am

Re: Control Relay Switches via Android using a Raspberry Pi

Sun Jul 26, 2015 5:28 am

Greetings. How do I access the service through an external abiente?

poweredbyant
Posts: 10
Joined: Mon Dec 10, 2012 2:17 am

Re: Control Relay Switches via Android using a Raspberry Pi

Sat Sep 05, 2015 4:45 am

Augusto Moreira wrote:Greetings. How do I access the service through an external abiente?
what u mean?

poweredbyant
Posts: 10
Joined: Mon Dec 10, 2012 2:17 am

Re: Control Relay Switches via Android using a Raspberry Pi

Sat Sep 05, 2015 4:48 am

djohnb wrote:Many thanks to poweredbyant.
Sorry for not replying earlier.
I never thought of tapping the bottom left button to get the settings.
Best Regards Derek
no problem mate just myself busy with other stuff lol

poweredbyant
Posts: 10
Joined: Mon Dec 10, 2012 2:17 am

Re: Control Relay Switches via Android using a Raspberry Pi

Sat Sep 05, 2015 5:00 am

for lazy........here shortcut for you people..

RELAY 1 = GPIO 18
RELAY 2 = GPIO 27
RELAY 3 = GPIO 22
RELAY 4 = GPIO 23
RELAY 5 = GPIO 24
RELAY 6 = GPIO 25
RELAY 7 = GPIO 04
RELAY 8 = GPIO 17

have fun and explorer ur own projects

Realitymark1
Posts: 11
Joined: Wed Sep 30, 2015 10:13 pm

Re: Control Relay Switches via Android using a Raspberry Pi

Wed Sep 30, 2015 10:16 pm

hello iv downloaded the SD download to put on the pie but when i put it in and start it, the ethernet port wont connect or the lights wont even turn on.... how can i fix that ???

jazzler
Posts: 31
Joined: Mon Nov 04, 2013 7:43 am

Re: Control Relay Switches via Android using a Raspberry Pi

Thu Oct 01, 2015 9:56 am

Realitymark1 wrote:hello iv downloaded the SD download to put on the pie but when i put it in and start it, the ethernet port wont connect or the lights wont even turn on.... how can i fix that ???
Hello - do you have a raspberry pi or Raspberry Pi2? I have not created an SD card image for the Pi2 yet as I do not own a Pi2 at the moment. You should be able to follow the instructions on a manual installation by using the latest copy of Wheezy and then following instructions at http://pirelay.jasonfindlay.com, although without owning a Pi2, or being able to test it myself yet, i cannot confirm if there are any tweaks/changes that would need to be included.

I will try making a new SD image based on the new version of Wheezy or Jessie on my Pi1, when I next get an opportunity and will post the update, perhaps then someone with a Pi2 could try it out to confirm if it works with a Pi2?
PiRelay Project : http://bit.ly/pirelay
PiRelay Play Store App : http://bit.ly/PiRelayApp

Realitymark1
Posts: 11
Joined: Wed Sep 30, 2015 10:13 pm

Re: Control Relay Switches via Android using a Raspberry Pi

Sat Oct 03, 2015 1:21 am

i tried to install the disk image you added but my pi wont even log on or actually turn on...i find it weird... please help me out

Realitymark1
Posts: 11
Joined: Wed Sep 30, 2015 10:13 pm

Re: Control Relay Switches via Android using a Raspberry Pi

Sat Oct 03, 2015 1:22 am

i have the raspberry pi 2 yes indeed. !

Realitymark1
Posts: 11
Joined: Wed Sep 30, 2015 10:13 pm

Re: Control Relay Switches via Android using a Raspberry Pi

Sat Oct 03, 2015 1:23 am

i did the manual installation but when i try to access them on my phone, it says unable to detect relay status

jazzler
Posts: 31
Joined: Mon Nov 04, 2013 7:43 am

Re: Control Relay Switches via Android using a Raspberry Pi

Sat Oct 03, 2015 6:11 am

Ok, sounds like there definitely needs to be a new disk image to cater for the pi2.

I have been testing using a new image of Raspian Jessie this morning, and I followed my instructions. It seems that in the latest version of Apache the location has moved where the gpio.php file needs to go.

Realitymark1 - I have updated the manual installation instructions, if you go back to my site (http://pirelay.jasonfindlay.com) and re do the steps under: "Create the PHP Script" you should find it now works for you.

I've created a new disk image based on Jessie and tested it working on my Pi.

I'm uploading it now and will post again when its ready to download. This should make PiRelay work with both Pi and Pi2.
PiRelay Project : http://bit.ly/pirelay
PiRelay Play Store App : http://bit.ly/PiRelayApp

jazzler
Posts: 31
Joined: Mon Nov 04, 2013 7:43 am

Re: Control Relay Switches via Android using a Raspberry Pi

Sat Oct 03, 2015 8:58 am

I have now finished uploading the new SD image (1.84GB)

This is based on the release of Raspbian Jessie which was released on 24/09/2015. This image is now compatible with both the Pi and Pi2. (Confirmed)

https://www.dropbox.com/s/lxzimsbdyt84q ... y.zip?dl=0

Apologies for the image size! My 4GB SD Card wouldn't fit the current release of Jessie, so I had to use an 8GB card to make the image.

Video Example of it working on my home setup: https://youtu.be/Ft6x_X_Cqk4
PiRelay Project : http://bit.ly/pirelay
PiRelay Play Store App : http://bit.ly/PiRelayApp

Realitymark1
Posts: 11
Joined: Wed Sep 30, 2015 10:13 pm

Re: Control Relay Switches via Android using a Raspberry Pi

Mon Oct 05, 2015 5:18 am

thank you so much for taking time to help me out i really apreciate ! .

Realitymark1
Posts: 11
Joined: Wed Sep 30, 2015 10:13 pm

Re: Control Relay Switches via Android using a Raspberry Pi

Mon Oct 05, 2015 6:29 am

i still get the unable to detect relay status issue :S

Return to “Automation, sensing and robotics”

Who is online

Users browsing this forum: No registered users and 10 guests