I made a Remote Light Switch for my Dorm with a Pi!
Posted Dec 17, 2016, 10:36 PM UTC
Posted Dec 17, 2016, 10:36 PM UTC
Hey man! Really well made video, and super funny! I'm pretty new to the world of raspberry pi, but I'd love to make something like this. Would you be able to recommend any places to start learning?
I'd say if you haven't already, learn basic python (to be able to control the pins), then become familiar with the linux terminal and filesystem to be able to navigate through SSH.
As for places to start learning, I learned the Pi's GPIO API through a few youtube turtorials and reading through the documentation. As for python, code academy will work just fine for the basics.
Thanks man! Looks like I'm off to the right start. And, if I may ask, what did you use to make the app?
Stupid dorm chairs that always make you feel like you're about to tip over and die.
I like the idea. Works well and i dont think it would get you in trouble.
As an up grade, how would you manualy turn the light on? Say if you walked in the room.
this would be perfect for a pi zero.
Is that a 5 volt servo?
The light switch can be turned on and off manually already! Moving the servo with a hand won't hurt it. And the servo is a cheap RC one from Amazon
Just a thought but you could also have the servo move back just enough that the opposite side of the articulator just barely is resting on the lightswitch after a movement. That way the response is quicker and the switch can be manually moved without needing to move the servo.
That's how I thought he had done it, since the armature has an elongated gap for the switch rocker so which would allow the switch to move free
Some files for the 3d print? :)
I think this is the print he used. http://www.thingiverse.com/thing:1156995
That's the one!
I think that won't work over here. The Australian one is bit different.
Hey,
Nice work! I did something similar to this but for my water heater switch. I used a esp8266 , which is a arduino compatible board with WiFi built in for $3 delivered from China.
https://github.com/witnessmenow/Immersion-Bot
In my project I use an instant message app called Telegram to control the switch, but the esp8266 can host a webserver so you easily recreate your project as it currently works.
For these kind of projects I think the esp8266 are amazing just from how cheap they are! Like if you have access to a 3d printer already you can do this project for less than $5 (assuming you have an old phone charger to use).
I second the suggestion for ESP8266. It's perfect for single-use projects like this.
I've 10 on the way from China I like them so much!
Ah, so you sent HTTP requests to your ESP8266 using the Telegram API?
You built a Telegram bot library for the Arduino IDE? Lol.
EDIT: Do you have a video of it working?
The telegram bot API is really easy. You can just poll a URL to see if any messages have arrived. A websocket interface would be nice though.
Yeah, I was using HTTP requests but moved on to using the Python-telegram-bot library. It's pretty easy to use either way.
Does it also poll? I would love a solution that doesn't use polling yet doesn't require a server (with port forwarding and all that mess).
Yeah I was pretty familiar with the telegram api and pretty new to arduino so I thought it would be a nice project. There were two main ones already, one was pretty nice (used arduino json library) but didn't work with the esp8266. The other worked with the esp8266 but wasn't as nice so I kinda merged the two and made some changes (maybe improvements) to it.
I don't for some reason! Its under construction at the moment cause I'm replacing the servo with a bigger one so I can removed the extension I needed to add to the switch. It works pretty much the same as the video here, but wouldn't be as fast (but I am adding a second delay between checking telegram, I previously was running it on battery but probably don't need that anymore)
I see.
I've never ventured into Arduino and therefore, the IDE myself. I plan to though and integrating Telegram for automation seems neat.
I'm actually curious about your switch setup because I have a different kind of switches as compared to OP. These kind. And it seems like yours are that way too, is that the case?
Go Hokies ;). I thought I recognized the dorm! Which are you in? Prichard?
Go hokies!! And no I'm in Lee
Ah Lee! I dated a girl in Lee back in the day.. She was an RA, huge room to um.. play in! ;)
Nice build! I've recently created a wireless kettle, and I'm looking to write an app to turn it on, how did you do it? Right now I turn it on with SSH and starting a python script.
Super awesome project you made there. Really well made. I do have a small suggestion though, maybe it's an idea to default the device to the middle, so you can still put it off and on manually. Awesome work nonetheless.
[removed]
Stupid question, but What is that motor thing moving the switch? Could you please link me to that?
I have done Python for like 6 months now, so Im pretty ok with the programming part, but i have no idea How to get those motor switch thingies. Does it run of power directly from the PI?
Would you mind sharing what type of servo that is that you used?
Hello! Super awesome project - looking forward to creating something like this myself!
I was wondering - does the server "registre" when the switch is manually switched OFF/ON so the app lights op the corrent button of which state the light has?
Also i was wondering if you share the project somewhere?
Regards
Can you break down what you mean by "made an app"? Is it a web based app that you're just accessing through your phones web browser? If so, does that mean you registered a web domain for this project?
Or was there some other system you used? Appears to be android. iOS compatible solution?
Overall the video was very interesting, nice work! But I'm particularly interested in the mobile control aspect.
Thanks!
Not OP, but the easiest way to make this "app" is through the web (and access through a browser). You don't necessarily need a domain, since you can even host a web server on your home router. In either case it would work on any OS.