Siri: Open my garage door..


218 posts   Page 2 of 9   1, 2, 3, 4, 5 ... 9
by DarkTherapy » Wed Dec 12, 2012 10:31 am
Levaillant wrote:Just AWESOME! Nice job

Thanks!
Posts: 69
Joined: Mon Aug 20, 2012 8:14 am
by DarkTherapy » Wed Dec 12, 2012 12:18 pm
I did think if an even cheaper method to activate a relay remotely (I've done this to turn on a remote pc as an FTP server in the past)

Get an old Nokia 3210 - or any other old Nokia that let's you make custom ringtones along with its own pay as you go sim (free). Create a ringtone that consists of a single note for 1 second then silent for 30 seconds. Assign that tone to a contact number - your other phone. Set the phone to silent and only play that tone when you call the Nokia from your other phone.

Hook up 5v from the charger to a resistor and npn transistor, then hook up a wire from the phone speaker to a capacitor and the base of the transistor. Now attach a 5v relay to the transistor.

Now dial the Nokia's number from the other phone, the Nokia will play its 1 second tone that will be turned into a small DC current through the cap and into the transistor, which will turn the relay on for 1 second then off again.

As the Nokia never "picks up" the calls it will never cost anything to activate the relay over cellular. Just call it, then put the phone down after a couple of seconds.
Posts: 69
Joined: Mon Aug 20, 2012 8:14 am
by Foxbat » Wed Dec 12, 2012 3:51 pm
DarkTherapy wrote:I did think if an even cheaper method to activate a relay remotely (I've done this to turn on a remote pc as an FTP server in the past)

Get an old Nokia 3210 - or any other old Nokia that let's you make custom ringtones along with its own pay as you go sim (free). Create a ringtone that consists of a single note for 1 second then silent for 30 seconds. Assign that tone to a contact number - your other phone. Set the phone to silent and only play that tone when you call the Nokia from your other phone.

Hook up 5v from the charger to a resistor and npn transistor, then hook up a wire from the phone speaker to a capacitor and the base of the transistor. Now attach a 5v relay to the transistor.

Now dial the Nokia's number from the other phone, the Nokia will play its 1 second tone that will be turned into a small DC current through the cap and into the transistor, which will turn the relay on for 1 second then off again.

As the Nokia never "picks up" the calls it will never cost anything to activate the relay over cellular. Just call it, then put the phone down after a couple of seconds.


I hear Hamas has a few job openings that you may be qualified for... ;)

But in all seriousness, this is pretty cool, and has got me thinking if there's any way to integrate this with my Insteon HA system. Since the controller is networked, a Pi might not even ben eded. Hmm.
Posts: 2
Joined: Wed Dec 12, 2012 3:47 pm
by nickstewartroc » Wed Dec 12, 2012 4:49 pm
It's awesome to have the code, but do you have the layout and parts you used for the relay? I've been trying to find one that works with no luck....
Posts: 5
Joined: Fri Aug 24, 2012 3:31 am
by DarkTherapy » Wed Dec 12, 2012 5:06 pm
[img]https://www.dropbox.com/s/tymvb46c3ulq66w/2012-12-12%2017.04.48.png[/img]

This is basically all the circuit is, replace the word arduino with raspberry pi lol
Posts: 69
Joined: Mon Aug 20, 2012 8:14 am
by nickstewartroc » Wed Dec 12, 2012 7:24 pm
Thanks! Do you have a part number/something similar for the relay? I have a box of them with ranging voltages and size, but they don't work, they will typically just kind of buzz
Posts: 5
Joined: Fri Aug 24, 2012 3:31 am
by DarkTherapy » Wed Dec 12, 2012 8:35 pm
It's just a 5v relay, of course it's only a tiny voltage needed from the GPIO that goes through the transistor to power the relay with the full 5v it needs. The NPN transisitor is just a general purpose one - BC548B. It's all I had to hand.
Posts: 69
Joined: Mon Aug 20, 2012 8:14 am
by Joey » Thu Dec 13, 2012 11:44 pm
Hi,

I've got the siriproxy up and running but changes I make to the siriproxy-example.rb do nothing! I've modified the line under 'listen_for /test siri proxy/i do'

from
say "Siriproxy is up and running!" #say something to the user!

to
say "Something different!" #say something to the user!

then run:
siriproxy bundle

and restarted the server with:
rvmsudo siriproxy server

but the command "Test Siri Proxy" still replies with "Siriproxy is up and running!"

What am I missing?

Thanks in advance
Posts: 1
Joined: Thu Dec 13, 2012 11:36 pm
by codyrigney92 » Fri Dec 14, 2012 2:08 am
After seeing this I felt like this was a project I could put together with the stuff laying around my house. I did it and it works great! This is the first useful project I've ever done. I did have a few hiccups with the software installs but it eventually worked out.
Posts: 57
Joined: Fri Dec 14, 2012 2:04 am
by codyrigney92 » Fri Dec 14, 2012 2:36 am
Joey wrote:Hi,

I've got the siriproxy up and running but changes I make to the siriproxy-example.rb do nothing! I've modified the line under 'listen_for /test siri proxy/i do'

from
say "Siriproxy is up and running!" #say something to the user!

to
say "Something different!" #say something to the user!

then run:
siriproxy bundle

and restarted the server with:
rvmsudo siriproxy server

but the command "Test Siri Proxy" still replies with "Siriproxy is up and running!"

What am I missing?

Thanks in advance


For me I have to call "rake install" and I think that's the piece where it repackages that information up. Then from there you can skip straight to "rvmsudo siriproxy server".
Posts: 57
Joined: Fri Dec 14, 2012 2:04 am
by DarkTherapy » Fri Dec 14, 2012 8:09 am
I actually set the whole thing up as root so "siriproxy bundle" and "siriproxy server" work in my case without sudo or rvmsudo.
Posts: 69
Joined: Mon Aug 20, 2012 8:14 am
by texy » Fri Dec 14, 2012 8:38 am
It all works fines for me as per DT's instructions. Yes, I did need to 'siriproxy bundle', before restarting the server, but one thing I found was that I had to be in the SiriProxy directory in order for the server to restart, otherwise it threw up errors. This is slightly painful because you need to edit the .rb file and navigate to that beforehand. Well obviously I couldv'e used cd /blah/blah/blah/blah/blah/ to get there quicker.........

Texy
"2.8inch TFT LCD + Touch screen" add-on boards for sale here :
http://www.raspberrypi.org/phpBB3/viewtopic.php?f=93&t=65566
50p goes to the Foundation ;-)
Moderator
Moderator
Posts: 2203
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England
by DarkTherapy » Fri Dec 14, 2012 9:07 am
I just made a bash script in my root directory to run the bundle or start the server. Then added it to my aliases.
Posts: 69
Joined: Mon Aug 20, 2012 8:14 am
by joefly » Sat Dec 15, 2012 6:39 am
OK guys, I have been on this for the last two days and running out of ideas!!

It all seems to go fine until the last step of "rvmsudo siriproxy server" which has an error that gives me "no such file or directory - /root/.siriproxy/config.yml"

it seems the problems relates to root or pi user and where the installation, files and permissions are getting mixed up. The author of this post said that he did the installation under root user. Does this mean follow the whole instruction with login root using "su" or do I add a sudo to the commands and which ones need/should have sudo?

Or am is the problems something else? I am totally out of ideas. Help from the people that have got it working..

Thanks in advance for saving me pulling out more hairs
Posts: 52
Joined: Thu May 31, 2012 4:10 pm
by DarkTherapy » Sat Dec 15, 2012 12:34 pm
Login as root to start with then input all the commands for the install ( but swap commands 11, 12 and 13 to 12, 13, 11) then when you get to the final command, move into the SiriProxy folder and type "siriproxy server". Ignoring the rvmsudo command as you are already logged in as root.
Posts: 69
Joined: Mon Aug 20, 2012 8:14 am
by joefly » Sat Dec 15, 2012 3:41 pm
Dark Therapy::

Great work and thanks for the help. I followed your last advice, but when I get to step 7 "Rvm install 1.9.3" says RVM command not found.

????
Posts: 52
Joined: Thu May 31, 2012 4:10 pm
by DarkTherapy » Sat Dec 15, 2012 4:32 pm
Odd, it works for me, have you tried from the start? Fresh SD card with fresh updates?
Posts: 69
Joined: Mon Aug 20, 2012 8:14 am
by joefly » Sat Dec 15, 2012 4:49 pm
i'll report back as that is exactly what I am going to try. Obviously it will take a few hours since the compliling takes me about 3 hours for some reason

thanks
Posts: 52
Joined: Thu May 31, 2012 4:10 pm
by DarkTherapy » Sat Dec 15, 2012 5:06 pm
Yeah the compiling takes time, but its usually plain sailing after that.
Posts: 69
Joined: Mon Aug 20, 2012 8:14 am
by joefly » Sat Dec 15, 2012 8:41 pm
Dark Therapy

I just did a fresh install of wheezy and updated. THen I got to RVM install 1.9.3

1) It did not recognize RVM until I did "source /etc/profile.d/rvm.sh"
Then after ahout 1 hour of waiting, It stopped due to error message
"error running 'make', please read /usr/local/rvm/log/ruby-1.9.3-p327/male log There has been an error while running make. Halting installation
chmod: cannot access "/usr/local/rvm/rubies/ruby-1.9.3-p327' No such file or directory..


I got the same error prior to doing a fresh install..

PS:
While installing RVM, I noticed a warning, but it completed its install. The message was

" Installing to RVM to /usr/local/rvm
/usr/local/rvm/src/rvm/scripts/functions/installer: line 147: __rvm_CD: command not found


Could it be due to that I am on Rev A of RPI and not the newer model??

I just noticed that the RVM installer said to signout before initiating RVM, so I am doing a second run of "rvm install 1.9.3"


Any ideas.
Posts: 52
Joined: Thu May 31, 2012 4:10 pm
by texy » Sat Dec 15, 2012 10:49 pm
My compiling was done on a v1 rpi, so that's not the issue. More likely to be software. Have you apt-get update && upgrade recently?
Texy
"2.8inch TFT LCD + Touch screen" add-on boards for sale here :
http://www.raspberrypi.org/phpBB3/viewtopic.php?f=93&t=65566
50p goes to the Foundation ;-)
Moderator
Moderator
Posts: 2203
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England
by joefly » Sun Dec 16, 2012 3:22 am
sorry as this is getting lengthy....like the 5th clean install try..yet I did the update and upgrade commands...

in the step:
bash < <(curl -s https://raw.github.com/wayneeseguin/rvm ... -installer) process,
there are notes to add user and running source /etc/profile.d/rvm.sh

and in the rvm install 1.9.3 there are notes to add things like git, curl, jruby...etc. all I did was hit q to continue.

Can someone clarify if I should have followed some of those instructions in the notes or just continue on?
Posts: 52
Joined: Thu May 31, 2012 4:10 pm
by DarkTherapy » Sun Dec 16, 2012 7:35 am
You just press q at that point, it was telling you do download the prerequisites that you already did in step 1. I had several problems myself to start with so I always tried the process on Ubuntu (virtual machine) first before it worked then did the exact same on the pi, I have the older pi board myself so I don't know what the issue is.
Posts: 69
Joined: Mon Aug 20, 2012 8:14 am
by davef21370 » Sun Dec 16, 2012 4:58 pm
Noob speaking but this is really interesting. I've been through all the posts here and not heard mention of Debian Wheezy, can I assume the same commands shown in the install video for Ubuntu will work with Debian?
And is there C/C++ or Python source available for handling it?

Any help etc.

Cheers.
Dave.

(great work btw)
Please feel free to tap into my abundant lack of knowledge.
User avatar
Posts: 422
Joined: Fri Sep 21, 2012 4:13 pm
Location: Up North
by DarkTherapy » Sun Dec 16, 2012 5:17 pm
davef21370 wrote:Noob speaking but this is really interesting. I've been through all the posts here and not heard mention of Debian Wheezy, can I assume the same commands shown in the install video for Ubuntu will work with Debian?
And is there C/C++ or Python source available for handling it?

Any help etc.

Cheers.
Dave.

(great work btw)


If you go back to the very first post, you'll notice the word "Wheezy". That is the distro it uses.
Posts: 69
Joined: Mon Aug 20, 2012 8:14 am