DarkTherapy
Posts: 69
Joined: Mon Aug 20, 2012 8:14 am

Re: Siri: Open my garage door..

Wed Jan 09, 2013 10:27 am

RugYG wrote:I have the siriproxy server up and running. I'm able to accept requests from both LAN and WAN (VPN was was easier to setup than i anticipated), I just received my relay board and just have one question.

Where exactly do you connect the relay on the garage door circuit board?

I have an older model genie system, and there isn't a secondary connection terminal and all of the wires are in prefabbed connectors, no screw down terminals. I don't mind cutting one of the wires in the name of home automation.
I have no idea without at least seeing the manual for the system. Usually you hear a relay click on inside the electronics, maybe you could tap into that if there is one.

realtek
Posts: 34
Joined: Wed Jan 09, 2013 3:16 pm

Re: Siri: Open my garage door..

Wed Jan 09, 2013 4:49 pm

I'm not sure if this has been mentioned on here as the thread is too long for me to read end to end but to get this working over the internet, it is possible if you jailbreak your phone. :)

realtek
Posts: 34
Joined: Wed Jan 09, 2013 3:16 pm

Re: Siri: Open my garage door..

Wed Jan 09, 2013 4:54 pm

My current project is to get this to control my central heating.

"Siri, set the thermostat to 20 degree's"

realtek, Setting the thermostat to 20 degree's"....

haha... can't wait! :)

As long as it doesn't say, "realtek, sorry I cannot do that" :)

alankernel
Posts: 15
Joined: Mon Dec 24, 2012 7:50 pm

Re: Siri: Open my garage door..

Wed Jan 09, 2013 5:34 pm

I have the same question, but maybe less competent :shock: :oops: : what type of cable do I use to connect from the relay to the garage door circuit board and, according to the picture DarkTherapy kindly provided, there appear to be two cables coming out of the relay. Which pins/slots do they go from on the relay and where do they end up on the circuit board?
I admit, I'm a complete noob in electronics/electricity.
Thank you.
RugYG wrote:I have the siriproxy server up and running. I'm able to accept requests from both LAN and WAN (VPN was was easier to setup than i anticipated), I just received my relay board and just have one question.

Where exactly do you connect the relay on the garage door circuit board?

I have an older model genie system, and there isn't a secondary connection terminal and all of the wires are in prefabbed connectors, no screw down terminals. I don't mind cutting one of the wires in the name of home automation.

nonlinearmind
Posts: 19
Joined: Thu Dec 13, 2012 3:44 am

Re: Siri: Open my garage door..

Thu Jan 10, 2013 3:31 am

How/where is WiringPi installed to make this work? Unfortunately, I don't know anything about Ruby.

RugYG
Posts: 7
Joined: Wed Jan 09, 2013 5:38 am

Re: Siri: Open my garage door..

Thu Jan 10, 2013 6:52 am

You do not need to jailbreak your iPhone to access siriproxy over WAN (iPhone 5)

The way I have mine set up is as follows.

My router has custom firmware (dd-wrt will work but I used something else) with a VPN server built in. I enabled the VPN server and made the DNS server on the router the raspberrypi local ip. Took not even 5 min to setup and works like a charm. I leave VPN off unless I need to call upon siriproxy. (90% of the time I only use it at home anyway)

[quote]by realtek » Wed Jan 09, 2013 10:49 am
I'm not sure if this has been mentioned on here as the thread is too long for me to read end to end but to get this working over the internet, it is possible if you jailbreak your phone. [/quote]

I figured out where to attach the relay. There are some screw terminals for the wall plate opener and for the safety beam. I found that If I bridge the wall plate terminals for 2 seconds the door opens. So I am placing the replay there.

As for connecting the relay. Mine is on a PCB and the diagram shows (when looking at the relay from the screw terminals) the middle is common and the right is unswitched and the left is the switch position. I will post a picture later.

[quote]I have the same question, but maybe less competent : what type of cable do I use to connect from the relay to the garage door circuit board and, according to the picture DarkTherapy kindly provided, there appear to be two cables coming out of the relay. Which pins/slots do they go from on the relay and where do they end up on the circuit board?
I admit, I'm a complete noob in electronics/electricity. Thank you[/quote]

realtek
Posts: 34
Joined: Wed Jan 09, 2013 3:16 pm

Re: Siri: Open my garage door..

Thu Jan 10, 2013 9:46 am

When I try executing siriproxy, I get this (but nothing is running on port 443. I am doing this on a fresh wheezy image. I have also tried this as root but I then get 'require' cannot load such file)

Starting SiriProxy on port 443..
/home/pi/.rvm/gems/ruby-1.9.3-p362@SiriProxy/gems/eventmachine-1.0.0/lib/eventmachine.rb:526:in `start_tcp_server': no acceptor (port is in use or requires root privileges) (RuntimeError)
from /home/pi/.rvm/gems/ruby-1.9.3-p362@SiriProxy/gems/eventmachine-1.0.0/lib/eventmachine.rb:526:in `start_server'
from /home/pi/SiriProxy/lib/siriproxy.rb:19:in `block in initialize'
from /home/pi/.rvm/gems/ruby-1.9.3-p362@SiriProxy/gems/eventmachine-1.0.0/lib/eventmachine.rb:187:in `call'
from /home/pi/.rvm/gems/ruby-1.9.3-p362@SiriProxy/gems/eventmachine-1.0.0/lib/eventmachine.rb:187:in `run_machine'
from /home/pi/.rvm/gems/ruby-1.9.3-p362@SiriProxy/gems/eventmachine-1.0.0/lib/eventmachine.rb:187:in `run'
from /home/pi/SiriProxy/lib/siriproxy.rb:16:in `initialize'
from /home/pi/SiriProxy/lib/siriproxy/command_line.rb:96:in `new'
from /home/pi/SiriProxy/lib/siriproxy/command_line.rb:96:in `start_server'
from /home/pi/SiriProxy/lib/siriproxy/command_line.rb:85:in `run_server'
from /home/pi/SiriProxy/lib/siriproxy/command_line.rb:37:in `initialize'
from ./siriproxy:6:in `new'
from ./siriproxy:6:in `<main>'
pi@raspberrypi:~/SiriProxy/bin$

DarkTherapy
Posts: 69
Joined: Mon Aug 20, 2012 8:14 am

Re: Siri: Open my garage door..

Thu Jan 10, 2013 10:00 am

Did you log in as root, follow the install instructions then run "siriproxy server" at the end? Or did you log in as "pi" user, install, then run the last command as root?

realtek
Posts: 34
Joined: Wed Jan 09, 2013 3:16 pm

Re: Siri: Open my garage door..

Thu Jan 10, 2013 10:24 am

Hi DarkTheorpy,

Yes just as I saw your post I was checking the origional instructions!

I was running it as pi and then just the last command as root which looks like where I went wrong.

I am going through the steps again as root.

Thanks!

Rikka
Posts: 5
Joined: Thu Jan 10, 2013 3:00 pm

Re: Siri: Open my garage door..

Thu Jan 10, 2013 3:36 pm

Hi

I´m running as "pi" on a clean install "wheezy" and follow the steps @idownloadblog. I swaped commands 11, 12 and 13 to 12, 13, 11.

But when i type "rvmsudo siriproxy server" i get this error:

Code: Select all

Warning: can not check `/etc/sudoers` for `secure_path`, falling back to call via `/usr/bin/env`, this breaks rules from `/etc/sudoers`. export rvmsudo_secure_path=1 to avoid the warning.config.yml not found. Copy config.example.yml to config.yml, then modify it.
And when i type "siriproxy server" i get this error:
Starting SiriProxy on port 443..
/home/pi/.rvm/gems/ruby-1.9.3-p362@SiriProxy/gems/eventmachine-1.0.0/lib/eventmachine.rb:526:in `start_tcp_server': no acceptor (port is in use or requires root privileges) (RuntimeError)
from /home/pi/.rvm/gems/ruby-1.9.3-p362@SiriProxy/gems/eventmachine-1.0.0/lib/eventmachine.rb:526:in `start_server'
from /home/pi/SiriProxy/lib/siriproxy.rb:19:in `block in initialize'
from /home/pi/.rvm/gems/ruby-1.9.3-p362@SiriProxy/gems/eventmachine-1.0.0/lib/eventmachine.rb:187:in `call'
from /home/pi/.rvm/gems/ruby-1.9.3-p362@SiriProxy/gems/eventmachine-1.0.0/lib/eventmachine.rb:187:in `run_machine'
from /home/pi/.rvm/gems/ruby-1.9.3-p362@SiriProxy/gems/eventmachine-1.0.0/lib/eventmachine.rb:187:in `run'
from /home/pi/SiriProxy/lib/siriproxy.rb:16:in `initialize'
from /home/pi/SiriProxy/lib/siriproxy/command_line.rb:96:in `new'
from /home/pi/SiriProxy/lib/siriproxy/command_line.rb:96:in `start_server'
from /home/pi/SiriProxy/lib/siriproxy/command_line.rb:85:in `run_server'
from /home/pi/SiriProxy/lib/siriproxy/command_line.rb:37:in `initialize'
from /home/pi/SiriProxy/bin/siriproxy:6:in `new'
from /home/pi/SiriProxy/bin/siriproxy:6:in `<top (required)>'
from /home/pi/.rvm/gems/ruby-1.9.3-p362@SiriProxy/bin/siriproxy:19:in `load'
from /home/pi/.rvm/gems/ruby-1.9.3-p362@SiriProxy/bin/siriproxy:19:in `<main>'
from /home/pi/.rvm/gems/ruby-1.9.3-p362@SiriProxy/bin/ruby_noexec_wrapper:14:in `eval'
from /home/pi/.rvm/gems/ruby-1.9.3-p362@SiriProxy/bin/ruby_noexec_wrapper:14:in `<main>'
Where is my mistake :?:
Thanks ... Rikka :D

DarkTherapy
Posts: 69
Joined: Mon Aug 20, 2012 8:14 am

Re: Siri: Open my garage door..

Thu Jan 10, 2013 5:28 pm

Log in as root and follow the instructions.. Not as the "pi" user.

Rikka
Posts: 5
Joined: Thu Jan 10, 2013 3:00 pm

Re: Siri: Open my garage door..

Thu Jan 10, 2013 6:14 pm

ok thx

but now im loged in as pi and type "sudo -s", follow the steps until "rvm install 1.9.3"

Code: Select all

root@raspberrypi:/home/pi# rvm install 1.9.3
bash: rvm: command not found
:cry:
Can you help pls :?:

DarkTherapy
Posts: 69
Joined: Mon Aug 20, 2012 8:14 am

Re: Siri: Open my garage door..

Thu Jan 10, 2013 6:17 pm

Log in as root!

User avatar
terrycarlin
Posts: 70
Joined: Thu Jun 14, 2012 10:42 pm

Re: Siri: Open my garage door..

Thu Jan 10, 2013 6:32 pm

Rikka wrote:ok thx

but now im loged in as pi and type "sudo -s", follow the steps until "rvm install 1.9.3"

Code: Select all

root@raspberrypi:/home/pi# rvm install 1.9.3
bash: rvm: command not found
:cry:
Can you help pls :?:
You may need to enter this after you get in to root.

Code: Select all

source /etc/profile.d/rvm.sh 
in the command line.
This should be done automagicly if you just logged in as root or did a

Code: Select all

sudo su -
The - is very important.
If it ain't broke, take it apart and see how it works.

Rikka
Posts: 5
Joined: Thu Jan 10, 2013 3:00 pm

Re: Siri: Open my garage door..

Fri Jan 11, 2013 4:00 pm

ok thanks for your patience :lol: but now i´m at this point

Code: Select all

root@raspberrypi:~/SiriProxy# rvmsudo siriproxy server
Warning: `secure_path` found in `/etc/sudoers`, falling back to call via `/usr/bin/env`, this breaks rules from `/etc/sudoers`. export rvmsudo_secure_path=1 to avoid the warning.Starting SiriProxy on port 443..
SiriProxy up and running.
and if if starting siri on my iPhone the server crashes

Code: Select all

/usr/local/rvm/gems/ruby-1.9.3-p362@SiriProxy/gems/eventmachine-1.0.0/lib/eventmachine.rb:187:in `run_machine': Interrupt
        from /usr/local/rvm/gems/ruby-1.9.3-p362@SiriProxy/gems/eventmachine-1.0.0/lib/eventmachine.rb:187:in `run'
        from /root/SiriProxy/lib/siriproxy.rb:16:in `initialize'
        from /root/SiriProxy/lib/siriproxy/command_line.rb:96:in `new'
        from /root/SiriProxy/lib/siriproxy/command_line.rb:96:in `start_server'
        from /root/SiriProxy/lib/siriproxy/command_line.rb:85:in `run_server'
        from /root/SiriProxy/lib/siriproxy/command_line.rb:37:in `initialize'
        from /root/SiriProxy/bin/siriproxy:6:in `new'
        from /root/SiriProxy/bin/siriproxy:6:in `<top (required)>'
        from /usr/local/rvm/gems/ruby-1.9.3-p362@SiriProxy/bin/siriproxy:19:in `load'
        from /usr/local/rvm/gems/ruby-1.9.3-p362@SiriProxy/bin/siriproxy:19:in `<main>'
        from /usr/local/rvm/gems/ruby-1.9.3-p362@SiriProxy/bin/ruby_noexec_wrapper:14:in `eval'
        from /usr/local/rvm/gems/ruby-1.9.3-p362@SiriProxy/bin/ruby_noexec_wrapper:14:in `<main>'
Thanks for your help :!:

alankernel
Posts: 15
Joined: Mon Dec 24, 2012 7:50 pm

Re: Siri: Open my garage door..

Sat Jan 12, 2013 5:09 am

I got this warning. To avoid it, I entered the command that it included in it and re-ran it:
export rvmsudo_secure_path=1

Rikka wrote:ok thanks for your patience :lol: but now i´m at this point

Code: Select all

root@raspberrypi:~/SiriProxy# rvmsudo siriproxy server
Warning: `secure_path` found in `/etc/sudoers`, falling back to call via `/usr/bin/env`, this breaks rules from `/etc/sudoers`. export rvmsudo_secure_path=1 to avoid the warning.Starting SiriProxy on port 443..
SiriProxy up and running.
and if if starting siri on my iPhone the server crashes

Code: Select all

/usr/local/rvm/gems/ruby-1.9.3-p362@SiriProxy/gems/eventmachine-1.0.0/lib/eventmachine.rb:187:in `run_machine': Interrupt
        from /usr/local/rvm/gems/ruby-1.9.3-p362@SiriProxy/gems/eventmachine-1.0.0/lib/eventmachine.rb:187:in `run'
        from /root/SiriProxy/lib/siriproxy.rb:16:in `initialize'
        from /root/SiriProxy/lib/siriproxy/command_line.rb:96:in `new'
        from /root/SiriProxy/lib/siriproxy/command_line.rb:96:in `start_server'
        from /root/SiriProxy/lib/siriproxy/command_line.rb:85:in `run_server'
        from /root/SiriProxy/lib/siriproxy/command_line.rb:37:in `initialize'
        from /root/SiriProxy/bin/siriproxy:6:in `new'
        from /root/SiriProxy/bin/siriproxy:6:in `<top (required)>'
        from /usr/local/rvm/gems/ruby-1.9.3-p362@SiriProxy/bin/siriproxy:19:in `load'
        from /usr/local/rvm/gems/ruby-1.9.3-p362@SiriProxy/bin/siriproxy:19:in `<main>'
        from /usr/local/rvm/gems/ruby-1.9.3-p362@SiriProxy/bin/ruby_noexec_wrapper:14:in `eval'
        from /usr/local/rvm/gems/ruby-1.9.3-p362@SiriProxy/bin/ruby_noexec_wrapper:14:in `<main>'
Thanks for your help :!:

Rikka
Posts: 5
Joined: Thu Jan 10, 2013 3:00 pm

Re: Siri: Open my garage door..

Sat Jan 12, 2013 9:20 am

ok i think i found my problem ...

I have a iPhone 4s iOS 6.0.1 and i just read that on iOS 6 guzzoni is wrong and kryten is right. Can anyone confirm ??
And i come from Germany and here i read that for Germany it is "de-de.kryten.a**le.com" is it right ??

So here "sudo nano /etc/dnsmasq.conf" i must add --> address=/de-de.kryten.a**le.com/(your_machine's_ip_address) right ??

@alankernel:
must i run the command every time before starting the Proxy ??

Thanks ... Rikka :)

DarkTherapy
Posts: 69
Joined: Mon Aug 20, 2012 8:14 am

Re: Siri: Open my garage door..

Sat Jan 12, 2013 9:33 am

I'm using iOS 6.0.1 (iPhone 5) and guzzoni works for me.

Rikka
Posts: 5
Joined: Thu Jan 10, 2013 3:00 pm

Re: Siri: Open my garage door..

Sat Jan 12, 2013 10:00 am

hmm ... now i´m ry it with both :D

alankernel
Posts: 15
Joined: Mon Dec 24, 2012 7:50 pm

Re: Siri: Open my garage door..

Sat Jan 12, 2013 6:58 pm

@Rikka
I'll share with you a note-to-self that I kept. Note that, like DarkTherapy mentioned, I'm running everything as root..

Code: Select all

To run SiriProxy after booting:
1. If IP changed:
vi /etc/dnsmasq.conf
	-re-edit the ip: address=/guzzoni.apple.com/<new ip>
Issue command:
/etc/init.d/dnsmasq restart

2. Issue the commands:
root@raspberrypi:~/SiriProxy# export rvmsudo_secure_path=1
root@raspberrypi:~/SiriProxy# [[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"
root@raspberrypi:~/SiriProxy# siriproxy server
Rikka wrote:ok i think i found my problem ...

I have a iPhone 4s iOS 6.0.1 and i just read that on iOS 6 guzzoni is wrong and kryten is right. Can anyone confirm ??
And i come from Germany and here i read that for Germany it is "de-de.kryten.a**le.com" is it right ??

So here "sudo nano /etc/dnsmasq.conf" i must add --> address=/de-de.kryten.a**le.com/(your_machine's_ip_address) right ??

@alankernel:
must i run the command every time before starting the Proxy ??

Thanks ... Rikka :)

alankernel
Posts: 15
Joined: Mon Dec 24, 2012 7:50 pm

Re: Siri: Open my garage door..

Sat Jan 12, 2013 7:03 pm

@RugYG
You mentioned that you'd post a picture of your setup. I was wondering if you have done it already and I missed it.
Thank you
RugYG wrote:You do not need to jailbreak your iPhone to access siriproxy over WAN (iPhone 5)

The way I have mine set up is as follows.

My router has custom firmware (dd-wrt will work but I used something else) with a VPN server built in. I enabled the VPN server and made the DNS server on the router the raspberrypi local ip. Took not even 5 min to setup and works like a charm. I leave VPN off unless I need to call upon siriproxy. (90% of the time I only use it at home anyway)
by realtek » Wed Jan 09, 2013 10:49 am
I'm not sure if this has been mentioned on here as the thread is too long for me to read end to end but to get this working over the internet, it is possible if you jailbreak your phone.
I figured out where to attach the relay. There are some screw terminals for the wall plate opener and for the safety beam. I found that If I bridge the wall plate terminals for 2 seconds the door opens. So I am placing the replay there.

As for connecting the relay. Mine is on a PCB and the diagram shows (when looking at the relay from the screw terminals) the middle is common and the right is unswitched and the left is the switch position. I will post a picture later.
I have the same question, but maybe less competent : what type of cable do I use to connect from the relay to the garage door circuit board and, according to the picture DarkTherapy kindly provided, there appear to be two cables coming out of the relay. Which pins/slots do they go from on the relay and where do they end up on the circuit board?
I admit, I'm a complete noob in electronics/electricity. Thank you

RugYG
Posts: 7
Joined: Wed Jan 09, 2013 5:38 am

Re: Siri: Open my garage door..

Sat Jan 12, 2013 7:22 pm

Yea sorry about that. I live and work in two different city's. I will be finishing the project today and I ill post some pictures by 10pm CST

alankernel
Posts: 15
Joined: Mon Dec 24, 2012 7:50 pm

Re: Siri: Open my garage door..

Sat Jan 12, 2013 7:37 pm

No problem at all... i just wanted to double check. Thanks
RugYG wrote:Yea sorry about that. I live and work in two different city's. I will be finishing the project today and I ill post some pictures by 10pm CST

RugYG
Posts: 7
Joined: Wed Jan 09, 2013 5:38 am

Re: Siri: Open my garage door..

Sun Jan 13, 2013 6:34 am

Alright i just finished wiring everything up. Sorry it took so long. I had to run wire from my office to my garage. I wanted to have the raspberryPi in my office so it can be hard wired in to the network and so i don't have to dedicate it to just this project.

The relay board is powered by a 5v USB wall plug and USB cord i had laying around. i cut the cord and just used the red and black wires, these are the wires refereed to as the main power and ground on the wiring diagram

Here is the wiring diagram for my setup:
https://www.dropbox.com/s/5oqr11vfbl5b3 ... iagram.jpg

Relay board used:
https://www.dropbox.com/s/f4jxvw1vnkmi1 ... %20Top.JPG

https://www.dropbox.com/s/243jjdxvky7lv ... 0Front.JPG

Wall switch and where it connects:
https://www.dropbox.com/s/bp76j7hfyqa0c ... 0Front.JPG

https://www.dropbox.com/s/lzrwpwfqrxwj3 ... 20Back.JPG

https://www.dropbox.com/s/5jmq4on4aew73 ... minals.JPG

Door sensor:
https://www.dropbox.com/s/ppcjdworgfh84 ... Sensor.JPG

How i installed the relay board in the garage door housing:
https://www.dropbox.com/s/1yhk2gcys31v4 ... talled.JPG

DarkTherapy
Posts: 69
Joined: Mon Aug 20, 2012 8:14 am

Re: Siri: Open my garage door..

Sun Jan 13, 2013 7:52 am

@RugYG What is the sensor used for?

Return to “General discussion”