Author Topic: Moteino + Raspberry pi controlled door lock  (Read 67565 times)

goryri

  • NewMember
  • *
  • Posts: 36
Moteino + Raspberry pi controlled door lock
« on: January 17, 2014, 07:49:51 AM »
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.
« Last Edit: January 23, 2014, 01:15:50 AM by goryri »

goryri

  • NewMember
  • *
  • Posts: 36
Re: Montino + Raspberry pi controlled door lock
« Reply #1 on: January 17, 2014, 08:24:12 AM »
Anyone that have any tips for switch I can use and how I can attach it ?

goryri

  • NewMember
  • *
  • Posts: 36
Re: Moteino + Raspberry pi controlled door lock
« Reply #2 on: January 17, 2014, 05:30:50 PM »
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
« Last Edit: January 18, 2014, 04:00:46 AM by goryri »

goryri

  • NewMember
  • *
  • Posts: 36
Re: Moteino + Raspberry pi controlled door lock
« Reply #3 on: January 18, 2014, 04:10:35 AM »
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.
« Last Edit: January 18, 2014, 04:24:18 AM by goryri »

goryri

  • NewMember
  • *
  • Posts: 36
Re: Moteino + Raspberry pi controlled door lock
« Reply #4 on: January 18, 2014, 04:21:51 AM »
I'm gonna put the Moteino inside the black box and cut some of the wire so it's not so long.
« Last Edit: January 23, 2014, 01:15:22 AM by goryri »

goryri

  • NewMember
  • *
  • Posts: 36
Re: Moteino + Raspberry pi controlled door lock
« Reply #5 on: January 18, 2014, 04:34:47 AM »
The key is attached to the servo whit Sugru.

goryri

  • NewMember
  • *
  • Posts: 36
Re: Moteino + Raspberry pi controlled door lock
« Reply #6 on: January 18, 2014, 05:29:48 AM »
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.
« Last Edit: January 18, 2014, 05:32:56 AM by goryri »

goryri

  • NewMember
  • *
  • Posts: 36
Re: Moteino + Raspberry pi controlled door lock
« Reply #7 on: January 21, 2014, 02:19:09 AM »
Made the wiring nicer/cleaner yesterday.
« Last Edit: January 21, 2014, 04:56:43 AM by goryri »

goryri

  • NewMember
  • *
  • Posts: 36
Re: Moteino + Raspberry pi controlled door lock
« Reply #8 on: January 21, 2014, 04:50:04 AM »
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.
« Last Edit: January 21, 2014, 05:02:10 AM by goryri »

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: Moteino + Raspberry pi controlled door lock
« Reply #9 on: January 21, 2014, 11:19:27 AM »
Cool, great progress!

goryri

  • NewMember
  • *
  • Posts: 36
Re: Moteino + Raspberry pi controlled door lock
« Reply #10 on: January 22, 2014, 04:03:50 PM »
Tank you  :D Here is a new demo
still working on getting every thing to work togeter (Moteino door lock and light control <--> Moteino gateway <--> Raspberry pi <---> Tasker on Android)
« Last Edit: January 23, 2014, 01:14:50 AM by goryri »

goryri

  • NewMember
  • *
  • Posts: 36
Re: Moteino + Raspberry pi controlled door lock
« Reply #11 on: January 23, 2014, 07:10:02 AM »
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.
« Last Edit: January 23, 2014, 08:12:10 AM by goryri »

goryri

  • NewMember
  • *
  • Posts: 36
Re: Moteino + Raspberry pi controlled door lock
« Reply #12 on: January 24, 2014, 06:50:07 AM »
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".
« Last Edit: January 24, 2014, 07:25:58 AM by goryri »

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: Moteino + Raspberry pi controlled door lock
« Reply #13 on: January 24, 2014, 08:03:28 AM »
Take a look at: http://wiringpi.com/

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: Moteino + Raspberry pi controlled door lock
« Reply #14 on: January 24, 2014, 08:55:39 AM »
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.