Raspberry Pi: how to turn on a light with your phone

แชร์
ฝัง
  • เผยแพร่เมื่อ 28 ธ.ค. 2024

ความคิดเห็น • 330

  • @TonyMacaroni69_
    @TonyMacaroni69_ 6 ปีที่แล้ว +8

    That lamp looks OASOME!

  • @PettrusSherlock
    @PettrusSherlock 10 ปีที่แล้ว +34

    The way you teach is very detailed, even giving a lesson about that exposed wire, that is a real step by step video, your channel deserves a lot more views by the way

    • @skiwithpete
      @skiwithpete  10 ปีที่แล้ว +2

      Thanks for being so kind.

    • @abcde_m1911
      @abcde_m1911 7 ปีที่แล้ว

      skiwithpete Hi, I'm interested in making a smaller version. Will the Raspberry Pi Zero W work with this?

  • @armyphillips8157
    @armyphillips8157 7 ปีที่แล้ว

    Never mind I figured it out.... But I would like to add that I have never done any programing or code before this project. By just watching the videos you put out, I have completed this project and feel very confident to do many more. You are very good at what you do and its amazing that you do these videos so people like myself can learn and complete some pretty kick ass projects. Thank you

    • @skiwithpete
      @skiwithpete  7 ปีที่แล้ว

      Thanks! I definitely appreciate the positive comments. I don't get them very often, and I'm very thankful when I do. Cheers, P

  • @Aerox90
    @Aerox90 4 ปีที่แล้ว +3

    This is a *VERY* good tutorial! 👏😃 Thank you for slowing down and going through the _details_ of what you're doing! That was really helpful for me! 🙂👍
    If you hadn't done that - then I would only know *_WHAT_* to do, but not understand *_WHY!_* So I would probably not have been able to implement the knowledge of all these components into other projects, which might need to have a slightly different setup!
    10/10 🥞 Pancakes! 😌👌

  • @irgeeksauce4165
    @irgeeksauce4165 7 ปีที่แล้ว +2

    This video is such a great tutorial. I understand everything you're doing (I'm doing something similar), but I don't know how to access the apache webpage from phone. Did I miss an explanation in the vid?

  • @fernandocampos9157
    @fernandocampos9157 9 ปีที่แล้ว

    Excellent video, i just want to know if you can put the status lights on the web (if it is on or off) as it is the first time i do this.

  • @TThomas939
    @TThomas939 10 ปีที่แล้ว +7

    This was a fantastic tutorial. I learned a lot and I am confident I could do this. Thank you.

    • @skiwithpete
      @skiwithpete  10 ปีที่แล้ว +2

      You totally should do this! Let me know how you go. And thanks for the kind words.

  • @swagatikadas4762
    @swagatikadas4762 10 ปีที่แล้ว

    sir can u please tell me the detail of the software part..hardware past is very nicely mention ...thank you

  • @fayomifashanu1840
    @fayomifashanu1840 6 ปีที่แล้ว

    Thanks for the awesome tutorial. Can one use Jump Wires to connect between the male and female connectors?

  • @sanali2524
    @sanali2524 9 ปีที่แล้ว

    nice video by the way,may i know do i have to store the codes inside one folder?

  • @SpectateMagister
    @SpectateMagister 9 ปีที่แล้ว

    Thank you so incredibly much for this video! I was trying to get my relay board to work for DAYS with no avail but this made it make sense for me :)

  • @sn6684
    @sn6684 9 ปีที่แล้ว +2

    Excellent way of explaining everything !!
    Great job man!!

  • @JCaliSwag96
    @JCaliSwag96 9 ปีที่แล้ว

    Is it possible to use this concept on a regular desk lamp? How can I connect the relay to the lamp? Would I have the cut the lamp's cord and then connect those wires to the relay? Thank you very much!

  • @Wreighn
    @Wreighn 9 ปีที่แล้ว

    At somewhere around 7:30 you mention something about not showing us the other side because its not safe to play with mains, and then you mention that the adapter the leds are using is 12V, so that makes it safe. Doesn't the relay support up to 250V? That part kind of confuses me because I might be doing doing a project for a school in the near future. The school uses manual bells connected to a button, and I intend to make an automatic one that rings in the defined times using a raspberry pi and a relay switch. Also, you have 2 dongles there. One is for WIFI, but you never mentioned what the other one is for.

    • @skiwithpete
      @skiwithpete  9 ปีที่แล้ว

      +MightKeeper 250V will kill you. 110V/250V is mains power. 12V is a much lower power, that won't kill you. The project you mention, shouldn't use mains electricity. The second dongle is for Bluetooth, that I never got working.

    • @Wreighn
      @Wreighn 9 ปีที่แล้ว

      +skiwithpete Thanks for clarifying that.

  • @julianmonroy22
    @julianmonroy22 8 ปีที่แล้ว

    How did you create the light on and off buttons in your phone, excellent project.

    • @skiwithpete
      @skiwithpete  8 ปีที่แล้ว

      The code is in the about section. :)

  • @cainejette6900
    @cainejette6900 9 ปีที่แล้ว

    Cool! I got my relay to work just like yours, but am trying to control the brightness of the same LED strip that you have there. Have you tried that before? My pulse width modulation doesn't seem to be working, the duty cycle doesn't look like it is changing!

    • @skiwithpete
      @skiwithpete  9 ปีที่แล้ว

      Caine Jette haven't tried that yet. But, keep me posted on your progress.

  • @Noble-BenChukwuma-oz4xt
    @Noble-BenChukwuma-oz4xt 6 หลายเดือนก่อน

    Can I get the configuration command for the relay switch.
    The configuration link you drooped was that of alarm setting.

    • @skiwithpete
      @skiwithpete  6 หลายเดือนก่อน

      I have a couple of relay videos with that code in it. Do a search for skiwithpete relay or I'll try to post links later.

    • @Noble-BenChukwuma-oz4xt
      @Noble-BenChukwuma-oz4xt 6 หลายเดือนก่อน

      @@skiwithpete kindly post it. Many thanks.

    • @skiwithpete
      @skiwithpete  6 หลายเดือนก่อน

      @@Noble-BenChukwuma-oz4xt th-cam.com/video/OQyntQLazMU/w-d-xo.html&ab_channel=skiwithpete

  • @boughtout
    @boughtout 9 ปีที่แล้ว

    Loved this and your other videos.
    Could you link me to a good place to read about "mains" power? Everyone says how bad it is, but I've yet to find a very good explanation as to exactly what it is, and why it's bad. Is it just bad for beginners, or are raspberry pis (the relays) not capable of working with it?

    • @skiwithpete
      @skiwithpete  9 ปีที่แล้ว +1

      boughtout Mains power is the electricity that's in your wall socket. It comes in 100~240volts depending on where you live. It's bad because it can kill. The Pi stuff says that it can handle it, but I spoke to an electrician friend of mine and he was very concerned about putting mains power through it. I tried a project that used mains and I thought I knew what I was doing. Within minutes of posting it, I was shown the mistakes I'd made and was told that I was going to kill myself. And, again, I thought I knew what I was doing... If you want to learn about Mains electricity, you should sign up for an electrician's course. They're widely available and can make your hobby a serious career. P

  • @tindy-xb6ls
    @tindy-xb6ls 10 ปีที่แล้ว

    Wow thats outstanding! What about covering the bottom of the relay breakout board with low temp hot glue as an insulator to isolate it form the bottom of the drip tray?

    • @skiwithpete
      @skiwithpete  10 ปีที่แล้ว +1

      t. indy :) The advantage to the tape and screws is, if the relay fails I can replace it. And if the relay gets hot, that could melt the glue. But.. yeah, if I didn't have a drill and I did have hot glue - I totally would have done it too.

    • @tindy-xb6ls
      @tindy-xb6ls 10 ปีที่แล้ว +1

      skiwithpete :) I've been looking for a solution for adding blue light to aid in working overnight shifts this was just the ticket! I have 2 Pi's just waiting for a job! I'll definitely share when I get em done! Thanks for the great project. Looking forward to the next ones!

    • @isabellegiuong1335
      @isabellegiuong1335 8 ปีที่แล้ว

      +skiwithpete you used a screwto attach the relay? I thought it was just a circle of tape on top of the patch of tape. Couldn't the glue for the tape also melt under the heat too?

  • @isabellegiuong1335
    @isabellegiuong1335 8 ปีที่แล้ว

    Great video ! Some questions though: Can this project be expanded to have the lights gradually light up? what about controlling the different lighting modes from the phone instead of using the remote?

    • @boulanouarahmed7664
      @boulanouarahmed7664 8 ปีที่แล้ว

      +Isabelle Giuong u can use the phone and the gradually light up either

  • @Yasinzaii
    @Yasinzaii 9 ปีที่แล้ว

    I have to built this setup and I have some Questions Regarding this Home Automation system...
    I have to Implement home automation system using Raspberry pi controlled over wifi using smart phone.....
    here are some of my questions for this Project.
    1. I want this System To control The entire home switches which will require allot of ports on the rasberry pi how should I over come it
    2. The relays will be distributed to each and every corner of house how I m gona provide power to them.
    3. If I use wires to controll each and every relay it will be a large mess how to overcome this problem..
    please sir Do Answer me.....
    Thanks :)

  • @technoprocessor
    @technoprocessor 9 ปีที่แล้ว

    Can you tell me what kind of style/brand wire stripper you used? It looks like you don't have to know the size wire your stripping to use it.

    • @skiwithpete
      @skiwithpete  9 ปีที่แล้ว

      technoprocessor hey, there's actually a link to it in the About Section. Let me know if you're having trouble finding it.

    • @technoprocessor
      @technoprocessor 9 ปีที่แล้ว

      skiwithpete Thanks, oh yea !

  • @gaviitamiiwiratma4831
    @gaviitamiiwiratma4831 8 ปีที่แล้ว

    Hey question, so do you have to use a different raspberry pi for each project? Cause i'm searching for a way to give order to one raspberry and that can give order to for instance, the lock of the house, the lights, uhm the t.v etc, but what i saw is you placed the raspberry pi in there... so do i need to use a new raspberry pi for each project? Or is there some wifi adapter to give the relay the order like on and off.... Hope to hear from you and a very good video....

    • @skiwithpete
      @skiwithpete  8 ปีที่แล้ว

      I use a raspberry per project. doesn't mean you need to. but I tend to.

    • @gaviitamiiwiratma4831
      @gaviitamiiwiratma4831 8 ปีที่แล้ว

      skiwithpete okay thank you

  • @jackwarr8718
    @jackwarr8718 9 ปีที่แล้ว

    how long did you cut the poster tube to?

  • @RbrtWlkr
    @RbrtWlkr 7 ปีที่แล้ว

    Does any power coming from the LED's power supply go into the Raspberry Pi?
    If not, could I use a higher rated relay to control powerful devices?

  • @tractix5379
    @tractix5379 10 ปีที่แล้ว

    Hello! Nice tutorial! But the problem is i still dont understand in what GPIO pins you did connnect the relay! Please tell me what pins they are (pin 1) or a close photo to gpio pins

    • @tractix5379
      @tractix5379 10 ปีที่แล้ว

      And olso to what pins you connected the relay by gpio

    • @skiwithpete
      @skiwithpete  10 ปีที่แล้ว

      Coolcraftteam comunity
      This will help you: th-cam.com/video/Z2B67hybdAA/w-d-xo.html

    • @tractix5379
      @tractix5379 10 ปีที่แล้ว

      skiwithpete thank you!

  • @matt.squarebody5427
    @matt.squarebody5427 8 ปีที่แล้ว +1

    How do you run the PHP code?

  • @abdalleali5005
    @abdalleali5005 3 ปีที่แล้ว

    Hi when you talk about not using mains power do you mean the wall plugs? How can I try this project without using mains power?

    • @skiwithpete
      @skiwithpete  3 ปีที่แล้ว

      I use a 12v light. So I'm interrupting 12v, not 120v and definitely not 240v.

    • @abdalleali5005
      @abdalleali5005 3 ปีที่แล้ว

      @@skiwithpete oh so you mean don't just plug into an outlet and instead interrupt it?

    • @skiwithpete
      @skiwithpete  3 ปีที่แล้ว

      @@abdalleali5005 Interrupt the lower power.

  • @michaelholden2211
    @michaelholden2211 7 ปีที่แล้ว

    Do you have two power cords(one for the lamp and one for the pi)? or is there a way you can power the pi with the lamp power?

    • @skiwithpete
      @skiwithpete  7 ปีที่แล้ว

      I have 2 power cords. And there's two parts to the story. I could run both off the draw of the 12V, but then I'd need a more powerful 12V supply. Or I could run a 12V extension cable into the base and separate the power there... but in the end, I just went for quick + cheap + easy and ran two cables in. I like your thinking tho. Let me know how you solve it.

  • @77gawryl
    @77gawryl 10 ปีที่แล้ว

    Good job, nice tutorial. I'm wondering... can you safely disconnect and reconnect the relay when RPi is switched on? I've heard that a RPi's GPIO is kinda sensitive and easy to damage... so? Should I shut down my RPi before reconnect the relay or not?

    • @skiwithpete
      @skiwithpete  10 ปีที่แล้ว

      77gawryl you absolutely should shut down your pi. There might be a sequence that wouldn't harm the pi while it is on, but I still wouldn't do it.

    • @77gawryl
      @77gawryl 10 ปีที่แล้ว

      skiwithpete so let’s make it clear- should I olways shut down the Pi when I connect/disconnect something to tge GPIO? Or it's only related to the relay? (to be honest: I've plugged many times Dallas 18b20 thermometer when my RPi was operating, without any harm to it!)

    • @skiwithpete
      @skiwithpete  10 ปีที่แล้ว

      77gawryl
      And I've done the same. But, I wouldn't say it was safe. Like, sometimes I swim after eating - but I know I'm not supposed to.

  • @miteshlakhwani
    @miteshlakhwani 9 ปีที่แล้ว

    can i use arduino in place of RPI?? please suggest some detailed guide thank you for wonderful video

  • @dimasadityamurthi5832
    @dimasadityamurthi5832 9 ปีที่แล้ว

    Hi, I watched your video and it is awesome. But i have a question. I clicked on the relay link and i found that it was 5 VDC relay. So far that I know, raspberry produces 3.3 VDC for the output. How can raspberry drives the relay?

    • @skiwithpete
      @skiwithpete  9 ปีที่แล้ว

      dimas adityamurthi The Raspberry Pi has a 5V power source on the GPIO rail (pin2 and pin4). This other video I made might help. th-cam.com/video/oaf_zQcrg7g/w-d-xo.html

    • @dimasadityamurthi5832
      @dimasadityamurthi5832 9 ปีที่แล้ว

      skiwithpete I saw it. I guess the relay board uses transistor or MOSFET so that relay can be activated using 5 VDC instead of 3.3.Thank you. :) i really enjoy your video

    • @dimasadityamurthi5832
      @dimasadityamurthi5832 9 ปีที่แล้ว

      skiwithpete I saw it. I guess the relay board uses transistor or MOSFET so that relay can be activated using 5 VDC instead of 3.3.Thank you. :) i really enjoy your video

  • @Avasterable
    @Avasterable 10 ปีที่แล้ว

    Awesome video! Will try this as soon as my Pi arrives!

    • @skiwithpete
      @skiwithpete  10 ปีที่แล้ว +1

      Cool, let us know how you go!

  • @iBoBPS3
    @iBoBPS3 8 ปีที่แล้ว

    I'd like to do this with the 4 relay board and 4 different lights. Is this possible?

  • @Somomdotdk
    @Somomdotdk 9 ปีที่แล้ว

    Hey! Cool video :) Is there any way to connect the relay and the pi wirelessly? I'm thinking if I want to use the same Pi for controlling more than one device? :)

    • @skiwithpete
      @skiwithpete  9 ปีที่แล้ว

      there are wireless relays but they tend to be quite expensive. however you might choose pi zeros to control the relay and have one pi control them all...

    • @Somomdotdk
      @Somomdotdk 9 ปีที่แล้ว

      Thanks for the reply! I like the idea - one Pi to rule them all :) zero's seem affoardable enough.

    • @steveleis3288
      @steveleis3288 8 ปีที่แล้ว

      try looking at tosr, google it.

  • @RosevirCeballosJr
    @RosevirCeballosJr 9 ปีที่แล้ว

    Do you have a tutorial using a programmed app not on a browser? Thanks!

  • @marianbendik7142
    @marianbendik7142 10 ปีที่แล้ว

    I really love this project ! Helped a lot! Thank you! By the way didn't you forget put CSS into desc?

  • @DerekDickerson
    @DerekDickerson 10 ปีที่แล้ว

    Peter Gosselin
    Do you have the link for the puzzle light?

    • @skiwithpete
      @skiwithpete  10 ปีที่แล้ว

      Derek Dickerson Link to the Puzzle Light: amzn.to/1tr2lQE I bought 2X30packs to make my size of light.

    • @WTma0812
      @WTma0812 10 ปีที่แล้ว

      skiwithpete How can I puzzle that to a tower? I think the product is a ball.

    • @skiwithpete
      @skiwithpete  10 ปีที่แล้ว

      WTma0812
      It's just how you put it together. Here's a link for the cylinder shape I went for th-cam.com/video/YP_YLcYEcoc/w-d-xo.html BUT, there's lots of vids like this, you can make all sorts of shapes!

  • @akshaysk111
    @akshaysk111 9 ปีที่แล้ว

    hi dude my name is akshay ... can pls tel the me the steps like on how exactly did u connect ur phone to the system......and help me out i m using windows 10 ,.....i really need ur help.......i m doing a project....soo i want your help......

  • @be_mesmith8651
    @be_mesmith8651 9 ปีที่แล้ว

    Hi,i'm planning to make one of this in my house as my school project,can i have the drawing for the schematic circuit? Because i still cannot get how to connect all the device

  • @adampzakaria
    @adampzakaria 3 ปีที่แล้ว

    Turned out so well! Nice! Thanks for the explanation :)

  • @gabrielefollesa3150
    @gabrielefollesa3150 10 ปีที่แล้ว

    In my opinion the best tutorial for raspberry beginners..but can you give me an help for the code? the tutorial is perfect for the hardware side but software side? what i have to do with the python code and apache?? sorry but i really want to try this project

    • @skiwithpete
      @skiwithpete  10 ปีที่แล้ว

      Gabriele Follesa The code is in the About Section. Start by putting the python code in the /home/pi folder and run it with the command sudo python lighton_1.py the instructions for Apache are in the "Raspberry Pi Packages" link. Cheers, P

    • @gabrielefollesa3150
      @gabrielefollesa3150 10 ปีที่แล้ว

      skiwithpete thanks for the quickly reply..but i have to create a **.php file with the php code and put it on the phone right? is there any control to check if the phone is comunicating with the raspberry or not? because i have already created the 2 py file and the php file. thanks again in advance

    • @skiwithpete
      @skiwithpete  10 ปีที่แล้ว

      Gabriele Follesa you put the php code in index.php in the /var/www folder on the pi. You put nothing on the phone. You're building a webserver on the pi. And you're accessing it through the phone...

    • @gabrielefollesa3150
      @gabrielefollesa3150 10 ปีที่แล้ว

      skiwithpete Hello, sorry if I stressed you again :) ..but I've mounted the the relay in this way: VCC in pin #2, GROUND in pin # 6 and IN in pin# 5 like this scheme (raspilab.files.wordpress.com /2014/08/gpiosb.png) and as us showed in your other video.
      However, the relay remains with the two LEDs always on even if I press Lighton or lightoff from php page accessed through apache. I've already launched the python code as you suggest.
      Can you give me a hand to fix?
      Thanks in advance as always

    • @skiwithpete
      @skiwithpete  10 ปีที่แล้ว

      Gabriele Follesa
      In the lighton_1.py and lightoff_1.py change pinList=[3]
      Because pin#5 on the board is GPIO3. So you need to make that change.
      This morning I posted another video about relays. You should check that out. th-cam.com/video/OQyntQLazMU/w-d-xo.html

  • @wienerschnitzelwienerschni194
    @wienerschnitzelwienerschni194 9 ปีที่แล้ว

    witch pins you use for the gpio on the pi

  • @sameerbhagwat6582
    @sameerbhagwat6582 9 ปีที่แล้ว

    thank you very much skiwithpete.....
    But I want to do it with 230volt. sowhat should I do?
    and where will i get that relay...

    • @skiwithpete
      @skiwithpete  9 ปีที่แล้ว

      Sameer Bhagwat 230V can kill. Don't do it.

    • @sameerbhagwat6582
      @sameerbhagwat6582 9 ปีที่แล้ว

      Thanks for reply
      But I want to control all the home appliances on that. So is there any option to do that?

    • @skiwithpete
      @skiwithpete  9 ปีที่แล้ว

      Sameer Bhagwat As far as I know there isn't a safe way to do this yet. But be sure to subscribe, because as soon as there is, I'll be posting in my channel. Best, P

  • @rosebechtel8366
    @rosebechtel8366 9 ปีที่แล้ว

    Is there a component that I can add to brighten and dim an LED strip(s) light timed with your "alarm clock feature" using a 4 way relay and timed music components to a speaker system?

    • @skiwithpete
      @skiwithpete  9 ปีที่แล้ว +1

      +Rose Bechtel You can use Pulse Width Modulation (PWM) to control the lights. But I haven't tried it yet. Let me know how you go. P

  • @badhackers
    @badhackers 9 ปีที่แล้ว

    can you make a video about the coding part, as most of us don't have a strong programming background.

    • @skiwithpete
      @skiwithpete  9 ปีที่แล้ว +1

      noroz k Hey, I made it so it's copy and paste - all the code is in the about section... But you're right, this isn't really as beginner friendly a video as you are looking for. Maybe try checking out my 4-channel relay video: th-cam.com/video/OQyntQLazMU/w-d-xo.html or even better, start with my alarm clock th-cam.com/video/julETnOLkaU/w-d-xo.html

  • @WolverineAndSloth
    @WolverineAndSloth 4 ปีที่แล้ว

    Is there a way to control the color of the lights as well?

    • @skiwithpete
      @skiwithpete  4 ปีที่แล้ว +1

      Pwm. I haven't gotten into it yet. But yes it's possible with pwm.

  • @cliffordecusmaxamus
    @cliffordecusmaxamus 10 ปีที่แล้ว

    hi pete, all your tutorials are put together very well and easy to follow but i am stuck on the php file,I loaded the Raspberry Pi instructions for Apache ok and had no problems, the lighton and lightoff scrips switch the relay on/off in the terminal with the sudo command ok but when i go to var/www i find the index,html file but cannot put the php code into it can you advise..............rgards cliff

    • @skiwithpete
      @skiwithpete  10 ปีที่แล้ว

      Cliff Torrance you need root privileges to change the stuff in that file. Look in the toolbar of PCmanFM (the file explorer) to view current directory as root. That will let you copy files. And don't forget if you do paste it into index you need to change the extension to .php

    • @cliffordecusmaxamus
      @cliffordecusmaxamus 10 ปีที่แล้ว

      is there any other way to finish the job...............regards

    • @skiwithpete
      @skiwithpete  10 ปีที่แล้ว

      Cliff Torrance sudo nano /var/www/index.php

    • @cliffordecusmaxamus
      @cliffordecusmaxamus 10 ปีที่แล้ว

      skiwithpete Hi Pete, thanks for the fast reply the info was spot on and all is working well, I have the same 8 relay board that runs our internal lights if we are away from home :-bedroom, landing1, landing2, bathhroom, wc all set up with crontab and works well. Now relay 6 will switch 4x external lights [1.5kW] with my mobile and ipad on my local network thanks to you.So i will have to set up my raspberry in my router to control the external lights from any where, thanks again..........................regards cliff

    • @skiwithpete
      @skiwithpete  10 ปีที่แล้ว

      Cliff Torrance You're very welcome. Just remember - don't play with mains. Get a certified pro in to do that...

  • @theluisanator
    @theluisanator 8 ปีที่แล้ว

    rather then making a wifi button can, you make a touch screen button attached the the raspberry pi? how involved would it be,

    • @stuff662
      @stuff662 8 ปีที่แล้ว

      +Luis Valenzuela You could just attach a touch screen, use the web browser on the pi and open it to the internet page, and boom

  • @MoparRebellion
    @MoparRebellion 7 ปีที่แล้ว

    Hi there! I followed your directions as absolutely closely as possible and I cannot get anything to occur when I press the buttons on the webpage. Any suggestions on how to get diagnostic output so I can troubleshoot?

    • @skiwithpete
      @skiwithpete  7 ปีที่แล้ว

      Alex did you rename html to php? Did you change the permissions? Does it point to the right directory? Those are common mistakes

    • @MoparRebellion
      @MoparRebellion 7 ปีที่แล้ว

      Thank you for a very fast reply. I did change the paths and did the modification to the sudoers file. However I think I found my issue in that I didnt rename to index.php instead of index.html

    • @syedumaidahmed6295
      @syedumaidahmed6295 7 ปีที่แล้ว

      Sir, could you please explain these three tasks given to Alex in a little detail.
      I couldn't get your point.
      I'm desperately working on this project

  • @DoctorSchnell
    @DoctorSchnell 9 ปีที่แล้ว

    Hello, I don't know if you'll see this as the video is old'ish. But, I was wondering if I could use the relay that i got to control a lamp rated at 20 watts and 120v. I know you say not to use mains, but from what I've seen, it seems like you're referring to 220-230v and not 120v. Is there a way to use this with 120v?

    • @skiwithpete
      @skiwithpete  9 ปีที่แล้ว

      ***** I am referring to 120V. 120V is mains electricity. Start small. Start with a 12V lamp like I did. Mains can kill.

    • @denton3737
      @denton3737 9 ปีที่แล้ว

      +Caleb Schnell He's not saying that the relay won't work with it... because it will. He's saying to not do it for your own safty. If you feel comfortable doing this, and know what you're doing, the equipment will handle it.

    • @skiwithpete
      @skiwithpete  9 ปีที่แล้ว

      +Denton Melvin Actually, the equipment MIGHT handle it. I don't know. Some will, some won't.

    • @DoctorSchnell
      @DoctorSchnell 9 ปีที่แล้ว

      The equipment does handle it. I used it for a while with a 120v desklamp I had. I didn't really care for having 120v going through a relay like that, even if it's rated for 220v. So I purchased some LED lights and fitted it for my lamp, they're rated at around 6v which is quite nice.

    • @skiwithpete
      @skiwithpete  9 ปีที่แล้ว

      +Caleb Schnell You're referring to one you have in particular - not to all of them in general - which is what I was trying to make clear.

  • @elliotpayne
    @elliotpayne 9 ปีที่แล้ว

    do you have to run both programs lights on and lights on?
    thanks

    • @skiwithpete
      @skiwithpete  9 ปีที่แล้ว

      +Elliot Payne ? Don't think I understand the question.

    • @elliotpayne
      @elliotpayne 9 ปีที่แล้ว

      I meen lights on and lights off .py

    • @skiwithpete
      @skiwithpete  9 ปีที่แล้ว

      +Elliot Payne you could run lights on .py and then when you want to turn it off, have lights on .py quit. But that's up to you

    • @elliotpayne
      @elliotpayne 9 ปีที่แล้ว

      Thanks you are very helpful !!!

  • @simonjames9708
    @simonjames9708 8 ปีที่แล้ว

    which pins do you connect from the gpio to relay?

    • @steveleis3288
      @steveleis3288 8 ปีที่แล้ว

      if you are counting pins it is pin10, or gpio15 aka rxd. find a gpio 40pin reference (google).

    • @simonjames9708
      @simonjames9708 8 ปีที่แล้ว

      yeah it's okay, i sussed it soon after. Brilliant tutorial. Wrapped lights around a pringles can.lol Got some css styling for the buttons although now I'm thinking a nice toggle switch would look sweeter.

    • @SeeJaysPlace
      @SeeJaysPlace 8 ปีที่แล้ว

      Change the BCM to BOARD and just put what pin # you want I use 40 in the py file

  • @indianboy1998
    @indianboy1998 8 ปีที่แล้ว +1

    Hi could someone help me, the relay turns on when you execute the Python files, but when I go to the web page the command goes through (little green light on board) but nothing happens to the relays

  • @madgetrix
    @madgetrix 9 ปีที่แล้ว

    Thank you... finally some one who made this easy enough for me to understand...=) and with some nice and easy code..=)

  • @mattplitnikas7747
    @mattplitnikas7747 9 ปีที่แล้ว

    Fantastically detailed video. I'm going to pretty much clone this project so thanks. :)

    • @skiwithpete
      @skiwithpete  9 ปีที่แล้ว

      +Matt Plitnikas Cool, keep me posted on your progress!

  • @linushg55
    @linushg55 9 ปีที่แล้ว

    Is there any guide on the code i am not that good at coding

  • @djslimshady
    @djslimshady 9 ปีที่แล้ว

    skiwithpete
    i have some questions
    1. see on your raspberry pi what operating system and can you link me to which one so i can run it on mine.
    2. for the raspberry pi what power does it need ? to power up ? can a 12v power it ?

    • @denton3737
      @denton3737 9 ปีที่แล้ว +1

      +Shadi 1 The Raspberry Pi is powered with 5V only. If you put 12V to it you will blow it up.

  • @Kasador
    @Kasador 6 ปีที่แล้ว

    You need to update your video. Almost all the links given in the description and even your PHP code are dead links. Thought it was a super cool project you did and really wanted to follow along. I'll just have to find and buy the newer parts. Tutorial and concept stays the same, so that's nice. It would just be convenient to have links that worked is all.

    • @skiwithpete
      @skiwithpete  6 ปีที่แล้ว +1

      Updated with a GitHub link. Thanks for letting me know it wasn't working.

    • @Kasador
      @Kasador 6 ปีที่แล้ว

      Wow! I really appreciate the fast response! The GitHub link was exactly what I was looking for!

  • @peterrajnoha7957
    @peterrajnoha7957 9 ปีที่แล้ว

    Hello, how can i instal my rasberry pi for automatic home. Could you show me or send me link?

  • @sathvikbalappagari9048
    @sathvikbalappagari9048 9 ปีที่แล้ว

    is there any app ???
    then who to get switch display in our phone

  • @rodrigomonney
    @rodrigomonney 7 ปีที่แล้ว

    how many reles can I connect on one raspberry?

  • @Kasador
    @Kasador 6 ปีที่แล้ว

    Could you please provide us with the PHP code. Thanks!

  • @slimanalfantazi4831
    @slimanalfantazi4831 7 ปีที่แล้ว

    Im not sure if you gonna read this but i have followed every step but im stuck in this problem were both codes are turning the lights on and none of them can turn it off any idea why i really need help :(

  • @wilsonyoung9814
    @wilsonyoung9814 3 ปีที่แล้ว

    how did you connect your raspberry pi to your cellphone??

  • @jameshill9854
    @jameshill9854 7 ปีที่แล้ว

    it would be good to see a video of your doing to code work as for me the set up is easy its just the coding i struggle with :-(

    • @skiwithpete
      @skiwithpete  7 ปีที่แล้ว

      The code is in the "About Section" so you can grab it and take a look.

  • @arjunbemarkar8374
    @arjunbemarkar8374 8 ปีที่แล้ว

    what happens if I connect the relay to the wall and to the light.

  • @svst9089
    @svst9089 4 ปีที่แล้ว

    What will happen if you turn on the light by your phone, but turn it off with remote control? Is there any way to detect it by the relay, send a request by the WiFi dongle and then manage it on the server side?
    For example:
    I want to control the light by the mobile app and by the remote control. I won't have 2 buttons like you. I want to create a switch bar. I turn on the light by the phone (switch swipes to the right, makes itself green). Then I turn it off by remote control, not by the phone (server detects it and update my mobile app state - switch swipes to the left and makes itself gray)

  • @AbdulAzeez-lc4br
    @AbdulAzeez-lc4br 9 ปีที่แล้ว

    What us the Raspberry pi OS you use in this ?

    • @skiwithpete
      @skiwithpete  9 ปีที่แล้ว

      Abdul Azeez raspbian

  • @azbyman
    @azbyman 10 ปีที่แล้ว

    I'm pretty new to the whole Raspberry Pi thing, but so far I have been able to run the Lighton_1.py program and turn the light on the relay on, but it didn't turn the 12V lights on. Any ideas? Also, my Lightoff_1.py didn't seem to work as the relay light just stayed on. Thanks!

    • @skiwithpete
      @skiwithpete  10 ปีที่แล้ว

      Ryan Washburne if the relay is coming on, but the light isn't then you've wired the front incorrectly. If lightoff_1.py doesn't work then there must a pin number problem in the code - check that they're both the same...

    • @azbyman
      @azbyman 10 ปีที่แล้ว

      skiwithpete Hi again. I've included an imgur album showing the wiring of my pi and the relay. The problem I am still facing is being able to run the Lighton_1.py script and having the lights turn on, but when I run Lightoff_1.py, nothing happens. Thank you again! imgur.com/ZlKf9b4,HfIrUx0

    • @skiwithpete
      @skiwithpete  10 ปีที่แล้ว

      Ryan Washburne
      Image 1) you have put the connection to the relay in GPIO 15. Be sure that pinList = [15] on BOTH scripts. The only difference between Lighton_1.py and Lightoff_1.py should be Line19. Otherwise they should be identical.
      Image 2) Looks correct. My instinct says this is an issue you have with the scripts.

  • @techjuvi8910
    @techjuvi8910 9 ปีที่แล้ว

    dumb question here.... What do you mean by "dont play with mains".
    Are you saying this system isn't right for using your main house wiring?

    • @skiwithpete
      @skiwithpete  9 ปีที่แล้ว

      Byte Deez yeah, your house wiring is very strong and can kill. Stick with lower voltages like this example which uses 12V.

  • @kashg482
    @kashg482 7 ปีที่แล้ว

    Any instruction on setting up the web UI?

    • @skiwithpete
      @skiwithpete  7 ปีที่แล้ว

      Kash green code is in the about section

  • @zapnode
    @zapnode 7 ปีที่แล้ว

    Help! Everything works except the html code. If I execute the .py files as standalone they turn the LED on and off.
    The buttons display if put the entire code of lpaste.net/raw/113783 into an .html file. What am I doing wrong
    if I am not getting the buttons to exec the python files?

  • @be_mesmith8651
    @be_mesmith8651 9 ปีที่แล้ว

    skiwithpete you are using two female jumper right?but which gpio pins in raspberry pi that you use?it is not very clear

    • @skiwithpete
      @skiwithpete  9 ปีที่แล้ว

      Female to female jumpers yes. GPIO15.

    • @be_mesmith8651
      @be_mesmith8651 9 ปีที่แล้ว

      skiwithpete means that both female jumper connected to GPIO15??

    • @skiwithpete
      @skiwithpete  9 ปีที่แล้ว

      +5V, GND, and GPIO15
      try this vid: th-cam.com/video/Z2B67hybdAA/w-d-xo.html
      or: th-cam.com/video/oaf_zQcrg7g/w-d-xo.html

    • @be_mesmith8651
      @be_mesmith8651 9 ปีที่แล้ว

      skiwithpete you means two pins from +5V that is GROUND & GPIO15 right?

    • @skiwithpete
      @skiwithpete  9 ปีที่แล้ว

      No. 3 wires are connected. 1) +5V 2) GND 3) GPIO15.
      Hope this helps,
      P

  • @usaboxer2006
    @usaboxer2006 8 ปีที่แล้ว

    Skiwithpete, I have used all the links in this and the 4 channel video for the apache2 and python programs. I put the text in for the sudoer. The program runs fine when I use SSH and run it in python. On the webpage, the buttons are there, but when I click I get the below error:
    405 Not Allowed
    nginx/1.6.2Any ideas? I did not add permissions to the Apache and cannot figure out how (I thought switching the sudoer would alleviate that?)

    • @skiwithpete
      @skiwithpete  8 ปีที่แล้ว

      no, you still need to change permission

    • @usaboxer2006
      @usaboxer2006 8 ปีที่แล้ว

      Do you have the text and location for that? I am finding conflicting info on the web

  • @joelfavia
    @joelfavia 6 ปีที่แล้ว

    Is that ordinary motor relay?..

  • @blacklabelinc.6059
    @blacklabelinc.6059 10 ปีที่แล้ว

    What is the second USB on the Pi? The first one is WIFI, second bluetooth?

    • @skiwithpete
      @skiwithpete  10 ปีที่แล้ว

      Kurt Schoeps Yeah, the second one is bluetooth. Have you been following my alarm clock project? I intend to switch to bluetooth speakers in the near future and I've been experimenting recently.

  • @keym2252
    @keym2252 4 ปีที่แล้ว

    How do you get the software for your phone to connect?

    • @keym2252
      @keym2252 4 ปีที่แล้ว

      Like what I mean by that is how did you get it because I don’t understand how to connect phone to pi

    • @skiwithpete
      @skiwithpete  4 ปีที่แล้ว

      @@keym2252 one answer is, it's a webpage hosted on the pi. The other is about static IP address on your router.

  • @PhuongLe-sh7gb
    @PhuongLe-sh7gb 9 ปีที่แล้ว

    is this possible to do this one with pi B+

  • @leuuon
    @leuuon 7 ปีที่แล้ว +1

    Great tutorial! Subscribed.

  • @kenfmreinhart4203
    @kenfmreinhart4203 7 ปีที่แล้ว

    the php wont work pete, the php file supposed to be in the /var/www/html directory right? changing the index.html...

  • @SathishKumar-mw5pl
    @SathishKumar-mw5pl 8 ปีที่แล้ว

    good., i want this led strip how to i pay it?

    • @skiwithpete
      @skiwithpete  8 ปีที่แล้ว

      +Sathish Kumar amzn.to/1VYgSCM

  • @page_394
    @page_394 8 ปีที่แล้ว

    hi, when i pres the buttons nothing happens but the python code works as i have tested it on terminal , how should i triubleshoot

    • @page_394
      @page_394 8 ปีที่แล้ว

      where do i put the php code and should there be another html file or just that

    • @GuilhermeDuarte99
      @GuilhermeDuarte99 8 ปีที่แล้ว

      I have same problem

  • @vaibhavpal2927
    @vaibhavpal2927 6 ปีที่แล้ว

    Can you please provide circuit diagram?

  • @tianli6552
    @tianli6552 9 ปีที่แล้ว

    hello skiwithpete,
    i have put the PHP code in "nano /var/www/index.html".
    everything works fine.
    i have a lighton and lightoff button on my webpage,
    but when i press on or off nothings happing on my relayboard.
    can you please help me out here?
    what might the problem be?

    • @skiwithpete
      @skiwithpete  9 ปีที่แล้ว

      +Tian Li you need to rename index.html to index.php

    • @tianli6552
      @tianli6552 9 ปีที่แล้ว

      Still nothing.
      Where do i need to put the php code?

    • @skiwithpete
      @skiwithpete  9 ปีที่แล้ว

      +Tian Li in index.php

    • @tianli6552
      @tianli6552 9 ปีที่แล้ว

      +skiwithpete u mean this command "nano /var/www/index.php"
      if it is that then i've already done that
      and notings happening

    • @skiwithpete
      @skiwithpete  9 ปีที่แล้ว

      +Tian Li put a "sudo" in front of it

  • @djslimshady
    @djslimshady 9 ปีที่แล้ว

    hello i got the web page up and all running but when i run the lighton_1.py it works but when i press the other off button nothing happens maby something to do with the quit

  • @nidharshinikallakula2112
    @nidharshinikallakula2112 5 ปีที่แล้ว

    Can I get the code of the above project

    • @skiwithpete
      @skiwithpete  5 ปีที่แล้ว

      It's in the about section

    • @nidharshinikallakula2112
      @nidharshinikallakula2112 5 ปีที่แล้ว

      @@skiwithpete I am getting the code for alarmpi project

    • @skiwithpete
      @skiwithpete  5 ปีที่แล้ว

      You're right, as it was part of that project, it eventually upgraded, and the code you're looking for is just a part of this... but alas. Here's what you need: github.com/skiwithpete/sesamepi - this is the same code, but adapted for a garage door. The only difference, with this code is that it has a 0.5second duration. You'll just want to comment out that part of the code, so that the light stays on.

  • @matt.squarebody5427
    @matt.squarebody5427 8 ปีที่แล้ว

    I'm unable to open it in nano tho. It wont let me.

  • @iPhoneMouth
    @iPhoneMouth 8 ปีที่แล้ว

    Does anyone know how I'd go about making an iOS app to control the lights?

  • @omaralfarouqalfazazi9352
    @omaralfarouqalfazazi9352 9 ปีที่แล้ว +1

    Hi there. . I would like to control my house by mobile phone from "large distance" by sending messages using normal network , what can I do? !

    • @skiwithpete
      @skiwithpete  9 ปีที่แล้ว

      Omaralfarouq Alfazazi put your Home Raspberry Pi on the public network. Put a password on your page, but you can then control it from anywhere you can access the internet.

    • @omaralfarouqalfazazi9352
      @omaralfarouqalfazazi9352 9 ปีที่แล้ว

      Thank you very much
      Can you show me from where I can get more information about how to do this from zero , also if you have your own vedios talking about these staffs

    • @skiwithpete
      @skiwithpete  9 ปีที่แล้ว

      Omaralfarouq Alfazazi I don't currently have a video about this - but I do plan on making one. It's on my list - I just haven't done it yet. I don't know where to look because every modem is different... Basically, it's all done on your modem/router. First you need to make your Raspi static. Then you want to do portforwarding, so that incoming requests go to your pi. then you want to sign up to a service like dyndns (just google it). There's a number of steps - and you need to figure your router out - but it can be done.

    • @omaralfarouqalfazazi9352
      @omaralfarouqalfazazi9352 9 ปีที่แล้ว

      Thanks a lot 😊 .. if I get anything new or facing any problems, l'll contact you " of course if you don't have any problem with that " thanks again

  • @TheMagicboy1993
    @TheMagicboy1993 9 ปีที่แล้ว

    When i click the light on button on the web nothing happens. May i know why please help me!

  • @kdhar
    @kdhar 9 ปีที่แล้ว

    Excellent video. Subscribed.

  • @jeffiejohn
    @jeffiejohn 10 ปีที่แล้ว

    Amazing tutorial bro...Thanks!

  • @oceannegracovetsky6490
    @oceannegracovetsky6490 8 ปีที่แล้ว

    Hello,
    I am able to open my light with a sudo command but I cannot open it from my web site. When I click on the button "light on" on my web site, the raspberry led flickers but the lamp does not turn on. What ca I do to find my mistake? Thank you.

    • @skiwithpete
      @skiwithpete  8 ปีที่แล้ว

      +Katherine G Did you rename the file .html to .php? Does the php point to the right place?

    • @skiwithpete
      @skiwithpete  8 ปีที่แล้ว

      +Katherine G Did you rename the file .html to .php? Does the php point to the right place?

  • @matt.squarebody5427
    @matt.squarebody5427 8 ปีที่แล้ว

    Is there way to also control colors and settings from the phone? Because whats the point of doing all this just to turn something on and off and not anything else. And if there isnt a way currently is it even possible?

    • @skiwithpete
      @skiwithpete  8 ปีที่แล้ว +1

      Look for PWM - pulse width modulation.

    • @matt.squarebody5427
      @matt.squarebody5427 8 ปีที่แล้ว

      skiwithpete Can you PM me? You have some cool projects and i want to try some in fact im placing an order on this light and everything tonight. I'm new to Raspberry PI i have the 3 and would like to get some help and you seem to really know what you're talking about.

    • @skiwithpete
      @skiwithpete  8 ปีที่แล้ว

      Sorry, I get dozens of requests per day like this. Unfortunately, I can't act like a Raspberry Pi tutor. Watch my channel, learn and discover. Ask questions... but sorry, I can't PM.

    • @matt.squarebody5427
      @matt.squarebody5427 8 ปีที่แล้ว

      I understand man and well than quick question how'd you set up the server from your phone to the Raspberry Pi

    • @skiwithpete
      @skiwithpete  8 ปีที่แล้ว

      Setup the webserver on the Raspberry Pi, point your phone's browser to the webserver. Check the about section for how to setup an Apache Server.

  • @sunnysidegardeners7163
    @sunnysidegardeners7163 7 ปีที่แล้ว

    Hi,
    I followed the code build as per your instructions. now when I press the light on the relay switches over fine, press Light off and nothing happened, the relay is still on!?
    any further info would be greatful
    Thanks

    • @sunnysidegardeners7163
      @sunnysidegardeners7163 7 ปีที่แล้ว

      No help from the community then!

    • @skiwithpete
      @skiwithpete  7 ปีที่แล้ว

      I think you need to be more specific in your feedback. I followed it, and it doesn't do what it's supposed to... isn't very helpful.

    • @sunnysidegardeners7163
      @sunnysidegardeners7163 7 ปีที่แล้ว

      My apologies if my explanation dose not come across well..
      I installed all the relevant code for the light on/off project as per say. The issue I seem to have is when I press the "Light On" from the web browser my relay turns on and I have around 3 volts present at the GPIO pin. now when I press the "Light Off" button the relay dose not switch back, the relay's green LED is still on. I measured the voltage at the GPIO pin in the OFF state and its gone low to 0v, this i beleave also to be correct?
      The relay I'm currently using is JQC-3FF-S-Z. I'm supplying the relay with a constant 5v with plenty of amps from an external PSU and NOT from the Raspberry Pi's 5v rail.
      I've tried several GPIO pins with the same result as above.
      Any further help/info would be gratefully received on this.
      Raspberry Pi 1 B
      latest Rasbian Jessie installed and all relevant updates/packages

    • @skiwithpete
      @skiwithpete  7 ปีที่แล้ว

      Check the code.

    • @sunnysidegardeners7163
      @sunnysidegardeners7163 7 ปีที่แล้ว

      skipwithpete, i have, over and over again. I'm no coding expert, but it all matches that off what you have links too! as i copied and pasted the code into my .py files. both On/Off files are saved in /home/pi. both files have the correct permissions granted, and to any of the other relevant code/files.
      Regards

  • @TheSuburban15
    @TheSuburban15 2 ปีที่แล้ว

    I think most people would have probably cut the 12V power supply connector off and wired the relay in, instead of making the inline dongle thing, but whatever.
    That appears to be the leftover tube from a roll of kraft paper, BTW. We go through a lot of it.

  • @michas.2475
    @michas.2475 4 ปีที่แล้ว

    could i acess it from anywhere on the world?

    • @skiwithpete
      @skiwithpete  4 ปีที่แล้ว

      If you expose your network to the internet - which I don't recommend.

    • @michas.2475
      @michas.2475 4 ปีที่แล้ว

      @@skiwithpete ohh well alright , could i somehow make it private and acessible only by me but make it safe?

    • @skiwithpete
      @skiwithpete  4 ปีที่แล้ว

      @@michas.2475 There are tunneling softwares, but none that I use or am familiar with.

  • @AndrewIsCute7
    @AndrewIsCute7 9 ปีที่แล้ว

    Sorry to bother you but we need help running the light on and light off files when we try running them it gives us a warning message "runtimewarning: a physical pull up resistor is fitted on this channel GPIO.setup(i, GPIO.OUT)
    Also in the files it has several red messages saying to fix some things or to do some things do we just ignore those, and we've watched your videos and we can't set up our 1 channel reylay

    • @AndrewIsCute7
      @AndrewIsCute7 9 ปีที่แล้ว

      When we try running our php code on the car/www it says there's a syntax error with the html

  • @deadtriple
    @deadtriple 9 ปีที่แล้ว

    I had some proplems with php script, but i solved it alredy. There is apache server index.html page already. /var/www/index.html I used super user modify file to index.php and added the code. Make sure you have Lighton_1.py and lightoff_1.py /home/pi folder.