Weaselgrease
Posts: 4
Joined: Tue Oct 29, 2013 1:48 am

RPi to turn on and off wall socket.

Tue Oct 29, 2013 2:29 am

I'm doing a project using an Raspberry Pi and a wireless device that is designed to turn on a wall socket when a door is opened (magnetic sensor). My aim is to have the RPi provide power and trigger the transmitter instead of the magnetic sensor. I've pulled the wireless transmitter apart and have gone so far as to make the RPi the power source for it.

I'm just getting into manipulating electronics and some components on the board aren't clear to me (I can't find any legitimate examples of what they are using references). So I'm looking for any information anyone wants to provide for this project. I've included a picture of the top and bottom of the wireless transmitter. I'd like to know what to call the connected components, what they do (or might do) and how I might go about bypassing the magnetic sensor so that the RPi can trigger the transmitter instead of the magnet.

http://imgur.com/bh1kT2v,KXOA6Ku#0

This is what happens so far:
When the device is connected to the RPi and receiving power and the magnet is nowhere near it, the LED emits a very subtle rapid blinking.
When the magnet first moves next to the sensor, nothing changes.
When the magnet leaves the sensor, the LED lights up solid, the device transmits for a fraction of a second and stops, and the LED also turns off entirely.

After this I have to unplug the device from the power source and plug it back in to get it to react to the magnet again. The transmitter normally runs on 3 AAA batteries.

My end goal for this project is to have the RPi act as a security device. It will have a motion sensor, camera, and wireless light switch onboard. When it detects movement it will turn on the light, activate the camera, and upload images from the camera to a remote FTP server. I figured I'd tackle the most potentially destructive part of the project first. Especially since my camera and motion sensor are still being shipped. ;)

Any information is greatly appreciated!

Weaselgrease
Posts: 4
Joined: Tue Oct 29, 2013 1:48 am

Re: RPi to turn on and off wall socket.

Tue Oct 29, 2013 10:50 am

Upon further tinkering I discovered that when the transmitter stops reacting it's still functioning 'as intended' by the manufacturer. After triggering the first time, it goes into a standby mode where it counts 30 minutes. At the end of the 30 minutes it triggers again. So the transmitter is designed to only turn the socket on for a half hour and then deactivate it at the end.

With this in mind, I'd be looking to bypass the time keeper as well as the magnetic sensor. I imagine the largest chip on the board is probably a controller that does the time keeping.

The best resolution I can come up with given my limited experience and learning would be to bust open the wall socket attachment and use its receiver with the RPi to learn what signal the transmitter sends, then bypass the chip on the transmitter and use just the antenna to emulate the frequency needed. Only I'm not certain where to attach wires from the RPi to effectively use the antenna.

Could the RPi emulate the transmitter's frequency without the transmitter at all? Such as P*** (sensored).
Also, the transistor on the top of the card is has the part number 'R315'. I've been lead to believe (strictly by observation) that the frequency would be around 315.95mhz based on that.

User avatar
redhawk
Posts: 3465
Joined: Sun Mar 04, 2012 2:13 pm
Location: ::1

Re: RPi to turn on and off wall socket.

Tue Oct 29, 2013 11:01 am

What is the make and model number for your wall socket??

If you have the original remote control can you see any circular or square shaped metal object inside and what markings are there??

As for the R315 I believe this is 315MHz SAW resonator this is a little far off 433.95MHz. :)

Richard S.

Weaselgrease
Posts: 4
Joined: Tue Oct 29, 2013 1:48 am

Re: RPi to turn on and off wall socket.

Tue Oct 29, 2013 11:22 am

redhawk wrote:What is the make and model number for your wall socket??

If you have the original remote control can you see any circular or square shaped metal object inside and what markings are there??

As for the R315 I believe this is 315MHz SAW resonator this is a little far off 433.95MHz. :)

Richard S.

The best I can give for 'make' is Defiant, which is a budget line of security products sold by Home Depot. The model is 98801, 98801-A, 98801-B. I tried searching it and came up with very little online.

As far as a remote, there technically isn't one. To give you an idea of what it does, it's like a door chime triggered with a magnet. Only instead of triggering a sound, it sends a wireless signal.

And yea, I misread some of the tutorials I was looking at when I looked at the R315 transistor.

Thanks for your reply, Richard!

jets
Posts: 58
Joined: Mon May 06, 2013 9:40 am

Re: RPi to turn on and off wall socket.

Tue Oct 29, 2013 4:40 pm

Have you heard of Tellstick? It is a product that allows computer to control wall sockets remotely. It basically just replaces the remote controller.

Check: http://www.telldus.se/products/tellstick

Aah.. well there is a discussion about it already here: http://www.raspberrypi.org/phpBB3/viewt ... 37&t=19681

Anyway, interesting. However, I believe it is cheaper to do this with like Rpi+Piface and some standard remote controller that comes with three sockets.

Weaselgrease
Posts: 4
Joined: Tue Oct 29, 2013 1:48 am

Re: RPi to turn on and off wall socket.

Tue Oct 29, 2013 7:35 pm

It would be easier, I'm sure. But the aim is to learn while I tinker. So removing the need to understand the circuitry kinda eliminates part of the purpose of the project. Not to mention I have a limited budget to work with. Tellstick does sound like something I could end up using later on, however!

jets
Posts: 58
Joined: Mon May 06, 2013 9:40 am

Re: RPi to turn on and off wall socket.

Wed Oct 30, 2013 8:48 am

Weaselgrease wrote:It would be easier, I'm sure. But the aim is to learn while I tinker. So removing the need to understand the circuitry kinda eliminates part of the purpose of the project. Not to mention I have a limited budget to work with. Tellstick does sound like something I could end up using later on, however!
Yeah, I agree. I also came to a conclusion that I will not use tellstick myself, at least not yet. As I need also more features that tellstick is able to.

I am soon to accomplish this socket control by driving the buttons of remote controller via relays. Probably I will go for Piface in this case, even though it has only two relays, but it has other features too.

jets
Posts: 58
Joined: Mon May 06, 2013 9:40 am

Re: RPi to turn on and off wall socket.

Mon Nov 11, 2013 8:27 pm

I managed to contro sockets remotely by simply soldering wires to two switches on the remote control and then wiring them to Piface's two relays. Works nicely. However, it is only two relays, which means controlling only one socket.

..I did order few boards with 8 relays. But now I have started thinking about a bit more civilized solution by using something like this:
https://github.com/dmcg/raspberry-strogonanoff

With:
http://www.ebay.co.uk/itm/RF-Transmitte ... 1e82828b21

And all this does not look too complicated even for me.

baberwilles
Posts: 1
Joined: Tue Nov 12, 2013 6:44 am
Location: Jacksonville, FL 32202

Re: RPi to turn on and off wall socket.

Tue Nov 12, 2013 7:05 am

jets wrote:I managed to contro sockets remotely by simply soldering wires to two switches on the remote control and then wiring them to Piface's two relays. Works nicely. However, it is only two relays, which means controlling only one socket.

..I did order few boards with 8 relays. But now I have started thinking about a bit more civilized solution by using something like this:
https://github.com/dmcg/raspberry-strogonanoff

With:
http://www.ebay.co.uk/itm/RF-Transmitte ... 1e82828b21

And all this does not look too complicated even for me.
You suggestion seems workable as if I'd done some sort of things but the only difference was I'd directly connected the two switches on the remote control only.
Website

jets
Posts: 58
Joined: Mon May 06, 2013 9:40 am

Re: RPi to turn on and off wall socket.

Wed Nov 20, 2013 7:00 pm

I have remote control of sockets done now. What I used was exactly these instructions:

https://github.com/dmcg/raspberry-strogonanoff

With this transmitter:
http://www.ebay.co.uk/itm/RF-Transmitte ... 1038612257

The pins of the transmitter have clear markings on where to put GND, VCC and DATA. I basically took a ribbon cable originally meant for Gertboard, and used it. I soldered the needed wires directly to transmitter's pins accordingly.

And these are the RC Sockets I am using:
http://www.johdoton.fi/tuotteet/pkb-3500

Finnish Johdoton products seem to be compatible with Nexa products and strogonanoff worked directly.

If only would have I known that this is so easy, I would have skipped all my tests with controlling remote controller buttons with GPIO, relays etc.. I can now throw away my remote controller (I acquired two sets and both remote controllers are in pieces :) ).

Return to “Other projects”