Git Product home page Git Product logo

siriservercore's People

Contributors

blast-hardcheese avatar jimmykane avatar jz1 avatar trevor403 avatar zaidelkurdi 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  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

siriservercore's Issues

Cannot get Siri to work on my Iphone4, log posted.

Hi there, Just bought the SiriServer Setup utility from Cydia but cannot get it to work. What am I doing wrong? I tried re-installing both Siriserver and Spire without luck, tried both with the "certificate" that was in the first version and without.

I also signed up for a few API websites to add them to the basic support.

Here is my log, all help would be greatly appreciated.

INFO Starting server on port 4443
WARNING Starting, as requested, without SSL, connections are not secured and can be altered and eavesdropped on from client to server
INFO Loading Session Certificates
INFO Setting Up Database
INFO Connection to Database
INFO Loading Plugin Framework
CRITICAL Failed loading plugin due to missing API key: 'Could not find API key for: googleemail. Please check your apiKeys.conf'
CRITICAL Failed loading plugin due to missing API key: 'Could not find API key for: bing. Please check your apiKeys.conf'
CRITICAL Failed loading plugin due to missing API key: 'Could not find API key for: sickbeard_host. Please check your apiKeys.conf'
CRITICAL Failed loading plugin due to missing API key: 'Could not find API key for: twitter_consumer_key. Please check your apiKeys.conf'
CRITICAL Failed loading plugin due to missing API key: 'Could not find API key for: yelp. Please check your apiKeys.conf'
CRITICAL Failed loading plugin due to missing API key: 'Could not find API key for: wundergrounds. Please check your apiKeys.conf'
CRITICAL Failed loading plugin due to missing API key: 'Could not find API key for: wordnik. Please check your apiKeys.conf'
CRITICAL Failed loading plugin due to missing API key: 'Could not find API key for: wolframalpha. Please check your apiKeys.conf'
INFO Server is running and listening for connections
INFO New connection from 127.0.0.1 on port 49156
INFO Currently 1 clients connected
WARNING Database error on fetching assistant
INFO Connection timed out
INFO Connection Closed: Connection was closed cleanly.
INFO Currently 0 clients connected
INFO New connection from 127.0.0.1 on port 49166
INFO Currently 1 clients connected
INFO Connection timed out
INFO Connection Closed: Connection was closed cleanly.
INFO Currently 0 clients connected
INFO New connection from 127.0.0.1 on port 49217
INFO Currently 1 clients connected
INFO Connection timed out
INFO Connection Closed: Connection was closed cleanly.
INFO Currently 0 clients connected
INFO New connection from 127.0.0.1 on port 49227
INFO Currently 1 clients connected
INFO Connection timed out
INFO Connection Closed: Connection was closed cleanly.
INFO Currently 0 clients connected
INFO New connection from 127.0.0.1 on port 49455
INFO Currently 1 clients connected
INFO Sending flac to google for recognition
INFO Best matching result: "Hello" with a confidence of 52.82%
INFO Connection timed out
INFO Connection Closed: Connection was closed cleanly.
INFO Currently 0 clients connected
INFO New connection from 127.0.0.1 on port 49466
INFO Currently 1 clients connected
INFO Sending flac to google for recognition
INFO Best matching result: "Hello" with a confidence of 82.42%
INFO Connection Closed: Connection was closed cleanly.
INFO Currently 0 clients connected
INFO New connection from 127.0.0.1 on port 49518
INFO Currently 1 clients connected
INFO Sending flac to google for recognition
INFO Best matching result: "Hello" with a confidence of 90.01%
INFO Connection timed out
INFO Connection Closed: Connection was closed cleanly.
INFO Currently 0 clients connected
INFO New connection from 127.0.0.1 on port 49569
INFO Currently 1 clients connected
INFO Connection timed out
INFO Connection Closed: Connection was closed cleanly.
INFO Currently 0 clients connected
INFO New connection from 127.0.0.1 on port 49679
INFO Currently 1 clients connected
INFO Sending flac to google for recognition
INFO Best matching result: "Wow" with a confidence of 67.98%
INFO Connection timed out
INFO Connection Closed: Connection was closed cleanly.
INFO Currently 0 clients connected
INFO New connection from 127.0.0.1 on port 49845
INFO Currently 1 clients connected
INFO Connection timed out
INFO Connection Closed: Connection was closed cleanly.
INFO Currently 0 clients connected

Hilfe

hi eichhoernchen,

könntest du ein Video oder ne Beschreibung für ganz Dumme machen wie man den Server aufzieht also eine Schritt-für-Schritt-Anleitung

danke im Voraus

readd gen_certs

Hi,

Just thought about re adding the "old" gen_certs stuff may be usefull for some users...

Afaik there are only Little changes needet for the names and folders.

SSL Handshake Failure

I've went through the documentation in the README and did not find any errors. I deleted everything in my keys directory except the EXAMPLE files and the 2 "Session" PEM files. I then re-ran "python SiriServer.py" using the default port of 4443, and checked that it is properly forwarded in my router and that my SiriServer is running the same IP as what I have forwarded to in my router. I continually get the following error:

WARNING SSL related error
WARNING [('SSL routines', 'SSL3_READ_BYTES', 'ssl handshake failure')]

This all started when I updated to the newest version of code about 3 days ago.

Investigation on ram

After some beers, just as i came home the python had stalled on the Public server! Hehe.
Ok no error, just stalled. The server went out of ram.
Reason: Screenshot after 3 exceptions (handled crashes) This screen shot is new! not a log check (edit)
http://dl.dropbox.com/u/2374229/Screenshot%20at%202012-03-11%2004%3A06%3A04.png
I did a log check and found out that after some usual (not connection related) crashes eg key erros etc (unhandled) that the older python process was not killed (quit). Thus taking more and more ram after every crash.

I might be mistaken and this might be totally connection related but i am new to python and I am not sure of Core Concepts.

Also sometimes after some load or some plugins usage the ctrl+C wont exit right and stall at last step.
This might be related to the above ram consumption. I think so at least. Because it's the only reason I can think.

ssl cert generation error

/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/twisted/internet/_sslverify.py:5: DeprecationWarning: the md5 module is deprecated; use hashlib instead
import itertools, md5
I could not find valid certificates. I will now guide you through the process of creating some.
I will create a Certification Authority (CA) first
Workstation1:SiriServerCore workstation$ Traceback (most recent call last):
File "SiriServer.py", line 273, in
main()
File "SiriServer.py", line 250, in main
create_self_signed_cert()
File "SiriServer.py", line 108, in create_self_signed_cert
extensions.append(crypto.X509Extension("basicConstraints", critical=False, value="CA:TRUE"))
TypeError: X509Extension() takes no keyword arguments

CommandSucceeded object ?

I was looking for object CommandSucceeded, but I couldn't find it.
(Look like this)
{"class"=>"CommandSucceeded",
"refId"=>"51a6a02a-79aa-4667-8711-a83540b5b649",
"group"=>"com.apple.ace.system",
"aceId"=>"63E75DC8-2912-4615-BA34-812849710863"}

So I've added it to systemObjects :

class CommandSucceeded(ServerBoundCommand):
groupIdentifier = "com.apple.ace.system"
classIdentifier = "CommandSucceeded"

def __init__(self, plist):
    super(CommandSucceeded, self).__init__(plist)

Not able to email or send texts

Whenever i go to send an email or text, it says sending mail Dr. Willsag (or something) and like html coding. It also does the same thing when i try to send a text.

On another note, an error occurs when i try to check what day it is.

Somebody with Siri Proxy

Hello, I want to create mail plugin, but I need log from Siri Proxy (with debug level) when you are sending/checking emails. So of there is anybody with Siri Proxy please help me.

Cant run SiriServer - errors when making certs.

Hi, Im having issues when running the server for the first time, the error I get is:

3ugeene@Joshua:~/SiriServerCore$ python SiriServer.py

I could not find valid certificates. I will now guide you through the process of creating some.
I will create a Certification Authority (CA) first
I successfully created a CA for you, will now use it to create SSL certificates.
We need to set the correct address of this machine in the certificate.
I will now query your system for its name. But it might be that you want to use a DNS name I cannot find.

-------- IMPORTANT ----------
Your system tells me that your hostname/IP is: Joshua.local
Do you want to use this information (y/n): y

------------ IMPORTANT ------------

All certificates have been generated... You must now install the CA certificate on your device

The file is located at keys/ca.pem in your SiriServer root

Make sure to uninstall an old CA certificate first"

THE CERTIFICATES MUST MATCH! IF YOU DID THIS HERE BEFORE, THE OLD ca.pem WON'T WORK ANYMORE

You can just EMail the keys/ca.pem file to yourself

INFO Starting server on port 4443
INFO Loading Session Certificates
Traceback (most recent call last):
File "SiriServer.py", line 232, in
main()
File "SiriServer.py", line 227, in main
reactor.listenSSL(options.port, SiriFactory(), ssl.DefaultOpenSSLContextFactory(SERVER_KEY_FILE, SERVER_CERT_FILE))
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twisted/internet/posixbase.py", line 444, in listenSSL
p.startListening()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twisted/internet/tcp.py", line 877, in startListening
self.factory.doStart()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twisted/internet/protocol.py", line 45, in doStart
self.startFactory()
File "SiriServer.py", line 56, in startFactory
caFile = open("keys/SessionCACert.pem")
IOError: [Errno 2] No such file or directory: 'keys/SessionCACert.pem'

everything should be installed ok. I am using OS X 10.7 and python 2.7

daemon option

are there any plans to implement a daemon option so one can run the server easy in backround mode?

atm i'm useing screen to do this, but i think a daemon is more comfortable and may be more secure?

im not verry advanced in python but may this is usefull: http://code.activestate.com/recipes/278731-creating-a-daemon-the-python-way/

basicly it forks the process and runs it in the background, logging should be automaticly "redirected" to file output (maybe SiriServer.log in main dir?)

Discussion on plugin coding.

Most of the plugins do not use a lot of ask - reply from user. This is a simple chatbot plugin. http://pastebin.com/SDZgS02B

It Loops on asking the user for something and sends that to a bot service and then asks again etc etc until it hears stop.
Then exits.

The problem is that if she wont hear stop then the plugin freezes the server and needs a kill -9

In my opinion is that a finish signal is not sent. But I am not a plugins expert and can't find any docu of eg proper completion of ask() function. This is where i think the problem comes.

It's simple code and i think it's worth the while to even explain a bit about the plugins ask etc etc

self.ask responces not being processed

Upgraded to the new core and all seems to be working fine except for scripts calling any self.ask functions.
It seems that any information processed after a self.ask will not continue running within the script. It seems that its trying a new query instead of appending to the first request.

Examples of this would be selecting a number when calling a contact or any other script where you would have to provide a verbal response. In the example above (when making a phone call selection, manually selecting it works).

Any ideas?

Connections not decreasing....

I might be wrong but using the Core for one day on the public server i noticed that connection count is not dropping right.
It always increases, drops sometimes but the actual cuncurrent count is wrong.

Eg reports 70 connections while 10-20 may be active.

Nice!

Happy about this. So no pull requests here about plugins etc!
Nice that twisted is here.
Close this issue when you read. Just wanted to contact about this

Lots of people cant connect :(

WARNING SSL related error
WARNING [('SSL routines', 'SSL3_READ_BYTES', 'ssl handshake failure')]
is showing up alot and they have new cert.
Also the HELLO error due to http:// when they have https://

Any clues.

Buttons no longer work?

Hey, I've just noticed that the buttons on screen, like when multiple numbers are listed or you have to press "cancel" or "send", no longer work, they just display the selection on the screen as if you had dictated it. Anyone having this issue?

AttributeError: 'NoneType' object has no attribute 'flush'

Dear Eich.

This error occurs from time to time about two times a day. It is then followd by the inability of anyone to connect by giving a SSL error.
What could be the cause.and can we write a handler for it...

INFO Currently 1 clients connected
INFO Connection timed out
INFO Connection Closed: Connection was closed cleanly.
INFO Currently 0 clients connected
ERROR Unexpected error during plugin processing
Traceback (most recent call last):
File "/home/siri/plugin.py", line 147, in run
self.method(self, self.__speech, self.__lang)
File "/home/siri/plugins/hello/__init
.py", line 6, in st_name
self.say("Hi")
File "/home/siri/plugin.py", line 303, in say
self.send_object(view)
File "/home/siri/plugin.py", line 234, in send_object
self.__send_object(obj)
File "/home/siri/SiriCore.py", line 159, in send_object
self.send_plist(obj.to_plist())
File "/home/siri/SiriCore.py", line 167, in send_plist
self.flush_unzipped_output()
File "/home/siri/SiriCore.py", line 179, in flush_unzipped_output
self.output_buffer += self.compressor.flush(zlib.Z_SYNC_FLUSH)
AttributeError: 'NoneType' object has no attribute 'flush'
INFO New connection from xx.xxx.xxx.xx on port 3463
INFO Currently 1 clients connected
IWARNING SSL related error
WARNING [('SSL routines', 'SSL23_READ', 'ssl handshake failure')]
INFO Currently 0 clients connected

Restarting the server everything starts fine..

Email url

Hi!
Can somebody tell me how to generate URL like apple servers while sending email? In email it needs reference id in url.

Problem with some plugins

ji, i have a problem with some plugins, they fail loading and returns this error:
(this example is for shortMessage plugin, i tried one by one all the plugins and i left the ones who haven't returned an error)

INFO Loading Plugin Framework
Traceback (most recent call last):
File "/usr/lib/python2.6/logging/init.py", line 776, in emit
msg = self.format(record)
File "/usr/lib/python2.6/logging/init.py", line 654, in format
return fmt.format(record)
File "/usr/lib/python2.6/logging/init.py", line 454, in format
s = s + record.exc_text.decode(sys.getfilesystemencoding())
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe8 in position 287: ordinal not in range(128)
can you help me fix this? i can upload somewhere the plugin so that you can see if there are any errors

accents blocks recognition

Hello,

To start I want to thank you for this great server siri. I see many uses as possible :) Otherwise I met a little trouble. I am French and I tried to create queries with accents and apparently it doesn't work :

 @register("fr-FR",".*Éteindre.*Lumière.*Salon.*")

Do you have an idea of ​​problem?

Encore merci pour votre superbe travail :)

Timeout already called

Unhandled Error
Traceback (most recent call last):
File "SiriServer.py", line 228, in
main()
File "SiriServer.py", line 224, in main
reactor.run()
File "/usr/lib64/python2.7/site-packages/twisted/internet/base.py", line 1169, in run
self.mainLoop()
File "/usr/lib64/python2.7/site-packages/twisted/internet/base.py", line 1178, in mainLoop
self.runUntilCurrent()
--- ---
File "/usr/lib64/python2.7/site-packages/twisted/internet/base.py", line 800, in runUntilCurrent
call.func(_call.args, *_call.kw)
File "/GoogleApi/SiriServerCore/SiriProtocolHandler.py", line 68, in checkTimeout
self.timeoutschedule.reset(SiriProtocolHandler.__timeout_delay)
File "/usr/lib64/python2.7/site-packages/twiste

DomainObjectUpdate problem

Hi, I'm almost done with Email plugin but I need to ask user for email message and then update email DomainObject, but when I send DomainObjectUpdate Siri disconect from my server.
Original DomainObjectUpdate from 4S :

{"class"=>"DomainObjectUpdate",
"properties"=>
{"identifier"=>
{"class"=>"Email",
"properties"=>
{"identifier"=>"amos://40EA282F-D883-42E8-B7FE-1C8D9026370D"},
"group"=>"com.apple.ace.email"},
"addFields"=>{"class"=>"Email", "group"=>"com.apple.ace.email"},
"setFields"=>
{"class"=>"Email",
"properties"=>{"message"=>"This is a test"},
"group"=>"com.apple.ace.email"},
"removeFields"=>{"class"=>"Email", "group"=>"com.apple.ace.email"}},
"aceId"=>"e1920529-9a04-4a84-9657-b12882382937",
"refId"=>"E2E6F211-CD9D-42F7-B40C-1AB7FB7D67AC",
"group"=>"com.apple.ace.system"}

My plugin is sending :
{'properties': {'callbacks': [], 'removeFields': [], 'setFields': {'group': 'com.apple.ace.email', 'class': 'Email', 'properties': {'message': u'Hello'}}, 'identifier': {'group': 'com.apple.ace.email', 'class': 'Email', 'properties': {'identifier': 'amos://9660519B-805C-46C0-863E-CA869910A1D7'}}, 'addFields': {'group': 'com.apple.ace.email', 'class': 'Email', 'properties': {}}}, 'aceId': 'DD44D86D-765C-4663-A113-18EE51C11818', 'group': 'com.apple.ace.system', 'refId': 'E6EE6F82-F015-442B-B2D5-D9A9D4C3CB3A', 'class': 'DomainObjectUpdate'}

Here is plugin code :

http://pastebin.com/UEgyuyy4

Server shows error on start up !!!

I have installed twisted but still I get the following error
./siriserver.py : line 1: try:: command not found
./siriserver.py : line 2: from:: command not found
./siriserver.py : line 3: from:: command not found
./siriserver.py : line 4: except:: command not found
Can`t find file You need top install the twisted python libraries....... etc etc

but I have installed twisted lib 12.0.0

What am I doing wrong ?

exceptions.AttributeError: 'NoneType' object has no attribute '__name__'

Hi all,

I get the following error when my server attempts to interpret a query; it was working and then it stopped after I played around with language. However since then I have put a free copy of the SiriServerCore on and it still wont work :( Can anyone help?

INFO Best matching result: "Test" with a confidence of 81.84%
Unhandled error in Deferred:
Traceback (most recent call last):
File "/usr/lib/python2.6/dist-packages/twisted/internet/base.py", line 1174, in mainLoop
self.runUntilCurrent()
File "/usr/lib/python2.6/dist-packages/twisted/internet/base.py", line 769, in runUntilCurrent
f(_a, *_kw)
File "/usr/lib/python2.6/dist-packages/twisted/internet/defer.py", line 318, in callback
self._startRunCallbacks(result)
File "/usr/lib/python2.6/dist-packages/twisted/internet/defer.py", line 424, in _startRunCallbacks
self._runCallbacks()
--- ---
File "/usr/lib/python2.6/dist-packages/twisted/internet/defer.py", line 441, in _runCallbacks
self.result = callback(self.result, _args, *_kw)
File "/SiriServerCore/SiriProtocolHandler.py", line 93, in handle_google_data
self.process_recognized_speech(googleAnswer, requestId, dictation)
File "/SiriServerCore/SiriProtocolHandler.py", line 119, in process_recognized_speech
plugin = PluginManager.getPluginForImmediateExecution(self.assistant.assistantId, best_match, self.assistant.language, (self.send_object, self.send_plist, self.assistant, self.current_location))
File "/SiriServerCore/PluginManager.py", line 114, in getPluginForImmediateExecution
logger.info("Request handled by: %s.%s" % (clazz.name, method.name))
exceptions.AttributeError: 'NoneType' object has no attribute 'name'

New commits breaks core

Unhandled error in Deferred:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/twisted/internet/base.py", line 1167, i n mainLoop
self.runUntilCurrent()
File "/usr/lib/python2.7/dist-packages/twisted/internet/base.py", line 762, in runUntilCurrent
f(_a, *_kw)
File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 361, i n callback
self._startRunCallbacks(result)
File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 455, i n _startRunCallbacks
self._runCallbacks()
--- ---
File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 542, i n _runCallbacks
current.result = callback(current.result, _args, *_kw)
File "/root/siriServers/test/SiriProtocolHandler.py", line 74, in handle_googl e_data
self.process_recognized_speech(googleAnswer, requestId, dictation)
File "/root/siriServers/test/SiriProtocolHandler.py", line 89, in process_reco gnized_speech
if len(best_match == 1):
exceptions.TypeError: object of type 'bool' has no len()

Best match index out of bounds

Unhandled Error
Traceback (most recent call last):
File "/usr/lib64/python2.7/site-packages/twisted/python/log.py", line 84, in callWithLogger
return callWithContext({"system": lp}, func, _args, *_kw)
File "/usr/lib64/python2.7/site-packages/twisted/python/log.py", line 69, in callWithContext
return context.call({ILogContext: newCtx}, func, _args, *_kw)
File "/usr/lib64/python2.7/site-packages/twisted/python/context.py", line 118, in callWithContext
return self.currentContext().callWithContext(ctx, func, _args, *_kw)
File "/usr/lib64/python2.7/site-packages/twisted/python/context.py", line 81, in callWithContext
return func(args,*kw)
--- ---
File "/usr/lib64/python2.7/site-packages/twisted/internet/posixbase.py", line 581, in _doReadOrWrite
why = selectable.doRead()
File "/usr/lib64/python2.7/site-packages/twisted/internet/tcp.py", line 199, in doRead
rval = self.protocol.dataReceived(data)
File "/usr/lib64/python2.7/site-packages/twisted/protocols/tls.py", line 413, in dataReceived
self._flushReceiveBIO()
File "/usr/lib64/python2.7/site-packages/twisted/protocols/tls.py", line 383, in _flushReceiveBIO
ProtocolWrapper.dataReceived(self, bytes)
File "/usr/lib64/python2.7/site-packages/twisted/protocols/policies.py", line 118, in dataReceived
self.wrappedProtocol.dataReceived(data)
File "/usr/lib64/python2.7/site-packages/twisted/protocols/basic.py", line 572, in dataReceived
return self.rawDataReceived(data)
File "/GoogleApi/SiriServerCore/SiriCore.py", line 115, in rawDataReceived
self.process_compressed_data()
File "/GoogleApi/SiriServerCore/SiriCore.py", line 126, in process_compressed_data
self.received_plist(plist)
File "/GoogleApi/SiriServerCore/SiriProtocolHandler.py", line 168, in received_plist
self.process_recognized_speech({u'hypotheses': [{'confidence': 1.0, 'utterance': plist['properties']['utterance']}]}, plist['aceId'], False)
File "/GoogleApi/SiriServerCore/SiriProtocolHandler.py", line 60, in process_recognized_speech
best_match = best_match[0].upper()+best_match[1:]
exceptions.IndexError: string index out of range

Another one, I know that it handles exceptions but need to post here to look better and remember the log

--- ---
File "/usr/lib64/python2.7/site-packages/twisted/internet/defer.py", line 545, in _runCallbacks
current.result = callback(current.result, _args, *_kw)
File "/GoogleApi/SiriServerCore/SiriProtocolHandler.py", line 74, in handle_google_data
self.process_recognized_speech(googleAnswer, requestId, dictation)
File "/GoogleApi/SiriServerCore/SiriProtocolHandler.py", line 112, in process_recognized_speech
self.send_object(recognized)
File "/GoogleApi/SiriServerCore/SiriCore.py", line 158, in send_object
self.send_plist(obj.to_plist())
File "/GoogleApi/SiriServerCore/SiriCore.py", line 161, in send_plist
self.sendLock.acquire()
exceptions.AttributeError: 'NoneType' object has no attribute 'acquire'

TypeError: object of type 'NoneType' has no len()

Using the latest version of SiriServerCore, I'm trying to look up the length of a number that is specified in the command. Previously, this worked with no problem. Now when I try it, I get this error:

Traceback (most recent call last):
File "/home/xbmc/Git/SiriServerCore/plugin.py", line 121, in run
self.method(self, self.__speech, self.__lang, self.__method.__dict[criteria_key][self.__lang].match(self.__speech))
File "/home/xbmc/Git/SiriServerCore/plugins/XBMC2.py", line 173, in specificepisode_command
if len(matchedRegex.group('episodenumber')) > 1:
TypeError: object of type 'NoneType' has no len()

Any ideas?

Segmentation Fault

hi there my device connects but i keep getting a segmentation fault please view my log below

root@core:~/core# python SiriServer.py --port 443 -l debug
INFO Starting server on port 443
INFO Loading Session Certificates
INFO Setting Up Database
INFO Connection to Database
INFO Loading Plugin Framework
ERROR Plugin loading failed
Traceback (most recent call last):
  File "/root/core/PluginManager.py", line 30, in load_plugins
    import(pluginPath+"."+line,  globals(), locals(), [], -1)
  File "/root/core/plugins/WhoAmI/init.py", line 19
     def mePerson(self, speech, language):
    ^
 IndentationError: unexpected indent
INFO Server is running and listening for connections
INFO New connection from 94.14.96.35 on port 50148
INFO Currently 1 clients connected
DEBUG --------------HEADER START---------------
DEBUG ACE /ace HTTP/1.0

Host: core.siri-server.co.uk

User-Agent: Assistant(iPhone/iPhone2,1; iPhone OS/5.0.1/9A405) Ace/1.0

Content-Length: 2000000000

DEBUG ---------------HEADER END----------------
DEBUG Got packet with class: CreateSessionInfoRequest
DEBUG packet with content:
{'aceId': '10EEEB3D-236A-411A-9401-B7082E87C94B',
 'class': 'CreateSessionInfoRequest',
 'group': 'com.apple.ace.system',
 'properties': {'sessionInfoRequest': '\x01\x08K,\x91H\x1d\x9b}\xa01\x93\x0b\x88|\x111\xeaM\xcf\xe2\xcc\xfe\xc5\xdd\xe8\xc8F\x0e.\xb7\x15\xa2\xe0\xc1\x94y\x89\x12\x0c\x1d\x94\xbc\xb1\xa0\x1d&^\xa4|N==\xf0\x03\xfc\x8b\x8f\x8e\x9e\xcdn\x11\x15\xf1\xa8\tZ\x1b\xf0\xf9\r\xb3\x86`u-\xd0\xb6\xf6\xbf\xf3M:\x0fz\xc7#\xa2\x87\x03\x13\x991\xe2\xd9\xeb\x10E"&@\xfb\xe2\x9b'\x15yQ\xa2\xcd\xc8\x9e-\xc2\xa9L\xf9\x18\x98\r\xdbC\x1b\xdd\xe7\xee\xe1%\xc95\xf5\xdd;\xc3\xfc\xeasD\xb8_\x9a\x9dL\xf4\x93\xd8\x8c\x0c\xd4\xe7\xb4\xea\xf1\x9a\x84\x9a##\xa3\xc2\x0f\xd3\xe7SM\xa0\x02l\xfd\x93A\x98\xc9\xf0\xba\xa1\xa3,\xd2=\x02\x0f\xb5\x93jq:(\x18\x06b\xbe3_2\xcd\xed\x83;E\xc7\x1a\n\x98\xed\xbf\xfc[\xaa\x80\xe0-\xa3t\xc4\x9b\x9f\xb2\xee>\xf3\xf3T\xd6k\xd6\x9f\xcd\x8fI\xf1o\x05A2\x9c\x83\n\x7f\x06N\x9d?FvUFCI\xad\x82\x93\xedv\xd3\x8a\x125&\x00\x05\xccj\x11X=\x93\x1c\xab\xeb\xe0\x1f\x9a\xcb\xf6c\xecF\xe1\x00\x00\x00 \x00\x9a\xc41-\xe0)Vo\xe7\xca\xa7]\xae\x99\x10\xfa_'\x9b6\x11\x19\x8bh\x94\x1f\xb9\x8c\xad\xb3\x9b|\xbaF\xcb\x84\x1d\xd0\x8b\xd1I\x7frQ\xd0\x14\xf7\x97\xd5'}}
DEBUG Sending packet with class: CommandFailed
DEBUG packet with content:
{'aceId': 'BF72B6CD-7BDA-4310-896B-3147E0CBB466',
 'class': 'CommandFailed',
 'group': 'com.apple.ace.system',
 'properties': {'callbacks': [],
                'errorCode': 0,
                'reason': 'Not authenticated'},
 'refId': '10EEEB3D-236A-411A-9401-B7082E87C94B'}
DEBUG Got packet with class: LoadAssistant
DEBUG packet with content:
{'aceId': 'D4548743-863B-44A1-ACEA-045EA6F21EE2',
 'class': 'LoadAssistant',
 'group': 'com.apple.ace.system',
 'properties': {'assistantId': 'EE3203B4-853C-488F-84EF-56CE33DD1D59',
                'speechId': 'edc6da91-529b-4354-b187-11c1f92fc4c2'}}
DEBUG Sending packet with class: AssistantLoaded
DEBUG packet with content:
{'aceId': 'ab0cbcf2-bd27-4500-804d-a31e1243e6c0',
 'class': 'AssistantLoaded',
 'group': 'com.apple.ace.system',
 'properties': {'dataAnchor': 'removed',
                'requestSync': False,
                'version': '20111216-32234-branches/telluride?cnxn=293552c2-8e11-4920-9131-5f5651ce244e'},
 'refId': 'D4548743-863B-44A1-ACEA-045EA6F21EE2'}
DEBUG Got packet with class: SetRestrictions
DEBUG packet with content:
{'aceId': '115EA9FB-D28C-40C7-B129-76ED5ACDD758',
 'class': 'SetRestrictions',
 'group': 'com.apple.ace.system'}
DEBUG Got packet with class: SetRestrictions
DEBUG packet with content:
{'aceId': '74AF9886-0441-4368-AA38-D3C4057478BC',
 'class': 'SetRestrictions',
 'group': 'com.apple.ace.system'}
DEBUG Got packet with class: ClearContext
DEBUG packet with content:
{'aceId': '90408776-0DED-496E-BA16-3D54605AA8C0',
 'class': 'ClearContext',
 'group': 'com.apple.ace.system'}
DEBUG Got packet with class: GetAnchors
DEBUG packet with content:
{'aceId': '27293234-E5F7-4CAC-8181-E7988D26E4A1',
 'class': 'GetAnchors',
 'group': 'com.apple.ace.sync',
 'properties': {'sources': ['com.apple.contact.people',
                            'com.apple.media.entities',
                            'com.apple.alarm.label',
                            'com.apple.reminder.list.name']}}
DEBUG Got packet with class: CancelSpeech
DEBUG packet with content:
{'aceId': '1587BA02-DF90-421D-BDDE-99618F1A1261',
 'class': 'CancelSpeech',
 'group': 'com.apple.ace.speech',
 'refId': '5C192B2E-18B0-4809-8CE9-AB859D303712'}
DEBUG Got packet with class: SetAlertContext
DEBUG packet with content:
{'aceId': 'ABB7EC3F-3E73-4489-B954-A5480592E374',
 'class': 'SetAlertContext',
 'group': 'com.apple.ace.system',
 'properties': {'context': [{'class': 'Sms',
                             'group': 'com.apple.ace.sms',
                             'properties': {'dateSent': datetime.datetime(2012, 3, 26, 15, 11, 37),
                                            'identifier': 'x-apple-sms:guid=10625',
                                            'msgSender': {'class': 'PersonAttribute',
                                                          'group': 'com.apple.ace.system',
                                                          'properties': {'data': '+NUMBER HERE',
                                                                         'displayText': 'NAME HERE',
                                                                         'object': {'class': 'Person',
                                                                                    'group': 'com.apple.ace.system',
                                                                                    'properties': {'firstName': 'NAME',
                                                                                                   'fullName': 'NAME',
                                                                                                   'lastName': 'NAME',
                                                                                                   'phones': [{'class': 'Phone',
                                                                                                               'group': 'com.apple.ace.system',
                                                                                                               'properties': {'number': '+447411656765'}}]}}}},
                                            'outgoing': False}}]}}
DEBUG Got packet with class: SetAlertContext
DEBUG packet with content:
{'aceId': 'A77A86C7-67FF-4F0F-BD36-FF2A6F5D9464',
 'class': 'SetAlertContext',
 'group': 'com.apple.ace.system',
 'properties': {'context': [{'class': 'Sms',
                             'group': 'com.apple.ace.sms',
                             'properties': {'dateSent': datetime.datetime(2012, 3, 26, 15, 22, 23),
                                            'identifier': 'x-apple-sms:guid=10626',
                                            'msgSender': {'class': 'PersonAttribute',
                                                          'group': 'com.apple.ace.system',
                                                          'properties': {'data': '86444',
                                                                         'displayText': '864 44',
                                                                         'object': {'class': 'Person',
                                                                                    'group': 'com.apple.ace.system',
                                                                                    'properties': {'phones': [{'class': 'Phone',
                                                                                                               'group': 'com.apple.ace.system',
                                                                                                               'properties': {'number': '86444'}}]}}}},
                                            'outgoing': False}},
                            {'class': 'Sms',
                             'group': 'com.apple.ace.sms',
                             'properties': {'dateSent': datetime.datetime(2012, 3, 26, 15, 11, 37),
                                            'identifier': 'x-apple-sms:guid=10625',
                                            'msgSender': {'class': 'PersonAttribute',
                                                          'group': 'com.apple.ace.system',
                                                          'properties': {'data': '+NUMBER',
                                                                         'displayText': 'NAME',
                                                                         'object': {'class': 'Person',
                                                                                    'group': 'com.apple.ace.system',
                                                                                    'properties': {'firstName': 'NAME',
                                                                                                   'fullName': 'NAME',
                                                                                                   'lastName': 'NAME',
                                                                                                   'phones': [{'class': 'Phone',
                                                                                                               'group': 'com.apple.ace.system',
                                                                                                               'properties': {'number': '+447411656765'}}]}}}},
                                            'outgoing': False}}]}}
DEBUG Got packet with class: StartSpeechRequest
DEBUG packet with content:
{'aceId': '4CF34C08-EF56-4FB4-8D1D-B2DD9DBD7288',
 'class': 'StartSpeechRequest',
 'group': 'com.apple.ace.speech',
 'properties': {'audioSource': 'BuiltInMic',
                'codec': 'Speex_WB_Quality8',
                'handsFree': False}}
DEBUG New start of speech received
DEBUG Got packet with class: SetRequestOrigin
DEBUG packet with content:
{'aceId': 'FF3EBC7B-B7CA-4D19-BA5B-BE8F90FCE2B2',
 'class': 'SetRequestOrigin',
 'group': 'com.apple.ace.system',
 'properties': {'age': 7984,
                'altitude': 152.91651916503906,
                'direction': -1.0,
                'horizontalAccuracy': 65.0,
                'latitude': 53.711410131560989,
                'longitude': -1.7292625554593315,
                'speed': -1.0,
                'verticalAccuracy': 10.0},
 'refId': '4CF34C08-EF56-4FB4-8D1D-B2DD9DBD7288'}
DEBUG Got packet with class: SpeechPacket
DEBUG packet with content:
{'aceId': '2FC08E1F-74BC-477A-A694-5150CD3776D2',
 'class': 'SpeechPacket',
 'group': 'com.apple.ace.speech',
 'properties': {'packetNumber': 0,
                'packets': ["\t\xd6f\x18\x0f\xf2w\xe6)\x04\x1b\xb8\x0b8#\xe6\xed\x84\x12\x88'|\x88@G\xc9\xdf\xa4b\x10N\xf70@\x8f\x9b\x9c#\x0c\xe0\x9dfsA\x1f'\xc5\x9c\xe1;\xdet\x82>N\xd0\xc4\x18\x83t\xe1M\x04|\x9cx\xc8S\x04\xe0U\x9c\x08\xf9;\xf3\x98\xe8\r\xdbt\x8c\x11\xf2w\xe7BP\x1b\x9c \x00#\xe4\xef\xc6\x82\x15"]},
 'refId': '4CF34C08-EF56-4FB4-8D1D-B2DD9DBD7288'}
DEBUG Decoding speech packet
Segmentation fault
root@core:
/core# 

Thanks

change a language for different

I want to use this awesome server for my own things and I would like to ask if is possible to for example switch FRENCH language for CZECH? Is is possible and is it easy? Can some one guide me a little?

Thanks !

epoll .. issue

can anybody help me i get always this error :

Warning: Your system does not support epoll
Will to use simple poll

Can only connect once?

I am running SiriServer on my Macbook, and so far I haven't had any trouble connecting or authenticating with the server. However, as soon as I close Siri on my iPhone (or the connection times out) I cannot reconnect. I've tried restarting the server, but it doesn't help. Think this might be an SSL issue but I'm not seeing any error messages. Suggestions?

"NoneType" has no attribute "compress"

This only happens occasionally, but I'm worried about server stability if I'm not at home to restart it. Can someone more familiar with the protocol take a look at this? I'm available for testing.

INFO Request handled by: shortMessaging.sendSMS
WARNING This class is deprecated use the AB version instead
WARNING This class is deprecated use the AB version instead
INFO Sending flac to google for recognition
INFO Best matching result: "Hey how's it going" with a confidence of 96.99%
INFO Sending flac to google for recognition
INFO Best matching result: "No" with a confidence of 79.93%
INFO Sending flac to google for recognition
INFO Best matching result: "Change it" with a confidence of 77.5%
INFO Sending flac to google for recognition
INFO Best matching result: "Hey, how is it going" with a confidence of 87.89%
INFO Sending flac to google for recognition
INFO Best matching result: "Nope" with a confidence of 53.47%
INFO Sending flac to google for recognition
INFO Best matching result: "Change it" with a confidence of 51.94%
uINFO Sending flac to google for recognition
INFO Best matching result: "Hey, how's it going?" with a confidence of 95.81%
INFO Sending flac to google for recognition
INFO Best matching result: "Nope" with a confidence of 25.39%
ERROR Connection Lost: [Failure instance: Traceback: <class 'OpenSSL.SSL.SysCallError'>: (0, 'Error')
/home/blast_hardcheese/Projects/siri/sirienv/local/lib/python2.7/site-packages/twisted/python/context.py:81:callWithContext
/home/blast_hardcheese/Projects/siri/sirienv/local/lib/python2.7/site-packages/twisted/internet/posixbase.py:586:_doReadOrWrite
/home/blast_hardcheese/Projects/siri/sirienv/local/lib/python2.7/site-packages/twisted/internet/tcp.py:199:doRead
/home/blast_hardcheese/Projects/siri/sirienv/local/lib/python2.7/site-packages/twisted/protocols/tls.py:413:dataReceived
--- <exception caught here> ---
/home/blast_hardcheese/Projects/siri/sirienv/local/lib/python2.7/site-packages/twisted/protocols/tls.py:352:_flushReceiveBIO
]
INFO Currently 0 clients connected
ERROR Unexpected error during plugin processing
Traceback (most recent call last):
  File "/home/blast_hardcheese/Projects/siri/SiriServerCore/plugin.py", line 149, in run
    self.__method(self, self.__speech, self.__lang, self.__method.__dict__[__criteria_key__][self.__lang].match(self.__speech))
  File "/home/blast_hardcheese/Projects/siri/SiriServerCore/plugins/shortMessage/__init__.py", line 571, in sendSMS
    self.message(self.findPhoneForNumberType(personToMessage, None, lang), personToMessage, lang)
  File "/home/blast_hardcheese/Projects/siri/SiriServerCore/plugins/shortMessage/__init__.py", line 410, in message
    instruction = self.askForClarification(smsObj, language).strip().lower()
  File "/home/blast_hardcheese/Projects/siri/SiriServerCore/plugins/shortMessage/__init__.py", line 360, in askForClarification
    response = self.getResponseForRequest(createAnchor)
  File "/home/blast_hardcheese/Projects/siri/SiriServerCore/plugin.py", line 267, in getResponseForRequest
    self.send_object(clientBoundCommand)
  File "/home/blast_hardcheese/Projects/siri/SiriServerCore/plugin.py", line 234, in send_object
    self.__send_object(obj)
  File "/home/blast_hardcheese/Projects/siri/SiriServerCore/SiriCore.py", line 159, in send_object
    self.send_plist(obj.to_plist())
  File "/home/blast_hardcheese/Projects/siri/SiriServerCore/SiriCore.py", line 167, in send_plist
    self.flush_unzipped_output()
  File "/home/blast_hardcheese/Projects/siri/SiriServerCore/SiriCore.py", line 177, in flush_unzipped_output
    self.output_buffer += self.compressor.compress(self.unzipped_output_buffer)
AttributeError: 'NoneType' object has no attribute 'compress'
INFO New connection from 192.168.0.1 on port 60354
INFO Currently 1 clients connected

PersonSearch

On PersonSearch relationship you will get error..

class': 'CommandFailed',
'group': 'com.apple.ace.system',
'properties': {'reason': 'Relationship not supported'},

error on websearch

INFO Best matching result: "^webSearchQuery^=^Either^^webSearchConfirmation^=^Yes^" with a confidence of 100.0%
ERROR Connection Lost: [Failure instance: Traceback: <class 'OpenSSL.SSL.SysCallError'>: (0, 'Error')
/usr/lib64/python2.7/site-packages/twisted/python/context.py:81:callWithContext
/usr/lib64/python2.7/site-packages/twisted/internet/posixbase.py:581:_doReadOrWrite
/usr/lib64/python2.7/site-packages/twisted/internet/tcp.py:199:doRead
/usr/lib64/python2.7/site-packages/twisted/protocols/tls.py:413:dataReceived
--- ---
/usr/lib64/python2.7/site-packages/twisted/protocols/tls.py:352:_flushReceiveBIO
]

ssl handshake failure

WARNING [('SSL routines', 'SSL3_READ_BYTES', 'ssl handshake failure')]
is the error i get alot. Any ideas

SSL related error "unknown protocol"

Hi

I've got a problem connecting to my Siri-server.
Every time I try to connect with my IDevice, i get the following Error/Warning in the server log:

INFO New connection from 192.168.2.123 on port 53399
INFO Currently 1 clients connected
WARNING SSL related error
WARNING [('SSL routines', 'SSL23_GET_CLIENT_HELLO', 'unknown protocol')]
INFO Currently 0 clients connected

If i try to verify the correctnes of my certificate with the " echo | openssl s_client -connect..." method i get the following error:

unable to load certificate 58982:error:0906D06C:PEM routines:PEM_read_bio:no start line:/SourceCache/OpenSSL098/OpenSSL098-35.1/src/crypto/pem/pem_lib.c:648:Expecting: TRUSTED CERTIFICATE

And with the last SSL test (the mini-server one) i only got

SSL_accept:error in SSLv2/v3 read client hello A
ERROR
58992:error:140760FC:SSL routines:SSL23_GET_CLIENT_HELLO:unknown protocol:/SourceCache/OpenSSL098/OpenSSL098-35.1/src/ssl/s23_srvr.c:578: shutting down SSL
CONNECTION CLOSED

Does anybody has a clue why this is happening?

Thanks

How to use MPSearch

How can I use MPSearch object ? I've tryed

songName = "Test"
self.say("Looking for "{0}" ...".format(songName))
searchSong = MPSearch(self.refId)
searchSong.searchValue = songName
songSearch = self.getResponseForRequest(searchSong)
if ObjectIsCommand(songSearch, MPSearchCompleted):
print "{0}".format(songSearch)
else:
raise StopPluginExecution("Unknown response: {0}".format(songSearch))

But it always didn't find anything (song is in my device).

SSL Handshake Failure

Running into it...just did a delete of the old directory, did a git clone of the repo, created the apikeys.conf and plugins.conf, and ran sudo python SiriServer.py, had it create the keys, went to my iPhone and deleted all existing profiles, emailed the new ca.pem file to myself and installed it, and still get SSL handshake failure. I'm at a loss...what is going wrong?

Cannot connect to my server

Whatever i do, i cannot connect to my siri server. it is running in terminal, but my idevice wont connect, and the incoming connection will not show up on my server.
Also, another problem maybe that I am not sure which certificate to use in the 'keys' file in siriserver root file with my device to connect. which one am i supposed to used(these are all the certificates present in the 'keys' folder in siriserver root file):
ca.pem (with lock over it)
ca.pem-EXAMPLE (of course not this)
cakey.pem (with lock)
server.crt (with lock)
server.crt-EXAMPLE
server.key (with lock)
server.key-EXAMPLE
SessionCACert.pem
SessionCert.pem

Any help is much appreciated, and none of these worked to connect to my server, even if i tried them one at a time.
my server is 192.168.1.1 on my local wifi and i have that in spire. and yes it is https

Another thing, if i wanted to use my server somehere else (on 3g or other wifi), would i just put my ip address in followed by the server and port? Like this?: (ip in X's)
XX.XX.XX.XX:192.168.1.1:443

Thank You

To many open Files

For some reason the flac encoder doesn't close all the file descriptors. Even though I have set the max number of files via ulimit to 60.000 the server crashes on that. That must indicate that somehow the flac encoder doesn't close the temporary file descriptors.

Will post output soon!

Plugins

I'm looking at moving from the old repo to this one, but since this one does not contain the various plugins, what is the recommended method of using them?

Key error issues

File "/GoogleApi/SiriServerCore/SiriCore.py", line 131, in process_compressed_data
self.received_plist(plist)
File "/GoogleApi/SiriServerCore/SiriProtocolHandler.py", line 198, in received_plist
(decoder, encoder, dictation) = self.speech[speechPacket.refId]
exceptions.KeyError: 'A19BDF29-7968-4CF6-994A-130633E2FD20'

Why does this happen?

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.