Coder Social home page Coder Social logo

robinmeis / siri-api Goto Github PK

View Code? Open in Web Editor NEW
87.0 23.0 23.0 834 KB

Siri-API is a tool which opens Apples Siri for your own wishes WITHOUT the requirement of a Jailbreak. You can predefine keywords which execute your own python code when they are found in a request.

Home Page: use Python 3ws of Apples Siri. It should woww.blog.smartnoob.de

Python 91.52% JavaScript 2.19% CSS 6.29%

siri-api's Introduction

This version is not iOS8 compatible. You can find a iOS8 compatible version here: https://github.com/HcDevel/SiriAPI8

Siri-API

Siri-API is a tool which opens Siri for your own wishes WITHOUT the requirement of a Jailbreak. Basically it is like GoogolPlex but it is much more flexible since you can host it on your own computer. You just say Google and your keyword, by default "Siri" and everything what you say after your keyword will be redirected to the API. Of course, using Google without the keyword is still possible.

You need a Linux running computer (tested on Raspberry Pi) and a Squid Proxy version compiled with SSL support. These versions aren't available from official package sources, so you have to compile it by yourself. You can follow the instructions in the documentation.

You can watch the demo video on http://youtu.be/b2F7PAwpjcY to see what is possible with Siri-API. I use the program for my home automation system but any other usage is possible. You just have to write your own rules and commands in Python 3. With the easy to use API it is just a game. I also provide a working squid.conf configuration file for usage with the API. If you're already running Squid Proxy for other services you HAVE to change it so, that Squid still works in your environment.

I tested Siri-API on an iPhone 5S with iOS 7 but it should also work with other iDevices supporting Siri and older iOS versions.

You can find the documentation at https://github.com/HcDevel/Siri-API/wiki/_pages
The installation instructions can be found at https://github.com/HcDevel/Siri-API/wiki/Installation-%28Version-1.0.x%29

If you have any problem, please report it by opening an issue in the issue tracker.

siri-api's People

Contributors

igmt avatar robinmeis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

siri-api's Issues

Squid dosent start on startup

Hello,
my server doesn't start on startup completely

I have 2 commands in crontab -e:
1:
@reboot /usr/local/squid/sbin/squid
2:
@reboot /home/pi/Siri-API/start.sh &

But only the server starts.
Why does squid doesn't start?
When I type the command manually all works fine!

Thank You for help

Siri internal Bing search??

Is it possible to use the internal Bing search for the own commands, then the browser does not always have to be opened?
Thanks for answers

Deal with upper and lower cases

Great program! I've been waiting for a replacement for siriproxy since ios7 came out.

One request, can you modify the program to match on ANY case. Had a devil of a time figuring out why it wouldn't use the keyword apple. Turns out it was coming into the server as "Apple" instead of "apple". Also had to figure out Tivo only matches on "TiVo"

Thanks!

Voice feedback support

Hi,

Would be great to add TTS to this api. iOS 7 is compatible with speech synthesis as described here : http://www.sitepoint.com/talking-web-pages-and-the-speech-synthesis-api/

You can even try on safari with a live demo : http://aurelio.audero.it/demo/speech-synthesis-api-demo.html

The advantage here, would be to receive voice notifications without the need to look at his device a bit like any standard siri interactions.

Should be a simple change into document.py no? Either we can adapt existing methods - "incoming" or "outgoing" - or add a new one (tts ?) in case we want to be able to diferentiate the feedbacks with or without speech synthesis.

Regards,
Johnny - a french fan

This page is unavailable

Hello,
I`ve installed it. Everything worked perfectly, except that when I search for "Siri", it returns Page Unavailable. Do you know why? I have tried to change the keyword, and the same error occurs. I have tried to change google.com to google.com.br , the same....
Any idea?
Thank you!!

google normally appears

i'have start the server,
I see lines in the terminal but it is google that normally appears

root@ubuntu:~/Siri-API# python3 server.py
Starting Server...
Server listening on port 3030...
Press enter to exit/proxy.pac
192.168.0.3 - - [26/Apr/2014 04:33:07] "GET /proxy.pac HTTP/1.1" 200 -
/proxy.pac
192.168.0.3 - - [26/Apr/2014 04:33:09] "GET /proxy.pac HTTP/1.1" 200 -
/proxy.pac
192.168.0.3 - - [26/Apr/2014 04:34:05] "GET /proxy.pac HTTP/1.1" 200 -
/proxy.pac
192.168.0.3 - - [26/Apr/2014 04:34:07] "GET /proxy.pac HTTP/1.1" 200 -
/proxy.pac
192.168.0.3 - - [26/Apr/2014 04:34:48] "GET /proxy.pac HTTP/1.1" 200 -
/proxy.pac
192.168.0.3 - - [26/Apr/2014 04:34:48] "GET /proxy.pac HTTP/1.1" 200 -
/proxy.pac
192.168.0.3 - - [26/Apr/2014 04:35:37] "GET /proxy.pac HTTP/1.1" 200 -
/proxy.pac
192.168.0.3 - - [26/Apr/2014 04:35:38] "GET /proxy.pac HTTP/1.1" 200 -
/proxy.pac
192.168.0.3 - - [26/Apr/2014 04:36:28] "GET /proxy.pac HTTP/1.1" 200 -

Google Siri turn on light one dont work

I have followed your installation steps but the command just opening up google with that search result.
Please help.

2014/08/20 06:15:21| SECURITY NOTICE: auto-converting deprecated "ssl_bump allow <acl>" to "ssl_bump client-first <acl>" which is usually inferior to the newer server-first bumping mode. Update your ssl_bump rules.
2014/08/20 06:15:21| WARNING: auto-converting deprecated "ssl_bump deny <acl>" to "ssl_bump none <acl>". Update your ssl_bump rules.
2014/08/20 06:15:21| SECURITY NOTICE: auto-converting deprecated implicit "ssl_bump allow all" to "ssl_bump client-first all" which is usually inferior to the newer server-first bumping mode. New ssl_bump configurations must not use implicit rules. Update your ssl_bump rules.
2014/08/20 06:15:21| SECURITY NOTICE: auto-converting deprecated "ssl_bump allow <acl>" to "ssl_bump client-first <acl>" which is usually inferior to the newer server-first bumping mode. Update your ssl_bump rules.
2014/08/20 06:15:21| Current Directory is /usr/local/squid/etc
2014/08/20 06:15:21| Starting Squid Cache version 3.4.4 for armv6l-unknown-linux-gnu...
2014/08/20 06:15:21| Process ID 6812
2014/08/20 06:15:21| Process Roles: master worker
2014/08/20 06:15:21| With 1024 file descriptors available
2014/08/20 06:15:21| Initializing IP Cache...
2014/08/20 06:15:21| DNS Socket created at [::], FD 5
2014/08/20 06:15:21| DNS Socket created at 0.0.0.0, FD 6
2014/08/20 06:15:21| Adding domain lan from /etc/resolv.conf
2014/08/20 06:15:21| Adding domain lan from /etc/resolv.conf
2014/08/20 06:15:21| Adding nameserver 192.168.1.254 from /etc/resolv.conf
2014/08/20 06:15:21| helperOpenServers: Starting 5/32 'ssl_crtd' processes
2014/08/20 06:15:22| Logfile: opening log daemon:/usr/local/squid/var/logs/access.log
2014/08/20 06:15:22| Logfile Daemon: opening log /usr/local/squid/var/logs/access.log
2014/08/20 06:15:22| Store logging disabled
2014/08/20 06:15:22| Swap maxSize 0 + 262144 KB, estimated 20164 objects
2014/08/20 06:15:22| Target number of buckets: 1008
2014/08/20 06:15:22| Using 8192 Store buckets
2014/08/20 06:15:22| Max Mem  size: 262144 KB
2014/08/20 06:15:22| Max Swap size: 0 KB
2014/08/20 06:15:22| Using Least Load store dir selection
2014/08/20 06:15:22| Current Directory is /usr/local/squid/etc
2014/08/20 06:15:22| Finished loading MIME types and icons.
2014/08/20 06:15:22| HTCP Disabled.
2014/08/20 06:15:22| Squid plugin modules loaded: 0
2014/08/20 06:15:22| Adaptation support is off.
2014/08/20 06:15:22| Accepting SSL bumped HTTP Socket connections at local=[::]:3128 remote=[::] FD 19 flags=9
2014/08/20 06:15:23| storeLateRelease: released 0 objects```

Siri API installation on RPi

Hi. I am excited about getting this going for my home automation project (openHAB on RPi). Your installation procedures were working just fine until step 5 where "sudo chown -R squid:squid /usr/local/squid/var/logs/" produced "no such file or directory". Also /usr/local/squid/sbin/squid does not yet exist. Any advice would be much appreciated.

afetr run Squid ...

hello,
after install Squid, it don't run :

cm@cm-E1210:~$ /usr/local/squid/sbin/squid -NCd9
2014/11/05 13:41:51| SECURITY NOTICE: auto-converting deprecated "ssl_bump allow " to "ssl_bump client-first " which is usually inferior to the newer server-first bumping mode. Update your ssl_bump rules.
2014/11/05 13:41:51| WARNING: auto-converting deprecated "ssl_bump deny " to "ssl_bump none ". Update your ssl_bump rules.
WARNING: Cannot write log file: /usr/local/squid/var/logs/cache.log
/usr/local/squid/var/logs/cache.log: Permission denied
messages will be sent to 'stderr'.
2014/11/05 13:41:51| SECURITY NOTICE: auto-converting deprecated implicit "ssl_bump allow all" to "ssl_bump client-first all" which is usually inferior to the newer server-first bumping mode. New ssl_bump configurations must not use implicit rules. Update your ssl_bump rules.
2014/11/05 13:41:51| SECURITY NOTICE: auto-converting deprecated "ssl_bump allow " to "ssl_bump client-first " which is usually inferior to the newer server-first bumping mode. Update your ssl_bump rules.
2014/11/05 13:41:51| Current Directory is /home/cm
WARNING: Cannot write log file: /usr/local/squid/var/logs/cache.log
/usr/local/squid/var/logs/cache.log: Permission denied
messages will be sent to 'stderr'.
2014/11/05 13:41:51| WARNING: Closing open FD 2
2014/11/05 13:41:51| Starting Squid Cache version 3.4.4 for i686-pc-linux-gnu...
2014/11/05 13:41:51| Process ID 4580
2014/11/05 13:41:51| Process Roles: master worker
2014/11/05 13:41:51| With 1024 file descriptors available
2014/11/05 13:41:51| Initializing IP Cache...
2014/11/05 13:41:51| DNS Socket created at [::], FD 4
2014/11/05 13:41:51| DNS Socket created at 0.0.0.0, FD 5
2014/11/05 13:41:51| Adding nameserver 127.0.0.1 from /etc/resolv.conf
2014/11/05 13:41:51| helperOpenServers: Starting 5/32 'ssl_crtd' processes
2014/11/05 13:41:51| WARNING: no_suid: setuid(0): (1) Operation not permitted
2014/11/05 13:41:51| WARNING: no_suid: setuid(0): (1) Operation not permitted
2014/11/05 13:41:51| WARNING: no_suid: setuid(0): (1) Operation not permitted
2014/11/05 13:41:51| WARNING: no_suid: setuid(0): (1) Operation not permitted
2014/11/05 13:41:51| WARNING: no_suid: setuid(0): (1) Operation not permitted
2014/11/05 13:41:51| Logfile: opening log daemon:/usr/local/squid/var/logs/access.log
2014/11/05 13:41:51| Logfile Daemon: opening log /usr/local/squid/var/logs/access.log
2014/11/05 13:41:51| WARNING: no_suid: setuid(0): (1) Operation not permitted
fopen: Permission denied
2014/11/05 13:41:51| Store logging disabled
2014/11/05 13:41:51| Swap maxSize 0 + 262144 KB, estimated 20164 objects
2014/11/05 13:41:51| Target number of buckets: 1008
2014/11/05 13:41:51| Using 8192 Store buckets
2014/11/05 13:41:51| Max Mem size: 262144 KB
2014/11/05 13:41:51| Max Swap size: 0 KB
2014/11/05 13:41:51| Using Least Load store dir selection
2014/11/05 13:41:51| Current Directory is /home/cm
2014/11/05 13:41:51| Finished loading MIME types and icons.
2014/11/05 13:41:51| commBind: Cannot bind socket FD 18 to [::]:3128: (98) Address already in use
2014/11/05 13:41:51| HTCP Disabled.
2014/11/05 13:41:51| /usr/local/squid/var/run/squid.pid: (13) Permission denied
2014/11/05 13:41:51| Closing HTTP port [::]:3128
FATAL: Could not write pid file
Squid Cache (Version 3.4.4): Terminated abnormally.
CPU Usage: 0.144 seconds = 0.116 user + 0.028 sys
Maximum Resident Size: 39968 KB
Page faults with physical i/o: 0
Memory usage for squid via mallinfo():
total space in arena: 4228 KB
Ordinary blocks: 4170 KB 3 blks
Small blocks: 0 KB 1 blks
Holding blocks: 580 KB 2 blks
Free Small blocks: 0 KB
Free Ordinary blocks: 57 KB
Total in use: 4750 KB 112%
Total free: 57 KB 1%
Abandon (core dumped)

how resolve it and run squid ?

thank you

plugin for siri api

Do we need any plugin for siri api to work with home automation. I mean that, how siri api communicate
with the accessories in smarthome?

Problem with Raspberry Pi and Python

Hi,
I have a problem when I execute this command:

sudo python3 server.py

This error shows:
pi@pi ~/Siri-API $ sudo python3 server.py
Traceback (most recent call last):
File "server.py", line 7, in
from commands import commands
File "/home/pi/Siri-API/commands.py", line 1, in
from document import document
File "/home/pi/Siri-API/document.py", line 10, in
import urllib.request
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb2 in position 44: invalid start byte
pi@pi ~/Siri-API $

On my other server, no Raspberry, all works perfekt. (But I have not completed because I wanted to bring the server to be running on the Raspberry Pi)

What I have to do?

Thans for your help :)

Issue with iOS8

Upgraded my phone to iOS8 and now receive the following message in Safari:

"there was a problem communicating with the secure web proxy server (HTTPS)"

Used another phone (iOS7) in the house and it works fine, so squid and Siri-API seem to be running correctly.

Any ideas?

add command

I added a command and I get an error.

the command:
self.keywords.append({'find': ['telecommande'], 'call': 'remote'})

def remote(self, q, wildcards):
html = document(self.connection)
html.redirect("http://192.168.0.5/freeremote/" ) #Only works in my setup
html.send()

the error:
root@ubuntu:~/Siri-API# python3 server.py
Traceback (most recent call last):
File "server.py", line 7, in
from commands import commands
File "/root/Siri-API/commands.py", line 10
self.keywords.append({'find': ['telecommande'], 'call': 'remote'})
^
IndentationError: unindent does not match any outer indentation level

Search defect

I am using the following command:

self.keywords.append({'find': [['turn', '', 'the volume in the', '', 'room'], ['turn', '', 'the volume in the', ''], ['turn', '', 'the volume', '']], 'call': 'volumeupdown'})

If if say "google please turn down the volume in the kitchen", it should match the second command, but this does not work. The first works (e.g. living room) and the last works (e.g. outdoors). When I add a print statement when a wildcard is found, the search.py is setting the wildcard to "down the volume in".

Html respond auto close

Hi,

Does is possible to modify document.py to add fonction for closing html answer page and don't have to much tab open in safari after lot of request ?

Thanks !

Using wildcard for the first search word does not work

I tried to use wildcards[0] to reflect "open" or "close" with this keyword statement, however, it does not work. I suspect the problem is using "*" as the first search phrase.

self.keywords.append({'find': [['*', 'the', 'garage']], 'call': 'garage'})

ssl cert

hi,

Thank you for your job, this is huge.

i have a problem when i put this command at the step 7:

sudo openssl req -new -newkey rsa:1024 -days 3065 -nodes -x509 -keyout siri-api.pem -out siri-api.pem sudo chown -R squid:squid /usr/local/squid/ssl_cert

i have this messgae:

unknown option sudo
req [options] outfile
where options are
-inform arg input format - DER or PEM
-outform arg output format - DER or PEM
-in arg input file
-out arg output file
-text text form of request
-pubkey output public key
-noout do not output REQ....

can you help me?

Thank's

https resquest

Hello,

All is working excep when i use Siri to send search request to google, siri api didn't catch search request.
It seems https request don't work for me (ios 7) ?

When i launch squid with: sudo /usr/local/squid/sbin/squid
i get :
2015/03/05 09:42:14| SECURITY NOTICE: auto-converting deprecated "ssl_bump allow " to "ssl_bump client-first " which is usually inferior to the newer server-first bumping mode. Update your ssl_bump rules.
2015/03/05 09:42:14| WARNING: auto-converting deprecated "ssl_bump deny " to "ssl_bump none ". Update your ssl_bump rules.

thanks for you help and for your work !

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.