elvisimprsntr
Posts: 131
Joined: Sat Dec 29, 2012 11:36 pm
Contact: Website

Siri Voice Controlled Home Automation

Sat Dec 29, 2012 11:42 pm

BACKGROUND

I was able to successfully get SiriProxy installed and running on a RPi. I am now using several SiriProxy plugins (some others wrote, some I modified, some I wrote from scratch) to a allow me to control:

1. Insteon lighting/devices
2. Elk security system
3. Garage door
4. Nest thermostat
5. IP cameras
6. IR devices

HOW TOS

Instructions for SiriProxy on RPi
https://github.com/plamoni/SiriProxy/wi ... on-How-Tos

Instructions and demo videos for voice controlled home automaton
https://github.com/elvisimprsntr





Enjoy!


Elvis
http://www.youtube.com/user/TheElvisImprsntr

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

Re: Siri Voice Controlled Home Automation

Tue Jan 01, 2013 8:21 am

Great work! I'm glad SiriProxy on the Pi inspires more home automation development.

elvisimprsntr
Posts: 131
Joined: Sat Dec 29, 2012 11:36 pm
Contact: Website

Re: Siri Voice Controlled Home Automation

Tue Jan 01, 2013 1:40 pm

DarkTherapy wrote:Great work! I'm glad SiriProxy on the Pi inspires more home automation development.
Actually, I had SiriProxy running on an ARM based plug computer some time ago for Siri control of my home automation. I have been documenting installation instructions for various distros and form factors: https://github.com/plamoni/SiriProxy/wi ... on-How-Tos

Santa gave me RPi for Xmas which only took a few hours to port everything to the RPi. Demo videos coming soon...

For those who are interested in a pre-loaded vanilla (i.e. no proprietary/paid software/codecs) SD image with SiriProxy already installed (OS ID/PW root/siriproxy): https://sourceforge.net/projects/siriproxyrpi/

No instructions yet on the SF page, but an experienced RPi user should be able to figure it out.

Happy New Year!

Elvis
http://www.youtube.com/user/TheElvisImprsntr

elvisimprsntr
Posts: 131
Joined: Sat Dec 29, 2012 11:36 pm
Contact: Website

Re: Siri Voice Controlled Home Automation

Wed Jan 02, 2013 8:19 pm

elvisimprsntr wrote: No instructions yet on the SF page, but an experienced RPi user should be able to figure it out.
My SiriProxy on RPi SD image SF page now includes instructions: http://sourceforge.net/projects/siriproxyrpi

Elvis
http://www.youtube.com/user/TheElvisImprsntr

elvisimprsntr
Posts: 131
Joined: Sat Dec 29, 2012 11:36 pm
Contact: Website

Re: Siri Voice Controlled Home Automation

Fri Jan 04, 2013 11:24 pm

As promised, demo video of SiriProxy on RPi used for home automation control.

http://youtu.be/PXmCiaRc9XU

Elvis
http://www.youtube.com/user/TheElvisImprsntr

AndyMcB1
Posts: 7
Joined: Sat Jan 05, 2013 1:48 am

Re: Siri Voice Controlled Home Automation

Sat Jan 05, 2013 1:55 am

I want to do exactly this.
However I'm a bit confused as to what hardware I need.

If I want to switch a DC (0V-12V) appliance do I hook the relay straight into the GPIO pins? Do I need a resistor, or what..

Any help is much appreciated.

elvisimprsntr
Posts: 131
Joined: Sat Dec 29, 2012 11:36 pm
Contact: Website

Re: Siri Voice Controlled Home Automation

Sat Jan 05, 2013 4:32 am

AndyMcB1 wrote:I want to do exactly this.
However I'm a bit confused as to what hardware I need.

If I want to switch a DC (0V-12V) appliance do I hook the relay straight into the GPIO pins? Do I need a resistor, or what..

Any help is much appreciated.
In my example, I am using a dry NO relay in my security panel to control the garage door, which the RPi sends HTTP commands to the REST API of my home automation controller.

From what I have read, the RPi GPIO pins are low current logic level signals which cannot drive a relay directly. There are many different solutions, but here is one: http://www.raspberrypi.org/phpBB3/viewt ... 37&t=26137

Elvis
http://www.youtube.com/user/TheElvisImprsntr

elvisimprsntr
Posts: 131
Joined: Sat Dec 29, 2012 11:36 pm
Contact: Website

Re: Siri Voice Controlled Home Automation

Mon Jan 07, 2013 4:35 am

I updated the video description to include more details until I get my SF blog running.

http://www.youtube.com/watch?v=PXmCiaRc9XU

Elvis
http://www.youtube.com/user/TheElvisImprsntr

wkellen
Posts: 6
Joined: Thu Dec 27, 2012 2:56 pm

Re: Siri Voice Controlled Home Automation

Thu Jan 17, 2013 7:18 pm

I have siriserver running on an Ubuntu webserver at home. It uses the serial and parallel ports to control home automation. I tell her to turn the outside light on and she replies "Let me see if I can reach the swith." followed by "I got it master, the outside light is on." When I tell her to unlock the door, she responds with "Hold on, I will be right there." After the striker plate finishes she responds with "Welcome home Master, I have a cold beer for you." My wife can't stand Siri. :lol:

elvisimprsntr
Posts: 131
Joined: Sat Dec 29, 2012 11:36 pm
Contact: Website

Re: Siri Voice Controlled Home Automation

Thu Jan 17, 2013 10:08 pm

LOL! I am sure you could ask Siri "let's go to bed" which she turns off the lights, locks the doors, says "I'll be right there big boy! Let me slip into something more comfortable first." :shock:
http://www.youtube.com/user/TheElvisImprsntr

elvisimprsntr
Posts: 131
Joined: Sat Dec 29, 2012 11:36 pm
Contact: Website

Re: Siri Voice Controlled Home Automation

Sat Jan 26, 2013 2:06 pm

I posed a new SD card image with the latest Ruby and a few tweaks to make it even easier to get started with SiriProxy

http://sourceforge.net/p/siriproxyrpi/n ... 013-01-24/

I've also been making the Wiki page instructions a little better.

http://sourceforge.net/p/siriproxyrpi/wiki/Home/


Enjoy

Elvis
http://www.youtube.com/user/TheElvisImprsntr

tpi
Posts: 3
Joined: Mon Jan 28, 2013 5:14 am

Re: Siri Voice Controlled Home Automation

Mon Jan 28, 2013 5:49 am

I downloaded your SD card image and booted my RPi but I can't figure out what the username and password is. What is the default user id and/or root password?
Thanks,
Tom

elvisimprsntr
Posts: 131
Joined: Sat Dec 29, 2012 11:36 pm
Contact: Website

Re: Siri Voice Controlled Home Automation

Mon Jan 28, 2013 11:05 am

tpi wrote:I downloaded your SD card image and booted my RPi but I can't figure out what the username and password is. What is the default user id and/or root password?
Thanks,
Tom

The default ID/PW is listed on the release notice page

http://sourceforge.net/p/siriproxyrpi/n ... 013-01-24/
http://www.youtube.com/user/TheElvisImprsntr

tpi
Posts: 3
Joined: Mon Jan 28, 2013 5:14 am

Re: Siri Voice Controlled Home Automation

Tue Jan 29, 2013 3:28 pm

I cannot get siriproxy to work on my rpi.

I went through your install and everything seems fine. But when I ask Siri a question I don't get any message on the terminal where the server is running and I get normal Apple responses.

I have done the following:

When I first installed everything according to your instructions here: http://sourceforge.net/p/siriproxyrpi/wiki/Home/
I tested Siri and it said "everything is working" (or something like that) and I was fooled into thinking it was actually talking to the proxy. So I went to the next steps of installing the plugin for the ISY99. I later realized that was an Apple response, not the proxy.

0) I went to /usr/local/rvm/gems/[email protected]/gems/siriproxy-0.3.2/plugins/ and extracted the distribution so I have:
[email protected]:~/SiriProxy# cd /usr/local/rvm/gems/[email protected]/gems/siriproxy-0.3.2/plugins/
[email protected]:/usr/local/rvm/gems/[email protected]/gems/siriproxy-0.3.2/plugins# ls
siriproxy-example siriproxy-isy99i
I followed the rest of the instructions here https://github.com/elvisimprsntr/siriproxy-isy99i

So,

1) On my iphone (4s) I turn off cellular data. I edit the wifi settings for the network I am on and change DNS to point to the rpi ip address (let's say that is 192.168.0.5). I know the rpi is reachable from my phone as I can ssh into it (using a ssh app on iphone).

2) created and added ca.pem to my phone (emailed to myself and installed in dialog)

3) I edited /etc/dnsmasq.conf thusly:
# Config line for SiriProxy
# NOTE: Change #'s to the IP address of the RPi and uncomment
server=/guzzoni.apple.com/192.168.0.5

4) I have this in ~/.siriproxy/config.yml:
listen: 0.0.0.0
port: 443
log_level: 1
plugins:

- name: 'Example'
path: './plugins/siriproxy-example'

- name: 'Isy99i'
path: './plugins/siriproxy-isy99i'
isyip: 'http://192.168.0.100' #IP address of the ISY-99i
isyid: 'admin'
isypw: 'admin'

5) I create the bundle:
[email protected]:~/.siriproxy# cd ~/SiriProxy/
[email protected]:~/SiriProxy# siriproxy bundle
Using rake (10.0.3)
Using CFPropertyList (2.1.2)
Using geocoder (1.1.6)
Using cora (0.0.4)
Using eventmachine (1.0.0)
Using multi_json (1.5.0)
Using multi_xml (0.5.2)
Using httparty (0.10.2)
Using uuidtools (2.1.3)
Using siriproxy (0.3.2) from source at .
Using siriproxy-example (0.0.1) from source at ./plugins/siriproxy-example
Using siriproxy-isy99i (0.0.1) from source at ./plugins/siriproxy-isy99i
Using bundler (1.2.3)
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.

6) I install bundle:
[email protected]:~/SiriProxy# bundle install
Using rake (10.0.3)
Using CFPropertyList (2.1.2)
Using geocoder (1.1.6)
Using cora (0.0.4)
Using eventmachine (1.0.0)
Using multi_json (1.5.0)
Using multi_xml (0.5.2)
Using httparty (0.10.2)
Using uuidtools (2.1.3)
Using siriproxy (0.3.2) from source at .
Using siriproxy-example (0.0.1) from source at ./plugins/siriproxy-example
Using siriproxy-isy99i (0.0.1) from source at ./plugins/siriproxy-isy99i
Using bundler (1.2.3)
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.

7) I start server (and get a warning - should I care and how do I get rid of it?):
[email protected]:~/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 0.0.0.0:443..
SiriProxy up and running.


8) I go to phone and say "test siri proxy" and get a response from Apple, not the proxy. I see no messages or anything on the rpi.

What should i do to debug this?
Thanks,
Tom

elvisimprsntr
Posts: 131
Joined: Sat Dec 29, 2012 11:36 pm
Contact: Website

Re: Siri Voice Controlled Home Automation

Tue Jan 29, 2013 4:37 pm

tpi wrote: 3) I edited /etc/dnsmasq.conf thusly:
# Config line for SiriProxy
# NOTE: Change #'s to the IP address of the RPi and uncomment
server=/guzzoni.apple.com/192.168.0.5

7) I start server (and get a warning - should I care and how do I get rid of it?):
[email protected]:~/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 0.0.0.0:443..
SiriProxy up and running.

8) I go to phone and say "test siri proxy" and get a response from Apple, not the proxy. I see no messages or anything on the rpi.

What should i do to debug this?
Thanks,
Tom
3. I assume you restarted DNSMASQ after making the tweaks.

7. Since you are running SP as root, you don't need the rvmsudo, just `siriproxy server`

8. Even with cellular data turned off, sometimes it takes a 5 second off toggle of airplane mode. Double check the DNS entry after you do. The first time, sometimes you have to launch Siri and wait 5-10 seconds, exit Siri, and launch Siri a second time. You will have to talk to Scott Forstall's replacement about that, but it seems that once Siri successfully connects to SP it is more reliable, perhaps after iOS caches something.

More ideas here if you have not already tried them: http://stackoverflow.com/questions/1407 ... ne-1-0-0-r
http://www.youtube.com/user/TheElvisImprsntr

elvisimprsntr
Posts: 131
Joined: Sat Dec 29, 2012 11:36 pm
Contact: Website

Re: Siri Voice Controlled Home Automation

Tue Jan 29, 2013 5:07 pm

My bad. the line in the dnsmasq.conf file needs to read

address=/guzzoni.apple.com/###.###.###.###

The instructions on the Wiki were correct, but the line in the file read `server=`

I added a known issue to the release news page.

Thanks for letting me know!
http://www.youtube.com/user/TheElvisImprsntr

tpi
Posts: 3
Joined: Mon Jan 28, 2013 5:14 am

Re: Siri Voice Controlled Home Automation

Tue Jan 29, 2013 7:54 pm

Oh, cool! Thanks, it is working now. I am glad it wasn't something I was doing stupidly! :)
Tom

elvisimprsntr
Posts: 131
Joined: Sat Dec 29, 2012 11:36 pm
Contact: Website

Re: Siri Voice Controlled Home Automation

Fri Feb 15, 2013 3:37 am

for those that are still following voice control on RPi. I updated my SiriProxy plugin for the www.thinkflood.com redeye IP2IR controllers to make it auto discovery.

https://github.com/elvisimprsntr/siriproxy-redeye
http://www.youtube.com/user/TheElvisImprsntr

elvisimprsntr
Posts: 131
Joined: Sat Dec 29, 2012 11:36 pm
Contact: Website

Re: Siri Voice Controlled Home Automation

Sat Feb 16, 2013 11:22 pm

Just released! A new SD card image with the latest Ruby and SiriProxy installed.

http://sourceforge.net/p/siriproxyrpi/n ... 013-02-16/
http://www.youtube.com/user/TheElvisImprsntr

theinrich
Posts: 17
Joined: Sun Feb 10, 2013 3:55 pm

Re: Siri Voice Controlled Home Automation

Mon Feb 18, 2013 9:45 pm

Hi elvisimprsntr,

I'm using your latest image.
Great work, thank you so much 8-) 8-)

I already got SiriProxy running.

Now I want to try to install a plugin.
Unfortunatly I always get this message:

Code: Select all

[email protected]:~/SiriProxy/bin# ./siriproxy bundle
The source :gemcutter is deprecated because HTTP requests are insecure.
Please change your source to 'https://rubygems.org' if possible, or 'http://rubygems.org' if not.
Fetching gem metadata from http://rubygems.org/..........
Fetching gem metadata from http://rubygems.org/..
Resolving dependencies...
Could not find gem 'siriproxy-mac-control (>= 0) ruby' in source at ./plugins/siriproxy-computer-master.
Source does not contain any versions of 'siriproxy-mac-control (>= 0) ruby'
Anybody an idea where my fault is?
I believe there is a problem with the path.
I should mentioned that I'm a newbie :oops:

Cheers Thomas

elvisimprsntr
Posts: 131
Joined: Sat Dec 29, 2012 11:36 pm
Contact: Website

Re: Siri Voice Controlled Home Automation

Tue Feb 19, 2013 6:43 am

Not sure what instructions you were following, but don't run siriproxy bundle command from within the bin directory. Run from the ~/SiriProxy directory
http://www.youtube.com/user/TheElvisImprsntr

theinrich
Posts: 17
Joined: Sun Feb 10, 2013 3:55 pm

Re: Siri Voice Controlled Home Automation

Thu Feb 21, 2013 12:07 pm

I did a fresh install and now it works :D

elvisimprsntr
Posts: 131
Joined: Sat Dec 29, 2012 11:36 pm
Contact: Website

Re: Siri Voice Controlled Home Automation

Thu Mar 14, 2013 4:34 pm

Just posted a new SiriProxy on RPi SD card image.

http://sourceforge.net/p/siriproxyrpi/n ... rce=navbar

Significant changes:
Ruby 2.0.0-p0
SiriProxy 0.5.2

Enjoy!

Elvis
http://www.youtube.com/user/TheElvisImprsntr

garethswright
Posts: 5
Joined: Thu Feb 21, 2013 6:14 pm

Re: Siri Voice Controlled Home Automation

Fri Mar 15, 2013 9:46 am

I've taken to using Status remote plugs, you can pick them up from pretty much any UK supermarket.
They run on 433.97Mhz and your Pi can control them directly using https://github.com/GarethWright/pihat and a 20cm piece of wire attached to GPIO4 :)

That the same technique I used for my Siri controlled Kettle http://www.youtube.com/watch?v=e29h7EZxMaY

mik79
Posts: 4
Joined: Sun Mar 17, 2013 6:00 pm
Location: NRW Germany

Re: Siri Voice Controlled Home Automation

Sun Mar 17, 2013 6:18 pm

Hi,

thank you very much for the image. i installed it on friday an now i can control my home (roller shutter, light) with Siri !!

but now i have got the problem, that i'm not able to start siriproxy as a service or from rc.local....

i tried it with an init.d script

cd /root/.siriproxy/ && siriproxy server -d 192.168.191.12 -u no &

but i got this error:

/usr/local/rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/dependency.rb:296:in `to_specs': Could not find 'bundler' (>= 0) among 17 total gem(s) (Gem::LoadError)

Can anyone help me?

Thanks

Michael

Return to “Automation, sensing and robotics”