Moteino + Raspberry pi controlled door lock

Started by goryri, January 17, 2014, 07:49:51 AM

goryri

Just want to share what I've been working on lately which, of course, involves the awesome Moteino.
Basically, it is a door lock that is controlled by Moteino but im working on getting a webserver running on Raberry Pi using this guide http://lowpowerlab.com/blog/2013/10/07/raspberrypi-home-automation-gateway-setup/ so that I can securely control it on internet. Im thinking of having a nfc tag on the door that I can scan with my phone and trigger the unlocking.

goryri

Anyone that have any tips for switch I can use and how I can attach it ?

goryri

#2
Lock and unlock switch. By pressing the switch less than 1 sec and more than 30 ms (debounce time) does the door unlock. By pressing it for more than 1 sec lock's it if the door is closed. http://www.youtube.com/watch?v=aoEl4oNLPY8 demo

goryri

#3
The way I unlock it from the outside now is by using a flat screwdriver not so wery secure I now but I needed a backup plan in case somthing should go wrong whit the hardware or software.

goryri

#4
I'm gonna put the Moteino inside the black box and cut some of the wire so it's not so long.

goryri

The key is attached to the servo whit Sugru.

goryri

#6
Now I connected a FTDI ( this one http://www.tinyosshop.com/index.php?route=product/product&product_id=600) between my computer and rasberry pi. Im gona use it to test the web control on the rasberry pi.

goryri

#7
Made the wiring nicer/cleaner yesterday.

goryri

#8
I have installed ATXRaspi today and it works great.  Im done whit setting up the server on the Raspberry pi and im gona edit the webpage to my needs next.

Felix


goryri

#10
Tank you  :D Here is a new demo http://www.youtube.com/watch?v=hu2nT3eSSW4 still working on getting every thing to work togeter (Moteino door lock and light control <--> Moteino gateway <--> Raspberry pi <---> Tasker on Android)

goryri

#11
This project is starting to be wery big. Good that I don't have work so I can use all my time on this project. I have free to 14 mars then I go to military  :D  Things I want to add to this prosject is 8x8x8 led cube, mailbox notification and sound. I have a stereo that is always on but it is connected to my computer so will use a relay to switch to Raspberry pi when I want to. The relay is gona be connected to GPIO of the raspberry pi im using one relay for left speaker and one for right speaker. So that means that i also can have only on realy on.Then sound from my computer goes to one speaker and raspberry pi to the outer speaker.

goryri

#12
Is it anyone that nows how to use GPIO pins whit node.js? Im thinking of using rpi-gpio  https://npmjs.org/package/rpi-gpio or wiring-pi https://github.com/eugeneware/wiring-pi . But I have to be running as root or with sudo else the Raspberry Pi will not let me output to the GPIO. When I try to run gateway.js whit sudo "sudo node gateway.js &" I get "sudo: node: command not found".

Felix


Felix

The link you shared is probably a forked repository from the original.
You could run the node process as sudo, and that should get past the error you're getting.